Skip to content

[Triton/Gluon] add mla decode kernel name prefix - #5214

Merged
brunomazzottiamd merged 2 commits into
mainfrom
satya/triton-mla-decode-kernel-name-prefix
Sep 9, 2026
Merged

brunomazzottiamd merged 2 commits into
mainfrom
satya/triton-mla-decode-kernel-name-prefix

Conversation

@Boss2002n

Copy link
Copy Markdown
Contributor

No description provided.

@github-actions

github-actions Bot commented Sep 2, 2026

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 5214 --add-label <label>

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

_fwd_kernel_stage1, _fwd_grouped_kernel_stage1, _fwd_kernel_stage2 and
_csr_to_dense_kernel say nothing about which op they belong to once they are
out of the source file and into a JIT artifact or a profiling trace.

_fwd_kernel_stage2 was not merely generic, it was ambiguous: two different
kernels shipped that base name, attention/mla_decode.py and
_triton_kernels/attention/mla_decode_rope.py, and their key lists open with the
same three entries (NUM_KV_SPLITS, BLOCK_DV, Lv), so a trace line had to be read
to the end to tell which op produced it. Prefixed both.

Only the base_name argument to make_kernel_repr changes. The Python functions
keep their names, so no import, launch site or test moves, and nothing else in
the tree reads these strings -- no tuned config file, AOT metadata path or cache
key is derived from a repr base name.

  attention/mla_decode.py
    _fwd_kernel_stage1          -> mla_decode_fwd_kernel_stage1
    _fwd_grouped_kernel_stage1  -> mla_decode_fwd_grouped_kernel_stage1
    _fwd_kernel_stage2          -> mla_decode_fwd_kernel_stage2
    _csr_to_dense_kernel        -> mla_decode_csr_to_dense_kernel

  _triton_kernels/attention/mla_decode_rope.py
    _fwd_kernel_stage2          -> mla_decode_rope_fwd_kernel_stage2

A scan of the 256 distinct make_kernel_repr base names in the tree finds seven
still shared by more than one file: _fwd_kernel (extend_attention, pa_prefill,
prefill_attention), _bwd_preprocess (the two MHA backward kernels), and five
arch or backend variants of a single logical kernel (_pa_decode_sparse,
_pa_decode_sparse_reduce, _mla_decode_fwd_kernel, _mla_decode_fwd_reduce_kernel,
_gluon_fp8_mqa_logits_kernel). This clears the eighth.

Reported by @brunomazzottiamd in review of #5097.
@Boss2002n
Boss2002n force-pushed the satya/triton-mla-decode-kernel-name-prefix branch from 9c8be74 to 3d8aa22 Compare September 2, 2026 14:57
@Boss2002n
Boss2002n requested review from brunomazzottiamd and a balanced review from Copilot September 2, 2026 14:57
@Boss2002n
Boss2002n marked this pull request as ready for review September 2, 2026 14:58
@Boss2002n
Boss2002n requested a review from a team September 2, 2026 14:58
@github-actions github-actions Bot changed the title add mla decode kernel name prefix [Triton/Gluon] add mla decode kernel name prefix Sep 2, 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.

🟡 Changes recommended

The RoPE stage-1 kernel representation still lacks the new namespace prefix.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

Prefixes MLA decode Triton kernel representations for clearer tracing and compiled artifact names.

Changes:

  • Namespaces standard and RoPE MLA decode kernel representations.
  • Leaves the RoPE stage-1 representation unprefixed.
File summaries
File Description
aiter/ops/triton/attention/mla_decode.py Prefixes four kernel representation names.
aiter/ops/triton/_triton_kernels/attention/mla_decode_rope.py Prefixes the stage-2 RoPE representation.
Review details
  • Files reviewed: 2/2 changed files
  • Comments generated: 1
  • Review effort level: Balanced

💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Copilot AI review requested due to automatic review settings September 2, 2026 15:09

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.

🟢 Approval recommended

The representation-only renames are complete and preserve runtime behavior.

Review details
  • Files reviewed: 2/2 changed files
  • Comments generated: 0 new
  • Review effort level: Balanced

@brunomazzottiamd brunomazzottiamd 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.

LGTM!

@brunomazzottiamd
brunomazzottiamd merged commit cfc58c6 into main Sep 9, 2026
72 checks passed
@brunomazzottiamd
brunomazzottiamd deleted the satya/triton-mla-decode-kernel-name-prefix branch September 9, 2026 12:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants