Repository navigation
[Config] [Perf] Add DeepSeek V4.1 Flash TP4 gfx950 MoE tuning - #5609
Closed
Fangzhou-Ai wants to merge 1 commit into
Closed
Fangzhou-Ai wants to merge 1 commit into
Fangzhou-Ai wants to merge 1 commit into
Conversation
Co-authored-by: Codex <noreply@openai.com> Signed-off-by: fai <fangzhouai@gmail.com>
Contributor
🏷️ CI GuideRuns automatically on every PR:
Extended tests (opt-in via labels):
PR title tags & labels: |
Fangzhou-Ai
marked this pull request as ready for review
September 17, 2026 02:16
Fangzhou-Ai
marked this pull request as draft
September 17, 2026 03:17
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
Add 16 gfx950 tuning rows for the DeepSeek V4.1 Flash TP4 backbone and draft MoE shapes. These shapes currently have no exact entries in the shipped tuning tables and use heuristic FlyDSL configurations.
Configuration
ksplit=-1are in the CSV.The model-specific table contains only the 16 new keys, with explicit
gfx950. Existing rows are unchanged. Kernel timing/error columns are blank: the measurements below include the complete local shared/routed MoE and TP collective, so they are not valid stage-one/stage-two kernel timings.Performance on the measured runtime
MI355X, TP4, Torch 2.12.0+rocm10.0.0, HIP 7.15.26333, Triton 3.8.0, AITER 0.1.21.post1 with the merged sorter fix from #5295.
AITER_BF16_FP8_MOE_BOUND=0, fusion and routed-first scheduling disabled. This explicitly measures the A8W4 path; the CSV does not change activation-dtype selection policy.Seeded synthetic weights/inputs, warm repeated routes, native shared-first MoE including gating, quantization, shared expert, routed expert and BF16 TP4 RCCL. Each of 31 alternating paired measurements takes the maximum rank latency over 16 graph replays. The other four GPUs were idle during confirmation.
The percentage is the median paired gain, so it need not equal the ratio of the two median times. All 16 target shapes passed the predeclared independent native-CSV gate: ≥1% median paired improvement and ≥25/31 faster pairs. Observed wins were 30/31 or 31/31. Earlier isolated selection also used an identical-kernel control to reject capture/timing bias.
Validation and limits
atol=rtol=.02, explicit FP64 local error budgets, propagated FP32 TP-sum budgets, input preservation and finite timed outputs passed. Strict FP32/BF16 aggregate parity diagnostics include mismatches and are retained separately; this is not a claim of bitwise or independent full-model accuracy.Measured source identities include
moe_kernels.pySHA256c6898ef73fa21fd519593592c511b29ae41443e3e753ce6165bc866271c2bd73andmixed_moe_gemm_2stage_common.pySHA256bba3e08a6ac16c2106a8bde9b06a98aea6fb0c7764117b2630a3a091265e1853. Upstream baseb0ced008d89f3fe8ad9fa9388d78b615fd53cb0bhas newer FlyDSL/LDS and stage-two addressing code. All 10 selected kernel names still register with identical parameters, but that CPU check does not establish equivalent performance or correctness on the newer implementation.Short serving follow-up (measured private runtime)
A matched TP4 controlled-decode check used 350,000 input tokens and 512 output tokens per request, two warmup batches and five measured batches at each concurrency, with synthetic speculative acceptance 3.51. The comparison uses the saved untuned baseline from a separate server lifetime. The tuned MoE CSV was selected; dense GEMM configuration, shared-first scheduling and unfused arithmetic were unchanged.
These short measurements show no clear overall serving-throughput gain, despite the isolated MoE gains above. All 20 measured batches completed with matching prompts, zero preemptions and no harness validation issues. TPOT is the server's mean time per output token, not p90 ITL. Synthetic acceptance and request completion do not establish model quality. This does not replace the still-pending current-upstream GPU validation; the PR remains a draft.
Command:
sudo -n /home/amd/vllm/.venv/bin/python dsv41_rocm_bench/moe_tuned_serving_20260917/run_short_verification.py --execute. Both client/analyzer completed successfully and owned server cleanup completed without forced termination. Detailed local artifacts:dsv41_rocm_bench/moe_tuned_serving_20260917/short_controlled_decode/{comparison.json,SHORT_COMPARISON.md}.Commands run
On the measured runtime, the artifact-local
run_native_confirmation_v5.pyharness ran each TP4 lane with--timing, all eight actual shapes and six boundaries; both controllers exited zero and all four rank reports completed.qualify_native_csv.pychecked all 16 rows against disjoint tuning/native reports and source hashes. A separate native metadata lookup checked the final combined CSV. These benchmark artifacts are outside this CSV-only patch.On this upstream checkout:
The CSV layout test passed. CPU checks also confirmed 16 unique new keys, no collisions with shipped tables, unchanged qualified row contents and identical registry parameters for all 10 selected names. No GPU was launched for upstream preparation.
Related work
Open PR #5562 targets DSV4.1 EP4 with H5120/I2304, 96 local experts and top5. This table targets TP4 with H5120/I640, E384/top6 and E128/top3, so its lookup keys are distinct. Open-PR searches for DSV4.1,
640 fmoe, andfmoe CSVfound no proposal for these exact keys. #5315 addresses explicit architecture fields across existing tables; this new table already suppliesgfx950.AI assistance was used to prepare the tuning harness, analyze results, and draft this CSV change and description.