Repository navigation
configs(fmoe): add expert=256/topk=8 MXFP4 tuned entries for DeepSeek-V3/R1 (gfx950) - #3911
Merged
valarLip merged 2 commits intoJul 11, 2026
Merged
Conversation
Contributor
🏷️ CI GuideRuns automatically on every PR:
Extended tests (opt-in via labels):
|
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the DeepSeek-V3/R1 FP4 tuned fused-MoE configuration so runtime lookup on gfx950 (MI350X/MI355X) can hit tuned entries for the routed-expert call shape (E=256, topk=8) instead of falling back to the slower heuristic path.
Changes:
- Add tuned config rows keyed for
expert=256/topk=8(DeepSeek routed-expert MoE) by re-keying existing tuned entries. - Preserve the existing
expert=257/topk=9rows for callers that include the shared expert in the fused MoE.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
valarLip
previously approved these changes
Jul 7, 2026
…-V3/R1 (gfx950) DeepSeek-R1-0528-MXFP4 calls the fused MoE with 256 routed experts / topk=8 (the shared expert is handled separately by the serving framework), but dsv3_fp4_tuned_fmoe.csv keys the tuned FlyDSL entries at expert=257/topk=9 (256 routed + 1 shared). On gfx950 the runtime lookup misses and falls back to the slow FlyDSL heuristic -- ~8% E2EL regression at low concurrency (ROCM-25536; ROCm#3909). Add expert=256/topk=8 entries for the model_dim=7168 routed-expert shapes (inter_dim 256 [TP8] and 512 [TP4], all token buckets) by re-keying the existing tuned rows. Expert count does not change the per-expert GEMM shape, so the tuned kernel selection is unchanged; the rows now reflect the k_wave fp4 gemm1 kernels from ROCm#3825 and the fallback-hint cleanup from ROCm#4025. Perf/accuracy validated earlier on MI350X/gfx950, vLLM 0.21.0, DSR1-MXFP4 TP8 (pre-ROCm#3825 kernels): ck_moe_2stages token=1 43->30us; serve E2EL conc1 10846->9987ms; gsm8k 5-shot 0.965. Re-validation on the ROCm#3825-retuned kernels is advisable. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> Signed-off-by: Rohan138 <[email protected]>
Rohan138
force-pushed
the
fix/rocm-25536-dsv3-fp4-moe-tuned-key
branch
from
July 9, 2026 21:26
a3e553d to
f9afc97
Compare
Contributor
Author
|
@valarLip could you stamp again? had to rebase and update configs |
valarLip
approved these changes
Jul 11, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
amd/DeepSeek-R1-0528-MXFP4(DeepSeek-V3 arch, MXFP4 /per_1x32fp4x2, SwiGLU) shows a consistent ~8% E2EL regression at low concurrency on gfx950 (MI350X/MI355X), TP=8 — ROCM-25536 (see #3909).On
main, the fused-MoE dispatch forces FlyDSL (AITER_FLYDSL_FORCE=1default). DeepSeek-R1 invokes the MoE with 256 routed experts / topk=8 (the shared expert is handled separately by the serving framework), butdsv3_fp4_tuned_fmoe.csvonly carried entries keyed expert=257 / topk=9 (256 routed + 1 shared). The runtime lookup therefore misses and falls back to the slow FlyDSL heuristic:Isolated
ck_moe_2stagesmicrobench (op_tests/test_moe_2stage.py -q 4 -dim 7168,256 -e 256 -k 8 -a silu -p t), gfx950:Fix
Add
expert=256 / topk=8entries for the affectedmodel_dim=7168shapes (inter_dim 256/512, all token buckets) by re-keying the existing tuned kernels. The expert count does not change the per-expert GEMM shape, so the tuned kernel selection is unchanged — only the lookup key is corrected to match the routed-expert MoE call. (49 rows added; the original 257/9 rows are kept for callers that fuse the shared expert.)Validation (MI350X / gfx950, vLLM 0.21.0, DeepSeek-R1-0528-MXFP4, TP=8)
ck_moe_2stagestoken=1: 43.2 µs → 30.0 µs (≈ cktile / pre-regression).Notes
mainmanifestation of ROCM-25536. The same ticket symptom on the aiter 0.1.14 / 0.1.15.post2 release line has a different cause (the CK cktile path regressed by kimi a16wi4 moe support #2863 — split-K disabled + unfused activation for fp4x2); that needs a separate cktile-path fix/backport.Signed-off-by:on push if aiter requires it.