Repository navigation
deps: upgrade MUSA torch stack to 2.11 and torchada to 0.1.79 - #168
Merged
Merged
Conversation
yeahdongcn
force-pushed
the
codex/torch211-deps
branch
from
August 7, 2026 02:56
9d14773 to
4383a86
Compare
added 10 commits
August 8, 2026 04:58
yeahdongcn
force-pushed
the
codex/torch211-deps
branch
from
August 7, 2026 21:14
56c6821 to
66a61c4
Compare
yeahdongcn
marked this pull request as ready for review
August 8, 2026 00:30
yeahdongcn
marked this pull request as draft
August 8, 2026 06:04
yeahdongcn
marked this pull request as ready for review
August 8, 2026 12:14
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
Upgrade the MUSA dependency stack while keeping MATE pinned at
0.2.4:2.9.1.post1+musa5.2.02.11.0.post1+musa5.2.00.24.1.post1+musa5.2.00.26.0.post1+musa5.2.02.9.1+musa5.2.02.11.0+musa5.2.00.1.770.1.791.1.0+musa5.2.0torch2.9.1.post1s50001.1.0+musa5.2.0torch2.11.0.post10.2.40.2.4The dependency and model-correctness gates are healthy, and the FP8/MoE/TP>1
performance paths tested here are neutral-to-positive. The two BF16 TP1 graph
regressions found during the campaign are now root-caused and fixed:
LayerNameand preservethe QK RMSNorm + RoPE + KV-cache fusion;
affected decode copy/index-select/slice/split kernel, scoped to torch >= 2.11
Qwen3-VL and preserving an explicit user override.
The final code-driven same-card A/B is neutral for both paths, and the final
isolated full-source dual-stack UT sweep is green. This PR is ready for review.
Validation summary
925 passed, 3 skipped, 0 deselectedfrom 928 collected6 passedon each stack27 passedon each stackPIECEWISE, graph partition off, same GPU/driver-0.279%; BS4-0.078%FULL_AND_PIECEWISE, BS1/4/16/64-0.148%to+0.242%FULL_AND_PIECEWISE, BS1/4/16/64-0.131%to+0.338%FULL_DECODE_ONLY, BS1/4/16/64-0.315%to+0.740%FULL_DECODE_ONLY+0.174%; BS4/16/64 within0.4%FULL_DECODE_ONLY-0.194%vs bracketed controlFULL, BS1/64+1.104%; BS64-0.299%mean /+0.433%medianFULL_DECODE_ONLY, BS1 4k/1k-0.019%Red Blueanswer; matching tokens+3.869%FULL_DECODE_ONLY, BS1-2.117%vs torch 2.9/same torchadaFULL_DECODE_ONLY, BS1+2.139%vs unfixed;-0.024%vs torch 2.9/torchada 0.1.79-1.006%Same-source A/B setup
v0.24.0-dev@f45e39e850ef.c5f1997fa; pre-fix model-matrix candidate head:b187b3a7b; torch 2.9 control head:b482b89f4.docker/musa.Dockerfile,requirements/common.txt, andrequirements/musa_private.txt.66a61c4e0and control11b39b269; exact source overlays provide the final dependency contracts andthe two Python graph compatibility fixes.
5.2.0-server.10.20.34.84host and MTT S5000 GPU0,driver
3.3.5, with identical model, 4096/1024 shape, BS1, graph mode,warmup, and five-repetition measurement protocol. The stack/env ablations
used the same application source; the final row changes only the matcher.
10.20.34.83host and MTT S5000 GPU0,driver
3.3.5-server, exactc5f1997faoverlay,PIECEWISE, and graphpartition disabled on both stacks.
warmup, and fresh server processes.
The release-image gate imports torchada first, then imports the complete
runtime set. It requires exact versions for torchada, torch, torch_musa,
torchvision, torchaudio, and DeepEP, and checks the remaining MATE,
flash_attn_3, flash_mla, DeepGEMM, TileLang, Triton, vLLM, and vllm_musa
imports.
Unfiltered unit/operator validation
919 passed, 3 skipped, 0 deselectedin185.82s919 passed, 3 skipped, 0 deselectedin186.20s6 passed6 passed925 passed, 3 skipped, 0 deselectedin187.75s925 passed, 3 skipped, 0 deselectedin188.01sThe dependency contract has separate torch 2.9 (
torchada 0.1.77,torchvision
0.24.1) and torch 2.11 (torchada 0.1.79, torchvision0.26.0)profiles, so both A/B legs execute the same 928-test inventory. The identical
three skips are one DeepSeek source-Git
check when the installed image has no Git metadata and two legacy
FlashAttention cache checks whose PyO3/safetensors prerequisite is absent.
They are not torchada or torchvision deselections.
The upgrade also exposed and fixed compatibility/test gaps in gated-QKV
Triton scalars, functionalized RMS/SiLU DeepGEMM matching, compiler/ccache test
isolation, stale source/patch contracts, and the release-image dependency gate.
Correctness coverage
Red Blueand identical tokens in all three repetitions[3, 4, 4], checksum-24.094114303588867; MUSA NMS indices[0, 2]on both stacks[1, 8000], MUSA/CPU max diff0; MelSpectrogram shape[1, 40, 51], max diff0.001953125This audio is a steady tone.and identical eight-token sequence, 3/3 per stackThe Qwen2.5-Omni result covers the audio tower and decoder; it is not a claim
for full Talker/Code2Wav correctness or performance.
Detailed performance tables
All throughput values are steady-state output tokens/s. Dashes mean that an
absolute value was not retained in the consolidated report; no value is
inferred from a percentage.
Qwen3.5-27B-FP8 TP2
Exact 4096 input / 1024 output,
FULL_AND_PIECEWISE, three measuredrepetitions after warmup.
+0.242%+0.096%-0.148%+0.078%Verdict: neutral. Evidence:
generated/MUSA-60085/qwen35-rebased-f45/.Qwen3.5-35B-A3B-BF16 TP4 MoE
Exact 4096 input / 1024 output,
FULL_AND_PIECEWISE, three measuredrepetitions after warmup.
-0.033%+0.132%-0.131%+0.338%Verdict: neutral. Evidence:
generated/MUSA-60085/qwen35-rebased-f45/.Qwen3.5-2B BF16 TP1 same-host version isolate
This targeted
PIECEWISErun holds source, model, host, GPU, driver, backend,capture sizes, and graph-partition-off configuration fixed to separate the
dependency-stack effect from a later experimental graph-partition switch.
Exact 4096 input / 1024 output, three BS1 repetitions and the two steady BS4
repetitions after first-concurrency warmup:
-0.279%-0.078%Both stacks returned exact answer
4, matching token receipts, zero requestfailures, and full output lengths. Verdict: neutral. The experimental
use_inductor_graph_partitionflag is not enabled by this PR and is not usedfor the version verdict. Same-GPU evidence:
generated/MUSA-60085/round3-20260809/.Qwen3-32B FP8 TP4
Exact 4096 input / 1024 output,
FULL_DECODE_ONLY, three measuredrepetitions after warmup.
-0.315%-0.281%+0.480%+0.740%Verdict: neutral. Evidence:
generated/MUSA-60085/weekend-expanded/qwen3-32b-fp8/.DeepSeek-V2-Lite-Chat FP8 TP2
Exact 4096 input / 1024 output, FLASHMLA,
FULL_DECODE_ONLY.-2.396%+0.174%-0.372%-0.273%-0.213%The adjacent repeat resolves the initial BS1 result as time-order variance.
Verdict: neutral. Evidence:
generated/MUSA-60085/weekend-expanded/deepseek-v2-lite-fp8/.DeepSeek-V4-Flash-Base TP8
PR #156-aligned BF16/FLASHMLA/FP8-KV recipe, exact 4096 input / 1024 output,
FULL_DECODE_ONLY.Candidate versus bracketed same-host control: throughput
-0.194%, TTFT+0.391%, TPOT+0.186%. Verdict: neutral. One initial control-only launchtimed out alongside a device watchdog reset; clean pre/post controls and all
candidate repetitions passed, so it is retained as availability evidence but
is not attributed to torch 2.11.
Evidence:
generated/MUSA-60085/dsv4-rebased-f45/.MiniMax-M2.5 TP8 / EP8 / Eagle3
Exact 4096 input / 1024 output, five-token Eagle3 speculation, production-style
FULLgraphs with capture sizes[6, 24, 96, 384], three measuredrepetitions.
+1.104%-0.299%+0.433%)10703.31 -> 10658.90 ms; TPOT61.823 -> 61.103 msVerdict: neutral-to-positive; BS64 distributions overlap. A failed control
preflight at
gpu_memory_utilization=0.95is excluded; both valid legs used0.92. Evidence:generated/MUSA-60085/weekend-expanded/minimax-m25/.Qwen3-VL-8B BF16 TP1
Normal compiled
FULL_DECODE_ONLYpath. The initial full matrix retaineddeltas for every completed shape:
-1.51%-1.70%-2.18%-1.91%-1.29%-1.16%-0.59%Directly adjacent five-repetition repeats confirmed the effect:
-1.485%-1.863%-1.175%-2.052%The BS4 medians exclude one compile/cold outlier in each leg. These are the
pre-fix discovery results. Evidence:
generated/MUSA-60085/weekend-expanded/qwen3-vl-8b/.The BS1 no-cudagraph counterfactual reverses the result:
FULL_DECODE_ONLY-1.485%+3.869%Absolute graph/no-graph throughput is not compared as a production claim; the
A/B direction change is the diagnostic signal. Evidence:
generated/MUSA-60085/weekend-expanded/qwen3-vl-nograph/.MUPTI then localized 77% of the device-time delta to one graph-internal
Inductor pointwise kernel. Counts and topology were identical; torch 2.11 had
changed the torch 2.9 flat 1D grid into a slower 2D grid:
triton_poi_fused_clone_copy_index_select_slice_split_1meantriton.prefer_nd_tiling=trueretained the slow 2D path. Settingtriton.max_tiles=1restored the target kernel, so the final code applies thatdefault only to torch >= 2.11
Qwen3VLForConditionalGenerationand usessetdefaultto preserve an explicit user value. A global torchada monkeypatchwas deliberately avoided.
Final same-card, non-profiler, exact 4096/1024 BS1, five-repetition A/B:
-0.019%The deterministic real-image result remains exactly
Red Bluewith the sametoken sequence. Root-cause evidence:
generated/MUSA-60085/weekend-expanded/qwen3vl-mupti-rootcause/,generated/MUSA-60085/weekend-expanded/qwen3vl-fx-rootcause/, andgenerated/MUSA-60085/weekend-expanded/qwen3vl-maxtiles1-final/.Plain Qwen3-8B BF16 TP1
This removes the vision tower while retaining a BF16 dense TP1 decoder. The
original exact-4096/1024, BS1, five-repetition discovery run was:
FULL_DECODE_ONLY-2.186%-1.006%That established a graph-path-sensitive regression but did not identify its
cause. A controlled same-host isolate on
10.20.34.84, MTT S5000 GPU0,driver
3.3.5, then held the model, exact 4096/1024 shape, BS1, graph mode,warmup, and five-repetition protocol constant:
0.1.770.1.79-0.366%vs torch 2.9 / torchada 0.1.770.1.79, unfixed-2.117%vs torch 2.9 / same torchada 0.1.790.1.79,AOT0-0.001%vs unfixed0.1.79,VLLM_USE_LAYERNAME=0+2.492%vs unfixed;-0.045%vs torch 2.9 / torchada 0.1.770.1.79, matcher fix with default LayerName+2.139%vs unfixed;-0.024%vs torch 2.9 / same torchada 0.1.79The first five rows use the same application source and vary only the stated
stack/configuration. The last row adds only the matcher fix. Absolute values
from this host are not compared to the earlier discovery host; only within-run
A/B deltas are used. Verdict: plain Qwen3-8B regression root-caused and
fixed, with post-fix performance neutral against the same-torchada torch 2.9
control.
Earlier discovery evidence:
generated/MUSA-60085/weekend-expanded/qwen3-8b-bf16/andgenerated/MUSA-60085/weekend-expanded/qwen3-8b-bf16-nograph/.Root cause and fix: plain Qwen3-8B
Torch
>=2.11enables opaque LayerName values and hoists the LayerName into anFX placeholder. The vllm_musa Qwen3 pre-split matcher accepted only
str, soall 36 decoder layers rejected the intended fusion fail-closed. The custom op
already accepts
LayerNameType; the narrow fix makes the matcher acceptstr | torch.fx.Nodeand passes the value through unchanged.MUPTI kernel proof
A 256-token MUPTI capture shows the exact cost of the 36 fusion misses:
+18,432 = 36 layers x 2 extra kernels x 256 tokensfused_qk...: 9,216 calls, 66.565 mstriton_red+ rotary + reshape/cache: about 173.437 ms+106.873 msThis accounts for the end-to-end loss inside the captured decode path: the
graph was executing more kernels because the fusion matcher had declined the
torch 2.11 FX form.
Causal exclusions and workaround selection
AOT0-0.001%vs unfixedVLLM_USE_LAYERNAME=0+2.492%vs unfixed+/-0.4%TORCHADA_GRAPH_ROTATION=0did not improve throughputVLLM_USE_LAYERNAME=0is a useful causal workaround, but the code fix isnarrower: it preserves the default LayerName path and updates only the matcher
type acceptance. The custom op already supports that value type.
Fix validation
6 passed6 passed27 passed27 passed925 passed, 3 skipped925 passed, 3 skipped-0.024%)Resolved Qwen3-VL graph regression
Qwen3-VL did not share the LayerName fusion issue. Its graph topology and
kernel counts were identical, but MUPTI and generated-code diffs isolated one
torch 2.11 Inductor pointwise kernel whose grid changed from flat 1D to slower
2D. The scoped platform default restores that kernel to 7.140 us versus the
torch 2.9 value of 7.032 us. The final code-driven five-repetition 4k/1k A/B is
60.7741 versus 60.7625 tok/s (
-0.019%) with exact image semantics.Decision / follow-up
model-path-specific, and neutral versus the torch 2.9 control.
selected fixes preserve the default LayerName path and scope the tiling
setting to torch >= 2.11 Qwen3-VL while respecting user configuration.
review.
0.1.79andtorchvision
0.26.0are exercised explicitly rather than replacing thetorch 2.9 control cases.
Talker/Code2Wav performance.
Detailed local evidence is in
generated/MUSA-60085/final-report.mdandgenerated/MUSA-60085/weekend-expanded/.