Remove FlyDSL fallback machinery from MoE tuning (FlyDSL now mandatory) - #4025
Merged
Conversation
Contributor
🏷️ CI GuideRuns automatically on every PR:
Extended tests (opt-in via labels):
|
coderfeli
force-pushed
the
clean_moe_flydsl_fallback
branch
from
July 7, 2026 11:47
8060b28 to
3e9bd34
Compare
Rohan138
added a commit
to Rohan138/aiter
that referenced
this pull request
Jul 9, 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) <noreply@anthropic.com> Signed-off-by: Rohan138 <rohanpotdar138@gmail.com>
valarLip
pushed a commit
that referenced
this pull request
Jul 11, 2026
…-V3/R1 (gfx950) (#3911) 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; #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 #3825 and the fallback-hint cleanup from #4025. Perf/accuracy validated earlier on MI350X/gfx950, vLLM 0.21.0, DSR1-MXFP4 TP8 (pre-#3825 kernels): ck_moe_2stages token=1 43->30us; serve E2EL conc1 10846->9987ms; gsm8k 5-shot 0.965. Re-validation on the #3825-retuned kernels is advisable. Signed-off-by: Rohan138 <rohanpotdar138@gmail.com> Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
Summary
FlyDSL is now a required dependency for MoE tuning, so the FlyDSL→CK fallback machinery is dead weight. Previously the tuner recorded, alongside every winning
flydsl_config, a companion CK config taggedflydsl_fallback, and the runtime swapped it in whenis_flydsl_available()wasFalse. This PR removes that generation + consumption path and the associated_tagdata.Changes
Tuner —
csrc/ck_gemm_moe_2stages_codegen/gemm_moe_tune.py(stops generating fallbacks)FLYDSL_FALLBACK_TAG, theself._flydsl_fallbacksaccumulator, the_non_flydsl_bestcomputation, and thebest_has_flydslblock that merged a CK stage1+stage2 fallback row.result_to_csvno longer writes a_tagcolumn or appends fallback rows. It now just drops any legacy_tagcolumn/rows read from older tuned files, then writes a plain deduped table.Runtime —
aiter/fused_moe.py(stops consuming fallbacks)_flydsl_fallback_cache,get_flydsl_fallback_cfgs(), and the runtime block that substituted a fallback cfg (or dropped to default heuristics) when FlyDSL was unavailable._tagread-filter inget_cfg_2stagesis retained as defensive backward-compat for any stale user CSV. The FlyDSL-vs-CK dispatch gates (is_flydsl1 and is_flydsl_available()) are untouched — those select the wrapper, not fallback config.Config data
flydsl_fallbackrows (372 rows) from the 7 tuned configs that carried them:dsv3_fp4,dsv4_fp8fp4,gptoss_fp8fp4,kimik2_fp4,kimik2_fp8fp4,minimax_m25_fp4,qwen3_5_397b_fp4. Only the tagged rows were deleted; all other rows and the_tagcolumn are left byte-identical to minimize churn.Test
op_tests/tuning_tests/test_online_tune.py::test_tag_filterde-hardcoded its sample tag value (still validates the retained_tagread-filter).Behavior change
With FlyDSL mandatory, a tuned config that names a
flydsl_kernel now requires FlyDSL to be installed — there is no CK fallback substitution. If FlyDSL is absent, the FlyDSL dispatch gate is skipped as before, so aflydsl_-named config will no longer silently degrade to a CK kernel.Testing
python -m py_compileon both edited modules — OK.pytest op_tests/tuning_tests/test_online_tune.py -k tag_filter— passing.flydsl_fallback— no matches remain.🤖 Generated with Claude Code