Repository navigation
[Triton/Gluon] [Config] [Perf] [gfx950] Use 1x512 Gluon MXFP4 quant tiles for M <= 2 - #6443
Conversation
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]>
🏷️ CI GuideRuns automatically on every PR:
Extended tests (opt-in via labels):
One backend per PR: PR title tags & labels: |
There was a problem hiding this comment.
🟢 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.
Follow-up to #4383. On gfx950 a bf16
dynamic_mxfp4_quantcall goes to the Gluon kernel and takes its tile fromconfigs/gfx950/gluon/quant/mxfp4/DEFAULT.json. TheM_LEQ_1andM_LEQ_2rows 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:
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.pypasses with the change (79 passed, 54 skipped).