You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
NOTE: Reference reports regenerated. Difference in reference reports is due to addition of new fields in param_details in perf reports. Change in param: transpose column also affected the rows that are matched via compare_perf_report.
Summary
Extends kernel name parsing to extract tile sizes (mt_m, mt_n, mt_k) and transpose flags from GEMM GPU kernel names across all major kernel libraries observed in MI300 and H100 traces. Previously only Tensile and nvjet kernels were parsed. Tile info is now surfaced in param_details alongside the existing transpose field.
Changes
General
Added six new parser pairs covering all GEMM kernel libraries observed in traces:
Also renamed is_rocm_gemm→is_tensile_gemm, parse_rocm_gemm→parse_tensile_gemm, is_cuda_gemm→is_nvjet_gemm, parse_cuda_gemm→parse_nvjet_gemm for clarity.
Transpose is not in Triton kernel names — layout is fixed by the kernel function (e.g., a8w8_blockscale is always activations × weights = row × column) and compiled into the JIT binary rather than parameterized in the name. For iGEMM, the concept of transpose doesn't apply — these are always NHWC convolution kernels where fwd/bwd/wrw indicates the convolution pass direction, not matrix orientation.
CK Kernels
The profiler records CK kernels in two forms: demangled names are human-readable C++ (e.g., void ck::kernel_gemm_xdl_cshuffle_v3<ck::GridwiseGemmMultiD_ABScale_xdl_cshuffle_v3<...>>), produced when the profiler resolves symbol names; mangled names are the raw encoded form the C++ compiler emits (e.g., _ZN2ck16tensor_operation6device...), where integers appear as ELi128E rather than 128.
Using python package itanium-demangler, the mangled kernel name can be demangled and parsed in the same way demangled kernels are parsed.
TraceLens/PerfModel/kernel_name_parser.py
Extended kernel parsing logic to cover different libraries
TraceLens/PerfModel/perf_model.py
mt_m, mt_n, and mt_k, are now surfaced in impl_param columns for all parsed kernel libraries. Fields default to "Unknown" if the kernel name doesn't match any parser or the field is not extractable for that library.
The K-tile field was previously named depth_u, which was Tensile specific. It has been renamed to mt_k to be consistent with mt_m/mt_n.
setup.py
Added itanium-demangler dependency
tests/test_kernel_name_parser.py (new)
Integration tests using verbatim kernel names extracted from trace files.
5 tests per library (35 total).
Added de-mangling logic for mangled CK kernels using itanium-demangler rather than trying to directly parse mangled kernel names which was unreliable. Added this package in setup.py.
Added additional cutlass, ck, and nvjet parsing logic.
Tile size is an implementation detail, not a workload identity. compare_perf_reports_pytorch.py uses every param: column as a merge key, so adding mt_* to param_details breaks cross-hardware comparison. Rather than adding a one-off exclusion for these fields, I suggest introducing an impl_param: prefix: keep logical workload identity under param: and surface kernel-selection details such as mt_m, mt_n, and mt_k under impl_param:. The comparator can continue merging only on param: columns while preserving implementation details as per-report columns. This also scales to future fields such as kernel library, pipeline stages, wave tile, split-K, and algorithm ID.
Six unrelated SGLang references (InferenceAttention_fwd.csv, RMSNorm_fwd.csv, and UnaryElementwise.csv under both decode and prefill/decode) only change None/nan serialization to empty cells. These changes are unrelated to GEMM kernel parsing and add regression-reference noise. Could they be reverted from this PR?
The GRIDWISE_CONFIG comment references docs/ck_kernel_tile_indices.md, but that file is not present anywhere in this PR revision. Could you either add the referenced parameter table or remove/update the comment to point to an existing source?
itanium-demangler is added to setup.py under install_requires, so the implementation is consistent as a mandatory dependency and normal installation will provide it. I am fine with making it required because it is a small pure-Python library with no runtime dependencies. The PR description currently says the dependency is optional and that demangling is skipped when it is unavailable; that is not how the code behaves because it is imported unconditionally. Please update the description to present it as a required dependency.
@ajassani, added impl_param columns, reverted unrelated changes to CSVs, fixed docstrings, and updated PR description.
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
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.
NOTE: Reference reports regenerated. Difference in reference reports is due to addition of new fields in
param_detailsin perf reports. Change inparam: transposecolumn also affected the rows that are matched viacompare_perf_report.Summary
Extends kernel name parsing to extract tile sizes (
mt_m,mt_n,mt_k) and transpose flags from GEMM GPU kernel names across all major kernel libraries observed in MI300 and H100 traces. Previously only Tensile and nvjet kernels were parsed. Tile info is now surfaced inparam_detailsalongside the existing transpose field.Changes
General
Added six new parser pairs covering all GEMM kernel libraries observed in traces:
Cijk_*is_tensile_gemm(renamed)MT(\d+)x(\d+)x(\d+)Alik/Ailk,Bljk/BjlkCijk_Alik_Bljk_..._MT64x32x256_MI16x16x1_...is_triton_gemmBLOCK_SIZE_[MNK]_(\d+)_gemm_a8w8_blockscale_kernel_..._BLOCK_SIZE_M_128_BLOCK_SIZE_N_128_BLOCK_SIZE_K_128_...is_ck_gemmRowMajor=not transposed,ColumnMajor=transposedGRIDWISE_CONFIGinparse_ck_gemmis_igemmbt(\d+)x(\d+)x(\d+)fwd/bwd/wrwencodes the pass, not matrix transposeigemm_fwd_gtcx3_nhwc_bf16_bx0_ex1_bt128x128x32_wt32x32x8_...is_cublas_xmma_gemmtilesize(\d+)x(\d+)x(\d+)_([tn])([tn])_sm90_xmma_gemm_bf16bf16_bf16f32_f32_tn_n_tilesize128x128x64_warpgroupsize1x1x1_..._cublasis_cutlass_gemm(\d+)x(\d+)_(\d+)x(\d+)or(\d+)x(\d+)x(\d+)_([tn]{2})_void cutlass::Kernel2<cutlass_80_tensorop_bf16_s16816gemm_bf16_256x128_64x3_tn_align2>(...)is_nvjet_gemm(renamed)nvjet_\w+_(\d+)x(\d+)_(\d+)x\d+T/Nper position (A, B, C)nvjet_tst_144x128_64x6_2x1_v_bz_bias_TNNAlso renamed
is_rocm_gemm→is_tensile_gemm,parse_rocm_gemm→parse_tensile_gemm,is_cuda_gemm→is_nvjet_gemm,parse_cuda_gemm→parse_nvjet_gemmfor clarity.Transpose is not in Triton kernel names — layout is fixed by the kernel function (e.g.,
a8w8_blockscaleis always activations × weights = row × column) and compiled into the JIT binary rather than parameterized in the name. For iGEMM, the concept of transpose doesn't apply — these are always NHWC convolution kernels wherefwd/bwd/wrwindicates the convolution pass direction, not matrix orientation.CK Kernels
The profiler records CK kernels in two forms: demangled names are human-readable C++ (e.g.,
void ck::kernel_gemm_xdl_cshuffle_v3<ck::GridwiseGemmMultiD_ABScale_xdl_cshuffle_v3<...>>), produced when the profiler resolves symbol names; mangled names are the raw encoded form the C++ compiler emits (e.g.,_ZN2ck16tensor_operation6device...), where integers appear asELi128Erather than128.Using python package
itanium-demangler, the mangled kernel name can be demangled and parsed in the same way demangled kernels are parsed.TraceLens/PerfModel/kernel_name_parser.pyExtended kernel parsing logic to cover different libraries
TraceLens/PerfModel/perf_model.pymt_m,mt_n, andmt_k, are now surfaced inimpl_paramcolumns for all parsed kernel libraries. Fields default to"Unknown"if the kernel name doesn't match any parser or the field is not extractable for that library.The K-tile field was previously named
depth_u, which was Tensile specific. It has been renamed tomt_kto be consistent withmt_m/mt_n.setup.pyAdded
itanium-demanglerdependencytests/test_kernel_name_parser.py(new)Integration tests using verbatim kernel names extracted from trace files.
5 tests per library (35 total).