Repository navigation
[Config] [Perf] Add gfx950 bf16 GEMM configs for Qwen3.8-Flash-Next - #6201
Conversation
175 gfx950 / cu_num=256 rows for the bf16 GEMMs Qwen3.8-Flash-Next runs at TP1, TP2, TP4 and TP8, appended to the existing qwen38_flash_next_bf16_tuned_gemm.csv next to its gfx942 rows (ROCm#5974). No shape key overlaps any table on main. Backends are flydsl, triton and asm only (no hipBLASLt or opus). Each row is the fastest candidate within err_ratio <= 0.005 and beats the current fallback by at least 1.02x on the same build; shapes where nothing did are left out so they keep the default path. The swept shapes are appended to qwen38_flash_next_bf16_untuned_gemm.csv. Measured under vLLM on amd/Qwen3.8-Flash-Next-Quark-MXFP4, TP2, MI355X, arms differing only by this table, three interleaved repeats: 8k/1k output throughput +2.4% at c=16 and +1.4% at c=64 (TPOT -2.8% / -2.0%), 60k/600 c=4 -0.6%. GSM8K unchanged (exact McNemar p >= 0.26 in every repeat). Signed-off-by: Mikko Tukiainen <Mikko.Tukiainen@amd.com> Co-authored-by: Cursor <cursoragent@cursor.com>
🏷️ CI GuideRuns automatically on every PR:
Extended tests (opt-in via labels):
One backend per PR: PR title tags & labels: |
What this adds
175 gfx950 rows (cu_num=256, MI355X) for the bf16 GEMMs Qwen3.8-Flash-Next (
amd/Qwen3.8-Flash-Next-Quark-MXFP4) executes that AITER has no tuned entry for, at TP1, TP2, TP4 and TP8. They are appended to the existingaiter/configs/model_configs/qwen38_flash_next_bf16_tuned_gemm.csv, next to its 74 gfx942 rows from #5974; the shape key includesgfxandcu_num, so the two sets do not interact.check_aiter_table_duplicatesagainst main: no candidate key is owned by any other table.TP1, TP2 and TP4 shapes were collected from server logs; TP8's were derived from the model config, after checking that the same derivation reproduces the three collected sizes.
No row uses hipBLASLt or opus.
in_proj_bain_proj_bain_proj_bain_proj_bain_proj_qkvzin_proj_qkvzin_proj_qkvzin_proj_qkvzand QSAqkv_proj+ gate (same shape at TP8)qkv_proj+ gateqkv_proj+ gateqkv_proj+ gateout_projand QSAo_projout_projand QSAo_projout_projand QSAo_projindex_qk_projkey_projvalue_projlm_headlm_headlm_headAt TP1,
out_proj/o_proj(N=2560, K=6144) is already served by an existing table and was not re-tuned.The swept shapes are appended to
qwen38_flash_next_bf16_untuned_gemm.csv(232 new shapes), so the table can be re-tuned without reconstructing them.Why these backends are safe to check in
flydslkernelNametritonsolidx=0,kernelName=autoasmkernelName+splitKEvery row beats the current fallback
Each row is the fastest candidate within
err_ratio <= 0.005and beats the fallback that would otherwise run, by at least 1.02x, on the same build. Shapes where nothing portable won are absent, so they keep the default path. Prefill families were swept at M = 8 … 16384 (powers of two),lm_headat M = 8 … 512.121 of the 175 rows are exactly
err_ratio0.0; the largest is 0.0049. 28 rows use split-K (all flydsl), 25 of them not bit-exact, concentrated in the narrow-N families (N=12, 24, 48, 96) at small M.The 28 split-K rows
Coverage
The lookup tries
gl in [None, 0, 1]: exact M, then the two padded buckets fromget_padded_m. All 175 rows resolve throughget_GEMM_A16W16_configin the image under test, with nothing shadowed by another table. Replayed against the shapes the collection runs logged (8k/1k at c=4, 64 and 256; 60k/600 and 128k/256), alltorch.bfloat16in and out,bias=False,scaleAB=False,bpreshuffle=False:At TP2, the configuration measured end to end below:
in_proj_bain_proj_qkvzqkv_proj+ gateout_proj/ QSAo_projindex_qk_projkey_projvalue_projlm_headN=320, 336 and 513 are 0% because nothing portable beat the fallback there. The 9 remaining TP2 shapes (N or K of 1152, each seen once or twice) are not decoder GEMMs and were not tuned.
Tuning shapes were collected at
max_num_batched_tokens=16384andmax_num_seqs=256, the same values the A/B servers ran with.End-to-end effect
Serving A/B under vLLM (
vllm/vllm-openai-rocm:nightly-21d93d0d, AITER v0.1.24.post1) onamd/Qwen3.8-Flash-Next-Quark-MXFP4, TP2 on MI355X, arms differing only by this table. Three repeats, the two arms running side by side on separate GPU pairs and swapping pairs each repeat, a fresh server per arm and repeat, the same seeded prompts in both arms.Geometric mean over the clean cases: output throughput +0.9%, mean TPOT −1.3%, mean TTFT +0.6% (8 paired cases).
The deltas are geometric means of per-repeat tuned/stock ratios.
TP1, TP4 and TP8 rows ship on the kernel-level evidence above; the end-to-end A/B is TP2 only.
Accuracy. GSM8K, 5-shot, 1319 problems, greedy, flexible-extract, the same three runs:
Submission Checklist
Co-authored-by: Cursor cursoragent@cursor.com