Repository navigation
[Triton/Gluon] [Config] Add gfx1200 and gfx1201 Triton MHA configs - #6374
Conversation
🏷️ CI GuideRuns automatically on every PR:
Extended tests (opt-in via labels):
One backend per PR: PR title tags & labels: |
|
@azaidy @brunomazzottiamd could you take a look when you have a moment? Same pattern as #4493 and #5997. Data only, no code changes. |
There was a problem hiding this comment.
🟡 Changes recommended
The new seeding convention must be synchronized with the repository’s Triton README and review instructions.
1 open finding
What changed in this PR
Adds seeded Triton MHA configurations so gfx1200 and gfx1201 can resolve and run the existing attention kernels.
Changes:
- Adds gfx1200 and gfx1201 MHA defaults, byte-identical to gfx1101.
- Documents the new architecture-seeding relationship.
| File | Description |
|---|---|
configs/gfx1200/.../DEFAULT.json |
Adds gfx1200 MHA tuning defaults. |
configs/gfx1201/.../DEFAULT.json |
Adds gfx1201 MHA tuning defaults. |
configs/CLAUDE.md |
Documents the new seeding rule. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
395f60b to
2bdeb15
Compare
2bdeb15 to
b80594a
Compare
|
I'm resolving conflicts and rebasing in the meantime. |

Motivation
aiter.ops.triton.attention.mha.flash_attn_funcdoes not run on gfx1200 or gfx1201 (RDNA4). These archs have noconfigs/<arch>/triton/attention/mha/DEFAULT.jsonfile. The default path raisesFileNotFoundErrorbefore it compiles a kernel.Technical Details
This PR copies the gfx1101 MHA config from #4493 to
gfx1200/triton/attention/mha/andgfx1201/triton/attention/mha/. The copies are byte identical. The PR also adds this seed to the allowed seeds inconfigs/AGENTS.mdand in.github/instructions/aiter-ops-triton.instructions.md. There are no code changes.The gfx1200 config is measured. A sweep tested 108 tiles (BLOCK_M x BLOCK_N x num_warps x num_stages) for
fwd/defaultat head_dim 128 andfwd/small_headat head_dim 64. Then 10 interleaved repeats compared the best tiles on nine shapes. No tile was faster than the gfx1101 entries on all shapes. Each alternative won on some shapes and lost on others by 1-5%. The gfx1151 file is 62% slower at head_dim 128.gfx1201 is not measured. Its file is a seed. Replace it with tuned values when gfx1201 hardware is available.
Test Plan
Windows 11, RX 9060 XT (gfx1200), torch 2.16.0a0+rocm10.2.0a20261007, triton-windows 3.8.0.post28.
op_tests/triton_tests/attention/test_mha.pywithout the gluon cases, in forward, varlen and backward chunks.Test Result
test_mha.py: 1126 passed, 146 skipped, 0 numerical failures. 41 cases ran out of memory in the reference implementation on this 16 GB card. Each needs one allocation of 3.75-37.5 GiB at batch 30/50, seqlen 2048.Flux 1024px attention (head_dim 128) takes 6.07 ms with this config and 9.87 ms with the gfx1151 entry. Triton MHA is 1.5-2.3x faster than SDPA on causal GQA prefill. On diffusion shapes, the two are approximately equal.
Submission Checklist