Repository navigation
[FlyDSL] Dev/a4w4 prefill v2 yadai - #5934
Conversation
…_yadai # Conflicts: # aiter/configs/tuned_grouped_fmoe.csv # aiter/ops/flydsl/kernels/gemm_common_gfx1250.py # aiter/ops/flydsl/kernels/mxfp4_preshuffle_gfx1250_tdm.py
🏷️ CI GuideRuns automatically on every PR:
Extended tests (opt-in via labels):
One backend per PR: PR title tags & labels: |
Motivation
Improve FlyDSL grouped MXFP4 prefill performance on gfx1250, especially the A4W4 GEMM1 path, while preserving A8W4 support and numerical correctness. The previous implementation left substantial mainloop throughput on the table because LDS traffic, multicast topology, synchronization, and WMMA scheduling were not sufficiently overlapped.
Technical Details
cluster_m,cluster_n,cluster_m2, andcluster_n2in the tuned CSV. Supported dimensions arecluster_m in {1, 2, 4},cluster_n in {1, 2, 3, 4}, with at most 16 workgroups per cluster.EXPLICIT_VGPR_PARTITIONis enabled and the installed FlyDSL exposesfx.set_register.Test Plan
Run the representative 1536-token A4W4 kernel benchmark with zero initialization:
For nonzero correctness and performance, rerun the same command with:
Run the complete single-GPU tuned-CSV sweep:
Code-quality checks:
Test Result
Representative A4W4 shape: 64 experts, 1536 tokens, topk=8, model dimension 7168, intermediate dimension 2048, 32 iterations. Each benchmark was run twice with the GPU idle before every run. The baseline is
origin/main@475cf0f607; the PR result isd816736617.logits_diff=0,rel_l2=0)logits_diff=0,rel_l2=0)logits_diff=3.52166e-06,rel_l2=2.65393e-03)logits_diff=3.52166e-06,rel_l2=2.65393e-03)Compared with main, the PR reduces latency by 34.69% (1.53x speedup) for zero-init GEMM1 and 21.40% (1.27x) for zero-init GEMM2. With uniform inputs, it reduces latency by 36.79% (1.58x) for GEMM1 and 22.45% (1.29x) for GEMM2.
Main did not have a tuned CSV match for this shape and selected its default
tile_m=64,n_warp=4, andnum_buffers=2. The PR selected the new tuned A4W4 configuration.topk=-1and were skipped because the single-GPU runner has no EP arena.logits_diffwas4.16491e-06; maximum relative L2 error was2.88615e-03, below the1.0e-02acceptance threshold.Submission Checklist