Repository navigation
[Triton/Gluon] [Config] gfx950 a16w16 N=2880 K=4096: retune M_LEQ_4 to avoid Triton 3.8 VGPR spill (gpt-oss-20b o_proj decode) - #6680
Conversation
…d Triton 3.8 VGPR spill The M_LEQ_4 entry (BM16 BN16 BK512, num_warps=8, num_stages=2, waves_per_eu=8) is the gpt-oss TP1 o_proj decode shape. Under Triton 3.8.0 it compiles with 2x the LDS and spills 20 VGPRs because of the waves_per_eu=8 register cap, running 20.6-21.0 us instead of 8.9 us on Triton 3.7.1. That costs gpt-oss-20b about 7% at conc 1 between the vLLM v0.30.0 and v0.31.0 ROCm images. Use num_warps=4, waves_per_eu=0: 7.0-8.0 us on Triton 3.8.0 and 7.6-8.3 us on 3.7.1 at M=1-4 (aiter main, MI350X), no spill, same max error. M>4 buckets are unchanged. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_012XYVab4mQWCMPp2QoPkThy
🏷️ 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
Human review must confirm the reported gfx950 correctness and performance results for both consuming kernels.
No open issues 🎉
What changed in this PR
Retunes the gfx950 Triton A16W16 GEMM configuration to address the reported Triton 3.8 register-spill regression during gpt-oss decode.
Changes:
- Sets
num_warps=4andwaves_per_eu=0forM_LEQ_4at N=2880, K=4096. - Leaves other fields, buckets, and the Gluon backend unchanged.
| File | Description |
|---|---|
aiter/ops/triton/configs/gfx950/triton/gemm/gemm_a16w16/GEMM-A16W16-N=2880-K=4096.json |
Retunes two launch parameters for small-M GEMM. |
Review effort: Balanced
Title
[Triton] [Config] gfx950 a16w16 N=2880 K=4096: retune M_LEQ_4 to avoid Triton 3.8 VGPR spill (gpt-oss-20b o_proj decode)
Purpose
configs/gfx950/triton/gemm/gemm_a16w16/GEMM-A16W16-N=2880-K=4096.jsonis the gpt-oss-20b TP1o_projshape. ItsM_LEQ_4entry (BM16 BN16 BK512,num_warps=8,num_stages=2,waves_per_eu=8) regressed 2.3x going from Triton 3.7.1 to Triton 3.8.0:waves_per_eu=8register cap that spills 20 VGPRs (84 B scratch). Triton 3.7.1 builds the same config in 60 VGPRs with no spill.That one entry causes a −7% conc 1 serving regression for gpt-oss-20b on MI355X/MI350X between
vllm/vllm-openai-rocm:v0.30.0(Triton 3.7.1) andv0.31.0(Triton 3.8.0).This PR sets
M_LEQ_4tonum_warps=4, waves_per_eu=0. Every other field and bucket is unchanged.Test results
Kernel, µs per call at M=1–4:
M_LEQ_4configCompiled kernel for the current entry:
Serving, gpt-oss-20b TP1, MI350X (output tok/s):
Numerics: max abs error vs an fp32 reference is 0.0152–0.0156 at M=1–4 with this PR on both Tritons, the same as the current entry (bf16 rounding).
Who else reads this entry
get_gemm_configloadsGEMM-A16W16-N={N}-K={K}.jsononly on an exact N and K match, and otherwise falls back toDEFAULT.json. Only theM_LEQ_4bucket changes, so only calls with M ≤ 4, N=2880 and K=4096 on gfx950 are affected. The Gluon backend reads its own config directory and is untouched.gemm_a16w16(measured above);fused_gemm_a16w16_quant_x. It is not called by vLLM 0.31 or the current vLLM nightly. Onmainat N=2880, K=4096 it is also faster with this PR: 21.97–22.33 → 6.58–7.92 µs at M=1–4, with the same max error.config.jsonfor common open families), only gpt-oss has any dimension equal to 2880×TP for TP 1/2/4/8. So this shape is the TP1o_projof gpt-oss-20b, gpt-oss-120b andamd/gpt-oss-120b-w-mxfp4-a-fp8. gpt-oss-120b TP1 uses the identical shape, so it gets the same kernel speedup. That was not measured end to end.AI assistance (Claude) was used to triage, measure and draft this change. All changes reviewed.