Skip to content

tune(ep/v2): FlyDSL MI300X EP8 schedules - #1001

Merged
jhchouuu merged 4 commits into
mainfrom
jiahzhou/mi300x-flydsl-ep8
Nov 14, 2026
Merged

jhchouuu merged 4 commits into
mainfrom
jiahzhou/mi300x-flydsl-ep8

Conversation

@jhchouuu

@jhchouuu jhchouuu commented Nov 13, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

The FlyDSL backend, which is the default V2 backend on gfx942, had no MI300X table. Every shape and token count ran one CU-scaled geometry: dispatch 304 blocks × 16 warps, combine 256 × 4. This PR:

  • adds per-bucket MI300X EP8 schedules up to 16384 tokens for the shapes in the table below, for BF16 and FP8 dispatch (256/6 shares the 384/6 schedule);
  • makes the 256/8 hidden-7168 BF16 schedule the MI300X default schedule. The single-shot geometry, which the scatter (quantized) combine and StdMoE use, stays at the untuned 304 × 16 / 256 × 4;
  • adds a test that every device's schedules have ascending ceilings ending in None, and that the schedules and the single-shot geometry fit the CU count, the combine flag slots and 1024 threads. test_tuning_configs.py was not run by any CI job; it now runs in the CCO CPU check step.

How the schedules were chosen

  • One node of 8 MI300X, ROCm 7.14, FlyDSL 0.4.0, each rank pinned to four cores on its GPU's NUMA node. bench_ep.py, graph mode with events recorded inside the graph between the phases, random routing (top-k distinct experts per token), BF16 combine, scale_dim=0.
  • Sweep.
    • Dispatch: blocks 32–304 × warps 4, 8, 16.
    • Combine: blocks 32–256 × warps 2, 4, 8, 16.
    • Each run pins one dispatch and one combine candidate and times T = 16–4096 in one process, with capacity 4096.
    • A second sweep times T = 8192 and 16384 with capacity 16384, over dispatch blocks 64–304 × warps 4, 8, 16 and combine blocks 32–256 × warps 4, 8, 16.
  • Pick. Each bucket takes its fastest dispatch and fastest combine. When the previous bucket's pick is within 2% of the fastest, it is kept instead, to keep fewer variants.
  • A/B. Old vs new table, one token count per process, with capacity equal to the token count. A bucket above 4096 was kept only where this A/B was faster at both 8192 and 16384; elsewhere the 4096 bucket covers the larger counts.

Results: D+C change, new vs old table (EP8)

Shape BF16, T16–256 BF16, T512–4096 FP8, T16–256 FP8, T512–4096
256/8 H7168 −18% to −9% −31% to −21% −18% to −13% −37% to −26%
264/9 H7168 −20% to −10% −35% to −25% −22% to −13% −42% to −29%
256/8 H6144 −14% to −4% −33% to −22% −14% to −8% −38% to −26%
384/6 H7168 −16% to −13% −30% to −19% −19% to −13% −36% to −22%
384/6 H5120 −17% to −9% −29% to −23% −17% to −10% −34% to −27%
256/6 H7168 −19% to −7% −31% to −19% −23% to −9% −36% to −22%
896/16 H3584 −20% to −18% −26% to −13% −23% to −17% −32% to −18%
  • No cell got slower, and every run passed bench_ep.py's dispatch and combine checks.
  • At T8192 and T16384, the buckets above 4096 make 384/6 H5120 2.1–5.0% faster and 896/16 BF16 1.2% faster than staying on the 4096 bucket. For 384/6 H7168 the sweep's picks above 4096 measured −0.6% to +0.3% in the A/B and were dropped; for the other shapes the sweep picked the 4096 geometry.
  • EP4 runs the new default schedule. On 256/8 H7168 at T16, T128, T1024 and T4096 it is 3–12% faster with BF16 and 5–16% faster with FP8.

From T256 to T16384 FlyDSL is 0–16% slower than the HIP backend with the table from #999, mostly in combine, except 896/16 at T256–512, where it is up to 9% faster. No geometry in the sweep closes the gap.

Testing

test_tuning_configs.py passes.

🤖 Generated with Claude Code

- MI300X FlyDSL table: per-bucket schedules for 256/8 and 264/9 at hidden 7168, 256/8 at 6144, top-6 at 7168 and 5120, and 896/16 at 3584, BF16 and FP8
- MI300X default schedule replaces the CU-scaled single-shot fallback
- Test that every device schedule is ascending and fits the CU count, combine flag slots and 1024 threads
- Run test_tuning_configs.py in the CCO CPU check step

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@github-actions

github-actions Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

GPU CI for 9081d017 (run): changed areas: ci_cco, epv2

lane runs jobs
mori no MI355X intranode, MI355X ROCm 7.14, MI355X JAX, MI355X internode
mi300x no MI300X intranode, MI300X internode
umbp no UMBP unit test
cco yes CCO unit test, CCO EPv2 single-node test, CCO internode
fused yes CCO fused GEMM test
build yes MoRI build (compile check)

Test groups (the steps that run in those jobs): cco, epv2, fused.

Lanes follow the changed files. Adding ci:full re-runs CI with every lane, the full internode sweeps and every fused GEMM case; adding ci:mi300x re-runs it with the MI300X lanes added. /ci-rerun re-runs CI against the current main.

jhchouuu and others added 3 commits November 13, 2026 07:35
- Keep only the topk-6 key-sharing note in the MI300X header
- Drop the per-shape model labels and a redundant test comment

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
- 384/6 at hidden 5120 (BF16, FP8) and 896/16 BF16 get new buckets above 4096
- The other shapes keep their last bucket, which a T8192/T16384 sweep confirmed

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
- Scatter combine and StdMoE on MI300X keep main's 304x16 / 256x4; only the gather schedule is tuned
- The schedule test also bounds each device's single-shot geometry, warps and ceilings from below

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@jhchouuu
jhchouuu merged commit 5a4570e into main Nov 14, 2026
20 checks passed
jhchouuu added a commit that referenced this pull request Nov 16, 2026
- ci_cco.yml: the tuning-table step runs test_tuning_configs.py (#1001) and test_tuning_profile.py

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant