Add: insight-trace skill for in-core swim lane diagrams#728
Open
chenshengxin2026 wants to merge 1 commit intohw-native-sys:mainfrom
Open
Add: insight-trace skill for in-core swim lane diagrams#728chenshengxin2026 wants to merge 1 commit intohw-native-sys:mainfrom
chenshengxin2026 wants to merge 1 commit intohw-native-sys:mainfrom
Conversation
Adds a self-contained skill that walks through generating MindStudio Insight traces (per-core swim lane diagrams) for kernel_entry(args) style kernels under msprof op simulator. Covers SPMD mix, AIC-only, and AIV-only kernel shapes via a single mix-arch .so wrapper, then exports the trace.json + instr_exe CSVs that Insight consumes.
There was a problem hiding this comment.
Code Review
This pull request introduces a comprehensive skill guide for generating MindStudio Insight traces for kernel_entry(args) style kernels. The documentation outlines a complete workflow, from kernel classification and input gathering to workspace creation and artifact verification. Review feedback correctly identifies the need to use proper CCEC hardware intrinsic names (e.g., GetBlockIdx) in the code templates to avoid compilation conflicts and suggests increasing the msprof timeout to ensure successful profiling of complex kernels.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add a new skill at
.claude/skills/insight-trace/that walks through generating MindStudio Insight traces (per-core swim lane diagrams) forkernel_entry(args)style kernels in this repo.The skill is self-contained and covers all three supported kernel shapes:
__DAV_CUBE__and__DAV_VEC__include the kernel; args use slot 48/49 forLocalContext*/GlobalContext*(e.g.paged_attention_parallel.cpp).__DAV_CUBE__includes the kernel (e.g.aic_pv_matmul.cpp).__DAV_VEC__includes the kernel (e.g.aiv_softmax_prepare.cpp).The recipe builds a single mix-arch
.sowrapper around the target kernel, launches it undermsprof op simulator, and exports the per-coretrace.json+instr_exeCSVs that MindStudio Insight consumes.Scope
msprof --application(the simulator returns 207000 on the AICPU KFC launch).Testing
python3 tests/lint/check_english_only.pypasses on the new filemarkdownlint-cli2passes with the repo config