Repository navigation
[FlyDSL] [gfx1250] Tune DeepSeek-R1 FP4 MoE tiles for high-batch decode - #6557
Conversation
🏷️ CI GuideRuns automatically on every PR:
Extended tests (opt-in via labels):
One backend per PR: PR title tags & labels: |
d7dd09e to
f43d043
Compare
128x256x256 is the right tile for the fused K7168 and K2048 GEMMs at high batch on gfx1250. For the 4096 tokens-per-rank EP shape, 3 buffers is faster than 2 (benched: GEMM1 82.6 vs 83.4 us, GEMM2 67.9 vs 69.6 us, ~0.5-4% per GEMM, accuracy PASS), so record 3 buffers there for both the 65- and 64-expert shapes; the smaller buckets keep 2 buffers. Co-authored-by: Cursor <[email protected]>
f43d043 to
1849bc5
Compare
|
The current results do not yet demonstrate that these new 128-tile configurations are selected by the default production path. The compact-plan lookup does not pass Please update the lookup so that the production path uses the intended |
The compact-plan lookup left ep_fused false, and the merged CSV stores that flag as "1.0", so the 128-tile rows never matched and the plan stayed on the 64 default. Look the scatter path up and normalize those cells, and log the row that was selected. Co-authored-by: Cursor <[email protected]>
|
The compact-plan lookup fix looks correct now: it uses Before approval, please validate the real default path on gfx1250 with all
There is no need to publish restricted gfx1250 performance numbers; a clear validation result and owner sign-off are sufficient. If the exact gfx1250 timing or throughput figures currently in the PR description are restricted, please also remove or replace them with relative or qualitative conclusions. |
Keep the fused-EP 128-tile DeepSeek-R1 rows on the a_preshuffle CSV schema so the compact-plan lookup still selects them. Co-authored-by: Cursor <[email protected]>
…M launch. The launcher cache flattens scale tensors with view(-1). Compact dispatch scales are a strided window on the wire pitch, so that view aborts before the kernel runs. Pass a rank-1 span of the same base address and let the row stride describe the pitch. Co-authored-by: Cursor <[email protected]>
|
@zufayu - Validated the default path on gfx1250 with every AITER_TDM_TILE_* override unset. Shape is DeepSeek-R1 MXFP4 (hidden 7168, intermediate 2048, topk 8), 4 ranks, 65 experts/rank, 1024 tokens/rank, 1 layer. Not DeepSeek-V4.1 Flash. Every rank logged token=4096 experts=65 ep_fused=1 tile=128x256x256 buffers=3/3. |
…7055) Rebase onto the merged global-to-local registry migration. Match all 221 kernel records exactly, update A0/mirror build-info kids and test lookups, and add a CPU-only consistency regression for all profile tables. Keep CO bytes and exported symbols unchanged; clarify historical validation IDs.
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 |
- Take main's _launch_address (ROCm#6557) for the grouped GEMM's strided scale views; drop this branch's tensor_shim.flat_arg and its test. - Port ROCm#6557's compact-plan change (ep_fused=True lookup, logged AITER_TDM_TILE_M override) to stages/dispatch_compact.py. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
…de (#6557) * [FlyDSL][gfx1250] Tune DeepSeek-R1 FP4 MoE tiles for high-batch decode. 128x256x256 is the right tile for the fused K7168 and K2048 GEMMs at high batch on gfx1250. For the 4096 tokens-per-rank EP shape, 3 buffers is faster than 2 (benched: GEMM1 82.6 vs 83.4 us, GEMM2 67.9 vs 69.6 us, ~0.5-4% per GEMM, accuracy PASS), so record 3 buffers there for both the 65- and 64-expert shapes; the smaller buckets keep 2 buffers. Co-authored-by: Cursor <[email protected]> * [FlyDSL][gfx1250] Select fused-EP MoE tiles on the compact-plan path. The compact-plan lookup left ep_fused false, and the merged CSV stores that flag as "1.0", so the 128-tile rows never matched and the plan stayed on the 64 default. Look the scatter path up and normalize those cells, and log the row that was selected. Co-authored-by: Cursor <[email protected]> * [FlyDSL][gfx1250] Keep pitched FP4 scale addresses in the grouped GEMM launch. The launcher cache flattens scale tensors with view(-1). Compact dispatch scales are a strided window on the wire pitch, so that view aborts before the kernel runs. Pass a rank-1 span of the same base address and let the row stride describe the pitch. Co-authored-by: Cursor <[email protected]> * [OPUS] Align CO tests and build metadata with local kernel IDs (#7055) Rebase onto the merged global-to-local registry migration. Match all 221 kernel records exactly, update A0/mirror build-info kids and test lookups, and add a CPU-only consistency regression for all profile tables. Keep CO bytes and exported symbols unchanged; clarify historical validation IDs. --------- Co-authored-by: Cursor <[email protected]> Co-authored-by: karverma-amd <[email protected]> Co-authored-by: demonsan <[email protected]> Co-authored-by: Satya Nikhil Kodukula <[email protected]>
…de (ROCm#6557) * [FlyDSL][gfx1250] Tune DeepSeek-R1 FP4 MoE tiles for high-batch decode. 128x256x256 is the right tile for the fused K7168 and K2048 GEMMs at high batch on gfx1250. For the 4096 tokens-per-rank EP shape, 3 buffers is faster than 2 (benched: GEMM1 82.6 vs 83.4 us, GEMM2 67.9 vs 69.6 us, ~0.5-4% per GEMM, accuracy PASS), so record 3 buffers there for both the 65- and 64-expert shapes; the smaller buckets keep 2 buffers. Co-authored-by: Cursor <[email protected]> * [FlyDSL][gfx1250] Select fused-EP MoE tiles on the compact-plan path. The compact-plan lookup left ep_fused false, and the merged CSV stores that flag as "1.0", so the 128-tile rows never matched and the plan stayed on the 64 default. Look the scatter path up and normalize those cells, and log the row that was selected. Co-authored-by: Cursor <[email protected]> * [FlyDSL][gfx1250] Keep pitched FP4 scale addresses in the grouped GEMM launch. The launcher cache flattens scale tensors with view(-1). Compact dispatch scales are a strided window on the wire pitch, so that view aborts before the kernel runs. Pass a rank-1 span of the same base address and let the row stride describe the pitch. Co-authored-by: Cursor <[email protected]> * [OPUS] Align CO tests and build metadata with local kernel IDs (ROCm#7055) Rebase onto the merged global-to-local registry migration. Match all 221 kernel records exactly, update A0/mirror build-info kids and test lookups, and add a CPU-only consistency regression for all profile tables. Keep CO bytes and exported symbols unchanged; clarify historical validation IDs. --------- Co-authored-by: Cursor <[email protected]> Co-authored-by: karverma-amd <[email protected]> Co-authored-by: demonsan <[email protected]> Co-authored-by: Satya Nikhil Kodukula <[email protected]>
Summary
128x256x256, 1x4, 2-buffer tile for both DeepSeek-R1 FP4 MoE GEMMs (K7168 and K2048).gfx1250, hidden 7168, intermediate 2048, 65 experts, topk-1, at token buckets 1024, 2048, 4096, and 32768.Serving on the 1014 image looks the grouped config up at token 32768 for steady-state decode, because the MoE arena is 32768. That is the row that selects this tile without
AITER_TDM_TILE_*. A 512 seq/GPU server also uses that arena key, so its decode tile changes with the 32768 row even though the M=512 GEMM itself is not retuned.Benchmark
Four-rank EP microbench (
bench_mega_moe.py, a4w4 MXFP4, E=256, topk=8, fused EP scatter), combined K7168+K2048:Unprofiled serving, ISL 1024 / OSL 4096, concurrency 3056 (764 seq/GPU), same tile via
AITER_TDM_TILE_*:Test plan
ep_fused=1returns tile 128x256x256 and 2 buffersAITER_TDM_TILE_*