Repository navigation
[Triton] Retune gfx942 a16w4 DSv4.1 tiles for Triton 3.8 - #6286
frida-andersson wants to merge 2 commits into
Conversation
The ROCm#5667 gfx942 rows were selected on Triton 3.7. Under Triton 3.8 the Flash TP4 shapes want kpack=2 on the block_m<=32 fallback, a narrower matrix instruction on bm128_n5120_k768, and the 128x128 4-warp tile on the two bm64 Flash rows. Signed-off-by: Frida Andersson <fanderss@amd.com>
🏷️ CI GuideRuns automatically on every PR:
Extended tests (opt-in via labels):
One backend per PR: PR title tags & labels: |
|
|
Routing inferred from Caveat: Tested on MI300X with uniform synthetic routing. The PR measured MI325X with real traffic. Skip this report if the setup is invalid
|
|
The changes cause |
Triton 3.6 fails LLVM lowering of that tile when matrix_instr_nonkdim is 16. Triton 3.8 is faster with 16, so older versions stay on 32. Signed-off-by: Frida Andersson <fanderss@amd.com>
|
@anhminhnguyenhoang thanks for your review! Isolated w1 and w2 on one MI325X (gfx942), Triton 3.8.0, round-robin top-k. 384 experts top-6 and 385 top-7. Sizes from your table: w1 N=1536 K=5120, w2 N=5120 K=768. The baseline is
Inside the round spread: M=12 w2 (19% and 28% on #5667), 384 M=256 w1 (head 14%), 384 M=1536 w2 (14%), 385 M=1024 w2 (13%), 385 M=4096 w2 (10%). On MI300X, w2 at 384/16384, 385/1536, and 385/16384 was +9.7%, +6.0%, and +8.7%. Here those are −15.0%, −10.0%, and −11.9%, with smaller spreads.
HIP_VISIBLE_DEVICES=0,1,2,3 vllm serve deepseek-ai/DeepSeek-V4.1-Flash \
--tensor-parallel-size 4 \
--moe-backend aiter_triton_mxfp4_bf16 \
--profiler-config.profiler=torch \
--profiler-config.torch_profiler_dir=/tmp/trace
vllm bench serve --profile \
--dataset-name random \
--num-prompts 2 \
--input-len 262144 \
--output-len 1024 |
Summary
Retune the gfx942 A16W4 MoE launches added by #5667 for Triton 3.8.
For the DeepSeek-V4.1-Flash TP4 shapes:
kpack=2for the dynamicblock_m <= 32fallback while preserving its existingblock_nshrink.bm128_n5120_k768to one stage, waves=0,matrix_instr_nonkdim=16, andkpack=2.bm64rows to the 128x128, 4-warp, one-stage tile.bm128_n1536_k5120unchanged from [Triton/Gluon] Add a16w4 MoE tuned dispatch and gfx942 DSv4.1 tables #5667.Results
Measured on MI325X/gfx942 with Triton 3.8.0. Values are medians for the combined w1 and w2 A16W4 GEMMs:
A profiled DeepSeek-V4.1-Flash TP4 serve measured
_moe_gemm_a16w4at 236.204 us over 22,102 launches. The corresponding Triton 3.7.1 image measured 236.425 us over the same number of launches.Test configuration
aiter_triton_mxfp4_bf16Made with Cursor