Skip to content

[Triton/Gluon] Add config-aware repr to the GEMM and conv1d kernels - #5095

Open
Boss2002n wants to merge 1 commit into
mainfrom
satya/triton-kernel-repr-gemm-conv
Open

[Triton/Gluon] Add config-aware repr to the GEMM and conv1d kernels#5095
Boss2002n wants to merge 1 commit into
mainfrom
satya/triton-kernel-repr-gemm-conv

Conversation

@Boss2002n

Copy link
Copy Markdown
Contributor

No description provided.

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.
@Boss2002n
Boss2002n requested review from a team and a lite review from Copilot August 29, 2026 00:34
@github-actions

Copy link
Copy Markdown
Contributor

🏷️ CI Guide

Runs automatically on every PR:

  • ✅ Pre-checks (submodule verification, code formatting)
  • ✅ Aiter op tests (gfx942 + gfx950)
  • ✅ Triton tests on MI35X (only when aiter/ops/triton/** or related paths are changed)

Extended tests (opt-in via labels):

Label Tests
ci:gfx1250-ffm-triton Run the five-shard gfx1250 FFM Triton test suite
ci:triton-300x Run an additional Triton test job on MI300X in PRs; main branch always runs both MI35X and MI300X
multigpu Aiter multi-GPU tests on the 8-GPU runner
ci:sglang SGLang integration tests: DeepSeek-R1-MXFP4 accuracy, Qwen 3.5 accuracy
ci:atom ATOM benchmark: DeepSeek-R1-0528, GPT-OSS-120B
ci:atom_full ATOM accuracy suite for PR and main models from ATOM models_accuracy.json
ci:vllm vLLM benchmark: GPT-OSS-120B, DeepSeek-R1-0528, Kimi-K2.5
ci:all All standard extended tests (excludes ci:atom_full)

Only add ci:atom_full for FlyDSL or Triton upgrades.
Add labels via the sidebar or gh pr edit 5095 --add-label <label>

PR title tags:
Component tags ([Triton/Gluon], [HIP], [CK], [ASM], ...) are added to the PR title automatically from the changed files and re-synced on every push — change-type tags like [fix]/[Perf] and op tags like [MLA] are left untouched. Add the no-auto-title label to opt this PR out of title tagging.

@github-actions github-actions Bot changed the title [Triton] Add config-aware repr to the GEMM and conv1d kernels [Triton/Gluon] Add config-aware repr to the GEMM and conv1d kernels Aug 29, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 repr for causal conv1d forward/update kernels (including single-token update paths).
  • Standardized kernel naming keys used in repr to 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants