Skip to content

[Triton/Gluon] [Config] [Perf] [gfx950] Use 1x512 Gluon MXFP4 quant tiles for M <= 2 - #6443

Merged
azaidy merged 1 commit into
ROCm:mainfrom
reger-men:gluon-mxfp4-quant-small-m-tile
Oct 13, 2026
Merged

azaidy merged 1 commit into
ROCm:mainfrom
reger-men:gluon-mxfp4-quant-small-m-tile

Conversation

@reger-men

Copy link
Copy Markdown
Contributor

Follow-up to #4383. On gfx950 a bf16 dynamic_mxfp4_quant call goes to the Gluon kernel and takes its tile from configs/gfx950/gluon/quant/mxfp4/DEFAULT.json. The M_LEQ_1 and M_LEQ_2 rows there are 1x4096 and 2x2048, which leaves batch 1 and 2 decode on very few programs (4 and 7 at N=14336) and makes M=1 slower than M=4. This changes both rows to BLOCK_SIZE_M=1, BLOCK_SIZE_N=512, 4 warps. Config only, the N <= 1024 rows and every other bucket are left alone.

I swept 1x128 to 1x2048 with 1 and 4 warps plus 8x256 and 8x512 at M=1, 2, 4 and N=4096, 14336. 1x512 with 4 warps was best or tied at every point, 8x512 is within noise of it.

MI355X, main at dd0852a, one config per process, 64 calls per cudagraph replay, median of 40 replays, clock pinned with perf_determinism at 1700 MHz (sclk CV under load 0.62%). Two runs each, interleaved main / this / main / this, us per call:

M x N main this PR
1 x 4096 4.68 / 4.64 2.66 / 2.55
1 x 14336 5.12 / 5.12 2.64 / 2.56
1 x 28672 4.91 / 4.92 2.65 / 2.68
2 x 4096 3.25 / 3.23 2.58 / 2.65
2 x 14336 3.35 / 3.34 2.67 / 2.66
2 x 28672 3.39 / 3.37 2.71 / 2.66

Over all 24 shapes I ran (M 1, 2, 4 x N 1088, 2048, 4096, 4128, 5120, 8192, 14336, 28672) M=1 goes from 4.64-5.12 to 2.50-2.68 us and M=2 from 3.08-3.68 to 2.51-2.71. M=4 isnt touched and stays at 2.55-2.80 both ways. fp4 payload and scales are byte identical to main on every shape, and op_tests/triton_tests/quant/test_quant_mxfp4.py passes with the change (79 passed, 54 skipped).

The M_LEQ_1 and M_LEQ_2 rows in the gfx950 Gluon quant config use 1x4096
and 2x2048 tiles, so a decode call at M=1 or 2 runs on a handful of
programs (4 and 7 at N=14336) and takes 4.6-5.1 us at M=1, about twice
what the M=4 bucket needs. BLOCK_SIZE_M=1, BLOCK_SIZE_N=512 with 4 warps
for both rows brings M=1 and M=2 to 2.5-2.7 us for N from 1088 to 28672.
Output bytes don't change.

Signed-off-by: adlashab <[email protected]>
@reger-men
reger-men requested a review from a team October 12, 2026 16:31
@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 (added automatically when gfx942 configs change); main branch always runs both MI35X and MI300X
ci:triton-355 Run the full Triton test suite on MI35X, not only the tests the change affects
ci:windows Windows JIT op smoke test on the gfx1201 ROCm runner
ci:multi-gpu 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: DeepSeek-V4-Pro, MiniMax-M3-MXFP4
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 6443 --add-label <label>

One backend per PR:
A PR changes one kernel backend: [Triton/Gluon] (Triton and Gluon count as one), [HIP], [ASM], [CK], [OPUS] or [FlyDSL]. If the title ends up with two backend tags, split the PR -- as stacked pull requests when one part cannot merge without the other.

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 stop the title rewrites; labels stay in sync either way.

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 focused config change matches the documented benchmark results and preserves unaffected buckets.

0 open findings

What changed in this PR

Retunes gfx950 Gluon MXFP4 quantization for small decode batches, increasing parallelism and reducing latency.

Changes:

  • Uses 1×512 tiles with four warps for M=1 and M=2 when N>1024.
  • Leaves all other configuration buckets unchanged.
File Description
aiter/​ops/​triton/​configs/​gfx950/​gluon/​quant/​mxfp4/​DEFAULT.json Retunes the M≤2 Gluon MXFP4 configurations.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@azaidy
azaidy self-requested a review October 12, 2026 17:49
@azaidy azaidy self-assigned this Oct 12, 2026

@azaidy azaidy 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!

@zufayu
zufayu requested review from a team and azaidy October 13, 2026 01:40

@azaidy azaidy 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!

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.

3 participants