Repository navigation
[Triton/Gluon] [Config] Add gfx950 preshuffled AFP4WFP4 GEMM configs for DeepSeek MXFP4 TP8 dense shapes - #6683
Conversation
…shapes N=4608 K=7168 (dense gate_up) and N=7168 K=2304 (dense down), tuned per bucket with a cold cache and checked bit-identical to gemm_a4w4. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01UEcwArwDyBnrmqvBEoK583 Signed-off-by: Andy Friedrich <[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.
🔵 Needs a closer look
The reported GPU correctness and latency results need human confirmation because they were not independently validated on gfx950.
No open issues 🎉
What changed in this PR
Adds gfx950 tuning configs for two DeepSeek-family MXFP4 dense TP8 shapes, supporting preshuffled GEMM selection in vLLM without kernel code changes.
Changes:
- Adds configs for gate_up (4608×7168) and down (7168×2304).
- Provides eight M buckets and an
anyfallback for each shape.
| File | Description |
|---|---|
| aiter/ops/triton/configs/gfx950/triton/gemm/gemm_afp4wfp4_preshuffled/GEMM-AFP4WFP4_PRESHUFFLED-N=7168-K=2304.json | Adds dense down tuning configs. |
| aiter/ops/triton/configs/gfx950/triton/gemm/gemm_afp4wfp4_preshuffled/GEMM-AFP4WFP4_PRESHUFFLED-N=4608-K=7168.json | Adds dense gate_up tuning configs. |
Review effort: Balanced
Motivation
vLLM (vllm-project/vllm#61278) puts an MXFP4 linear on the preshuffled layout (ASM
gemm_a4w4for prefill,gemm_afp4wfp4_preshufflefor M ≤ 64) only when aiter has tuned configs for both. The DeepSeek-architecture MXFP4 checkpoints (DeepSeek-R1-0528, DeepSeek-V3.2, Kimi-K2.6) share the same dense TP8 shapes, which have tuned a4w4 rows but no preshuffled Triton configs, so they stay on the plain Triton GEMM. Forcing the preshuffled layout without these configs speeds up prefill but costs ~10% decode.Technical Details
Adds configs for 4608×7168 (dense gate_up) and 7168×2304 (dense down) in
configs/gfx950/triton/gemm/gemm_afp4wfp4_preshuffled/. No code changes.gemm_a4w4. Each bucket's pick was re-timed against the plain Triton config for the same bucket.Test Result
MI350X,
vllm/vllm-openai-rocm:nightly(Triton 3.8.0+git669b31ac, aiter 0.1.24.post1). The preshuffle kernel there matches this branch's base.Kernel
µs per call, including activation quant: this config / plain Triton / ASM
gemm_a4w4(geomean over the listed M). The output is bit-identical togemm_a4w4at every point.End to end
vLLM + vllm-project/vllm#61278, TP8,
--load-format dummy, random 1024/1024, 2 restarts per arm. Change vs. plain Triton:With these configs vLLM moves 2 of the 4 dense shapes to the preshuffled layout; before, forcing that layout cost ~10% decode on these models. Prefill improves slightly, and decode is within ±0.6% at every concurrency. Including 512×7168 would have regressed Kimi c128 decode by ~3%.
GSM8K (DeepSeek-R1-0528-MXFP4, 5-shot, 250 problems, flexible-extract): 0.972 → 0.960 (±0.012).
AI assistance (Claude) was used for tuning, benchmarking and drafting. All changes reviewed.