[Triton/Gluon] Add config-aware repr to the GEMM and conv1d kernels - #5095
[Triton/Gluon] Add config-aware repr to the GEMM and conv1d kernels#5095Boss2002n wants to merge 1 commit into
Conversation
Every launchable Triton kernel is required to set a config-aware repr via make_kernel_repr so a trace row can be matched back to the exact tuned config. Twelve launchable kernels in the GEMM feed-forward/fused and conv subtrees had none, so they showed up in traces under their bare kernel name: _ff_a16w16_fused_gated, _ff_a16w16_fused_ungated _fused_gemm_a8w8_blockscale_a16w16_kernel (+ its reduce) _fused_gemm_a8w8_blockscale_split_cat, ..._preshuffle_split_cat (+ its reduce) _fused_gemm_afp4wfp4_split_cat_reduce _causal_conv1d_fwd_kernel, _causal_conv1d_update_kernel _causal_conv1d_update_single_token_kernel _reshape_causal_conv1d_update_single_token_kernel Key lists follow the neighbouring kernels in each subtree: tuned block/tile and split-K constexprs plus the meaningful compile-time flags, with grid extents and shape-derived constexprs (GRID_MN*, GROUP_K/GROUP_N, BLOCK_SIZE_S3) excluded -- the launchers compute those from shapes, and the sibling reprs omit them too. A key that is not a real parameter renders as NONE in every trace name, so each list was cross-checked against the kernel's own signature; all 12 pass. Note _fused_gemm_a8w8_blockscale_a16w16_kernel does NOT carry the num_warps / num_stages / waves_per_eu / matrix_instr_nonkdim constexprs its afp4wfp4 twin has, so its list is correspondingly shorter.
🏷️ CI GuideRuns automatically on every PR:
Extended tests (opt-in via labels):
PR title tags: |
There was a problem hiding this comment.
Pull request overview
This PR improves kernel traceability and debugging for Triton GEMM and conv1d kernels by attaching config-aware repr functions via make_kernel_repr, so compiled kernel names reflect key compile-time/meta parameters.
Changes:
- Added
make_kernel_repr(...)definitions for several GEMM fused/feed-forward Triton kernels and wired them into@triton.jit(repr=...). - Added config-aware
reprfor causal conv1d forward/update kernels (including single-token update paths). - Standardized kernel naming keys used in
reprto match existing kernel meta-parameter patterns (e.g.,BLOCK_SIZE_*,NUM_KSPLIT, feature flags).
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| aiter/ops/triton/_triton_kernels/gemm/fused/fused_gemm_afp4wfp4_split_cat.py | Adds config-aware repr to the split-cat reduce kernel (and uses make_kernel_repr consistently with other GEMM kernels). |
| aiter/ops/triton/_triton_kernels/gemm/fused/fused_gemm_a8w8_blockscale_split_cat.py | Adds make_kernel_repr import plus config-aware repr for main, preshuffle, and reduce split-cat kernels. |
| aiter/ops/triton/_triton_kernels/gemm/fused/fused_gemm_a8w8_blockscale_a16w16.py | Adds config-aware repr for the main FP8/BF16 fused kernel and its reduce kernel. |
| aiter/ops/triton/_triton_kernels/gemm/feed_forward/ff_a16w16_fused_ungated.py | Adds config-aware repr for the fused ungated FFN kernel. |
| aiter/ops/triton/_triton_kernels/gemm/feed_forward/ff_a16w16_fused_gated.py | Adds config-aware repr for the fused gated FFN kernel. |
| aiter/ops/triton/_triton_kernels/conv/causal_conv1d.py | Adds config-aware repr for causal conv1d forward and update kernels. |
| aiter/ops/triton/_triton_kernels/conv/causal_conv1d_update_single_token.py | Adds config-aware repr for single-token update and reshape+update kernels (helpers remain as device functions). |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
No description provided.