Repository navigation
[FlyDSL] [Perf] gfx1250 grouped MoE: route small TP batches in one launch - #6894
ahmed-bsod wants to merge 1 commit into
Conversation
🏷️ CI GuideRuns automatically on every PR:
Extended tests (opt-in via labels):
One backend per PR: PR title tags & labels: |
There was a problem hiding this comment.
🔵 Needs a closer look
Correctness and latency validation on gfx1250 are not provided for the newly selected execution path.
No open issues 🎉
What changed in this PR
This PR optimizes small-batch expert routing in the gfx1250 FlyDSL tensor-parallel MoE path by reusing the existing fused routing helper.
Changes:
- Selects fused routing when tokens × top-k ≤ 4096 and experts ≤ 512.
- Reuses the fused counts, contiguous row map, and aligned prefix sums, bypassing separate routing and remapping launches.
- Retains the existing path for larger batches.
| File | Description |
|---|---|
aiter/ops/flydsl/grouped_moe_gfx1250.py |
Adds small-batch fused routing dispatch and skips redundant prefix-sum remapping. |
Review effort: Balanced
|
#6668 |
|
No activity for 15 days, so this is now labelled |
Motivation
On gfx1250, the grouped MoE builds the TP expert row map with three launches: a counter fill,
moe_routeandmoe_contiguous_psum_remap. In decode these kernels are short, so the launches cost more than the work.fused_route_psum_remapdoes the same work in one launch, but nothing called it.Technical Details
For TP calls with
tokens * topk <= 4096andexperts <= 512, callfused_route_psum_remapand skipcontiguous_psum_remap. The outputs do not change. Larger batches and the EP and compact paths keep the old code.Test Plan
op_tests/test_flydsl_moe_aux.py(test_route_psum_fused)op_tests/flydsl_tests/test_flydsl_grouped_gemm.py --scenario verify --data-format a4w4 --experts 256 --topk 8 --model-dim 2048 --inter-dim 512 --act silu --no-bias --tokens 1 32 64 512 513Test Result
Submission Checklist