Repository navigation
[Triton/Gluon] [Config] MoE and MLA configs for gfx1101, gfx1150 and gfx1151: sparse_mla_dsv4_train, sonicmoe - #6158
Conversation
Signed-off-by: Martin Domanský <[email protected]>
🏷️ CI GuideRuns automatically on every PR:
Extended tests (opt-in via labels):
One backend per PR: PR title tags & labels: |
The values are the gfx942 entries, written out in the gfx1101 files; a search on gfx1101 did not beat them on every measured shape. Signed-off-by: Martin Domanský <[email protected]>
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
The description covers an unrelated operation, and the PR combines three independently validated tuning concerns.
Review effort: Balanced
Findings: 2
Open (2)
What changed in this PR
Adds gfx1101 Triton configurations for sparse MLA and two MoE kernel families.
Changes:
- Adds sparse MLA forward/backward tuning.
- Adds MXFP8 MoE GEMM and SonicMoE configurations.
| File | Description |
|---|---|
.../sonicmoe_bf16/DEFAULT.json |
Adds gfx1101 SonicMoE settings. |
.../mxfp8_fnuz/DEFAULT.json |
Adds gfx1101 MXFP8 GEMM tiles. |
.../sparse_mla_dsv4_train/DEFAULT.json |
Adds gfx1101 MLA training tiles. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
sparse_mla_dsv4_train is tuned on gfx1150 (Radeon 890M): the forward kernel takes BLOCK_H 16, BLOCK_K 16 and 8 warps, the backward kernel the gfx1101 values, as no other candidate was faster. moe_gemm_mxfp8 and sonicmoe carry the gfx942 entries; a search on gfx1150 did not beat them on every measured shape. The gfx1151 files are copies of gfx1150 (same RDNA 3.5 generation); only the sonicmoe _comment differs. They are not measured: no gfx1151 hardware was available. Signed-off-by: Martin Domanský <[email protected]>
|
The description was replaced by the text of an unrelated draft by mistake; it now covers the files in this PR. A second commit adds the gfx1150 tables, measured on a Radeon 890M, and copies them to gfx1151. On splitting: all three are data-only config tables for the Triton backend, with no kernel, loader or test change, and each is validated separately in the description. If the maintainers prefer one PR per config family, I will split it. |
|
@Ragua1 Can you verify each added config compiles correctly for given arch? You can do targeted compilation if you dont have the HW. I wanna make sure we are not introducing a config that cant compile. |
moe_gemm_mxfp8 was removed in ROCm#6035, and nothing on main reads configs/<arch>/triton/moe/mxfp8_fnuz any more, so these three tables would have no reader. Signed-off-by: Martin Domanský <[email protected]>
Yes, every added config compiles for its arch. Verified on
The gfx1151 files are a copy of gfx1150, not tuned on gfx1151 hardware. They can stay so the entry points work on gfx1151, or be dropped and left to a separate PR. Please state which you prefer.
|
Review of 2026-10-21 on ROCm#6158: the _comment fields in the gfx1101 and gfx1150 sonicmoe_bf16 tables name the architecture only.
Review of 2026-10-23 on ROCm#6158 (azaidy): no comments in config files. Drops the _comment key from the gfx1101, gfx1150 and gfx1151 sonicmoe_bf16 tables. Values unchanged.
NOT READY FOR HUMAN REVIEWPR Self-ReviewRevision Waiting for the PR author. The readiness report will appear after the self-review answers are complete for this revision. Questions to answer in the PR description
Edit the Missing or invalid answers
Shadow mode reports what would block but keeps the status successful. Set |
…gfx1151: sparse_mla_dsv4_train, sonicmoe (ROCm#6158) * Add sparse_mla_dsv4_train Triton config for gfx1101 Signed-off-by: Martin Domanský <[email protected]> * Add moe_gemm_mxfp8 and sonicmoe Triton configs for gfx1101 The values are the gfx942 entries, written out in the gfx1101 files; a search on gfx1101 did not beat them on every measured shape. Signed-off-by: Martin Domanský <[email protected]> * Add MoE and MLA Triton configs for gfx1150 and gfx1151 sparse_mla_dsv4_train is tuned on gfx1150 (Radeon 890M): the forward kernel takes BLOCK_H 16, BLOCK_K 16 and 8 warps, the backward kernel the gfx1101 values, as no other candidate was faster. moe_gemm_mxfp8 and sonicmoe carry the gfx942 entries; a search on gfx1150 did not beat them on every measured shape. The gfx1151 files are copies of gfx1150 (same RDNA 3.5 generation); only the sonicmoe _comment differs. They are not measured: no gfx1151 hardware was available. Signed-off-by: Martin Domanský <[email protected]> * Drop the mxfp8_fnuz configs for gfx1101, gfx1150 and gfx1151 moe_gemm_mxfp8 was removed in ROCm#6035, and nothing on main reads configs/<arch>/triton/moe/mxfp8_fnuz any more, so these three tables would have no reader. Signed-off-by: Martin Domanský <[email protected]> * Drop the model names from the sonicmoe config comments Review of 2026-10-21 on ROCm#6158: the _comment fields in the gfx1101 and gfx1150 sonicmoe_bf16 tables name the architecture only. * Remove the _comment fields from the sonicmoe config tables Review of 2026-10-23 on ROCm#6158 (azaidy): no comments in config files. Drops the _comment key from the gfx1101, gfx1150 and gfx1151 sonicmoe_bf16 tables. Values unchanged. --------- Signed-off-by: Martin Domanský <[email protected]>
configs/gfx1100/triton/attention/sparse_mla_dsv4_train/DEFAULT.json: the forward tile (16 x 16, 2 warps, 1 stage) and the backward tile (16 x 16, 2 warps), measured on a Radeon PRO W7900D over the benchmark's DSV4 shapes and the shapes of #6158. gfx1100 runs this op with the in-code fallbacks today; the file is 3.6x to 7.6x faster forward and 1.1x to 1.9x backward on every measured shape. Signed-off-by: Lin, KuanTing <[email protected]>


Motivation
Two Triton entry points have no table for gfx1101, gfx1150 or gfx1151 on
main:sparse_mla_dsv4_trainruns with the in-code fallback (_FWD_FALLBACK,_BWD_FALLBACK).sonicmoeraisesFileNotFoundError: SonicMoE has no BF16 Triton config for architecture <arch>.This PR adds the two tables for gfx1101 (Radeon RX 7800 XT) and gfx1150 (Radeon 890M), each measured on its card, and copies the gfx1150 tables to gfx1151. Data only; no kernel, loader or test code is changed. Every value is written out in each architecture's file; nothing is read from another architecture at run time.
Technical Details
aiter/ops/triton/configs/<arch>/triton/attention/sparse_mla_dsv4_train/DEFAULT.jsonmoe/sonicmoe_bf16/DEFAULT.json_commentdiffers from gfx942gfx1151 gets the gfx1150 files; only the
sonicmoe_commentdiffers. gfx1150 and gfx1151 are the same RDNA 3.5 generation, andunified_attentionalready reads gfx1151 tables for gfx1150 (_ARCH_ALIASinunified_attention_utils.py). The gfx1151 copies are not measured: no gfx1151 hardware is available here.sparse_mla_dsv4_train:_sparse_mla_fwd_kernelBLOCK_H32,BLOCK_K32, 4 warps, 2 stagesBLOCK_H64,BLOCK_K16, 8 warps, 1 stageBLOCK_H16,BLOCK_K16, 8 warps, 1 stage_bwd_kernelsBLOCK_H16,BLOCK_K32, 4 warpsBLOCK_H16,BLOCK_K16, 4 warpsFor
sonicmoethe search covered the medium and large buckets of_grouped_gemm_kerneland_grouped_gemm_dw_kernel. The other entries (small buckets,token_gather_sum_kernel,db2_and_ds_kernel) are the gfx942 values, checked by the tests below but not searched.Test Plan
gfx1101 and gfx1150, Windows 11, TheRock ROCm 10.2 (
torch 2.15.0a0+rocm10.2.0a20260926, HIP 7.17), Triton 3.8.0, aitermain@1eb7de55.test_sparse_mla_dsv4_train.py(all 18 cases) andtest_sonicmoe.py(all 25 cases), without and with the tables, on both cards.Test Result
Correctness, the same on gfx1101 and on gfx1150:
test_sparse_mla_dsv4_train.pytest_sonicmoe.pyFileNotFoundError, no BF16 config), 1 skippedsparse_mla_dsv4_trainon gfx1101, ratio = fallback time / this PR's time per process; min / median / max over 5 processes:sparse_mla_dsv4_trainon gfx1150 (Radeon 890M, an iGPU whose timings move with load, so the ratios come from 10 interleaved rounds). Ratio = fallback time / this PR's time per round; min / median / max over 10 rounds, best and worst trimmed:The gfx1101 forward values run on gfx1150 too, but the gfx1150 values are 1.342 and 1.187 times faster than them on the two shapes. On gfx1150
sonicmoebehaves as on gfx1101: no candidate beat the gfx942 entry on every shape, so it is kept.Only gfx1101 and gfx1150 were measured. The gfx1151 files are copies of gfx1150, not measured; the values are not proposed for any other architecture.