with one click
trace-layer-extract
Extract per-layer kernel sequence from ATOM level=3 traces
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Menu
Extract per-layer kernel sequence from ATOM level=3 traces
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Based on SOC occupation classification
Profile LLM with ATOM, extract GPU kernels, generate kernel inventory
Launch ATOM server and run throughput benchmark
CUDA graph replay benchmark + source trace templates
Single GPU kernel micro-benchmark with roofline analysis
Deep kernel source-level walkthrough for aiter/atom/CK stack
Map complete kernel pipeline for LLM inference (prefill vs decode)
| name | trace-layer-extract |
| description | Extract per-layer kernel sequence from ATOM level=3 traces |
| user-invocable | true |
从 ATOM level=3 (CUDA graph) 运行时 trace 中提取 per-decode-layer kernel 序列和统计数据。
用户想看 decode 单层的 kernel 序列、对比不同 TP/量化配置下的 per-layer 耗时、做 kernel-level 优化分析。
bench_serving/2_trace_layer.py — reusable CLI tool.
# Basic usage — auto-detects decode bs, auto-saves conc{bs}_layer.csv
python bench_serving/2_trace_layer.py <trace.json.gz>
# With explicit CSV path — auto-prepends conc{bs}_ to filename
python bench_serving/2_trace_layer.py <trace.json.gz> --csv output.csv
# → saves as conc32_output.csv (if dominant bs=32)
# Custom PA pattern (e.g. for FlashAttn models)
python bench_serving/2_trace_layer.py <trace.json.gz> --pa-pattern fmha_fwd
decode[bs=N] annotationsCounter.most_commonconc{dominant_bs}_Paged Attention kernel (pa_bf16_pertokenFp8_gqa8) 每层恰好出现一次,作为 layer boundary anchor。
Pos Kernel Avg(us) Std Min Max % N
-------------------------------------------------------------------------------------
0 PA (paged_attn) 14.6 0.8 10.9 18.2 3.5% 2501
1 FP8_quant 5.5 0.5 4.4 7.8 1.3% 2501
2 GEMM_FP8 (CK dense) 16.1 0.5 14.9 18.8 3.9% 2501
...
10 MoE_GEMM (CK) 180.4 16.3 117.8 231.2 43.9% 2501
12 MoE_GEMM (CK) 88.5 8.4 5.3 112.8 21.5% 2501
...
-------------------------------------------------------------------------------------
TOTAL per layer 411.0 us
x62 layers 25.48 ms
--num-prompts-mul 5+ 确保足够 steady-state 数据