Repository navigation
[Config] Add gfx950 a4w4 GEMM configs for Qwen3.8-2.4T GDN in_proj_qkvz at TP8 - #7441
Conversation
N=4608, K=8192, 26 values of M from 1 to 16384, tuned with gemm_a4w4_blockscale_tune.py. An ASM kernel wins at every M, with error ratio 0. vLLM's AITER MXFP4 linear takes the ASM FP4 GEMM only for shapes tuned here, so this projection moves off the Triton GEMM. Signed-off-by: Mikko Tukiainen <[email protected]> Co-authored-by: Cursor <[email protected]>
🏷️ CI GuideRuns automatically on every PR:
Extended tests (opt-in via labels):
One backend per PR: PR title tags & labels: |
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 |
Summary
Adds gfx950 a4w4 GEMM configs for N = 4608, K = 8192, the GDN
in_proj_qkvzof Qwen3.8-2.4T-A95B at TP8. No code changes.Motivation
The projection runs as an MXFP4 GEMM on 65 of the model's 92 layers, and AITER has no a4w4 tuning for its shape. vLLM's AITER MXFP4 linear only takes the ASM FP4 GEMM (
gemm_a4w4) for shapes tuned in AITER's a4w4 configs, so the projection stays on the Tritongemm_afp4wfp4, which is up to 4.9x slower at prefill sizes.Changes
aiter/configs/model_configs/qwen38_2p4t_a4w4_blockscale_{un,}tuned_gemm.csvadd gfx950 (256 CU) entries for N = 4608, K = 8192 at 26 values of M from 1 to 16384, tuned withgemm_a4w4_blockscale_tune.py. An ASMf4gemm_bf16_per1x32Fp4_BpreShufflekernel wins at every M, with error ratio 0.(gfx, cu_num, M, N, K)keys.gemm_a4w4and M ≤ 64 on the Triton preshuffled GEMM, whose config for this shape is already in AITER.Performance (if applicable)
N = 4608, K = 8192, us. Before: Triton
gemm_afp4wfp4, the path vLLM takes without these configs, timed withbench_gemm_afp4wfp4.py. After: tuned ASMgemm_a4w4, timed by the tuner.Testing
Documentation
Tuned config rows only; no API or behavior change.
Dependencies
Breaking Changes
None.
PR Self-Review
Reviewed revision
2b91ef3
Behavior and intent
get_GEMM_confignow returns a tuned ASM kernel for gfx950 a4w4 GEMMs with N = 4608, K = 8192, where it previously returned nothing. vLLM then routes that shape's M > 64 calls from the Triton FP4 GEMM to the faster ASMgemm_a4w4.Validation and unverified scope
MI355X (gfx950, 256 CU). Configs produced with
gemm_a4w4_blockscale_tune.pyon the untuned CSV; every winner has error ratio 0. Loaded the merged a4w4 tables throughget_config_file: 8 files, 2636 rows, no duplicate keys. Triton baseline:python op_tests/op_benchmarks/triton/bench_gemm_afp4wfp4.py --shape M 4608 8192 --metric timefor M = 256, 1024 and 8192.Unverified: other architectures and CU counts have no entries and keep their current kernels. End-to-end model throughput is measured on the vLLM side.
PR-specific question
The rows are keyed by
(gfx, cu_num, M, N, K)= (gfx950, 256, M, 4608, 8192), so only that arch, CU count and shape select them; other lookups are unaffected. Each row names a kernel that the tuner ran and checked against the reference on that hardware.Changed op tests
None.
Co-authored-by: Cursor [email protected]