Repository navigation
perf(musa): tune fused MoE dispatch by active MP and graph bucket - #193
yeahdongcn wants to merge 44 commits into
Conversation
…06-core-bin-tactics
|
MP56 compiled/captured pilot completed on MTT S5000 (MP56), Qwen3.5-35B-A3B-BF16 TP4, 256 input / 128 exact output, enforce_eager=False, warmup=4, repeats=5.
All arms passed exact output and Beijing semantic checks. Evidence SHA256: 035bf4e39457d57b729671fa15aa46bb1821988b03f0eb034dc33d85551d84c3. This is an offline compiled/captured throughput pilot; MP60 and HTTP TTFT/TPOT remain pending. The test-only GDN compile workaround is not part of this PR. |
|
Evidence provenance update: the MP56 pilot was rebuilt with final product source snapshots ( |
|
Safety follow-up pushed at |
Summary
Add fail-closed, MP-aware fused-MoE dispatch for S5000 and ship the first
production-calibrated Qwen3.5 folded-BF16 profile.
The runtime key is the device's active multiprocessor count plus the exact
operator shape and graph-static descriptor. Unknown MPs, unprofiled shapes,
compile mode, invalid context, LoRA and unsupported graph modes retain the
upstream backend.
Current head:
af16fcaf5bf8491254bd8754c95ece5156b91b23Production behavior
MP56 Qwen3.5 folded BF16
FULL, uniform, one-token-per-request descriptorsNONEmay use the engine-static profile only when runtime tokens matchthe selected max-num-seqs profile
compile mode, bucket 16/64 and unknown MP all fail closed to upstream
MP60 compatibility and correction
silently disabling them when ForwardContext metadata is present
nonuniform or token-mismatched FULL calls fail closed
routes with two seeds; M<=4 is the conservative route-worst winner
VLLM_MUSA_FUSED_MOE_DISPATCH=upstreamremains the immediate rollback.Runtime hardening
ForwardContext/BatchDescriptorfields into a validatedMusaForwardGraphBucketNONE/PIECEWISE/FULLvaluescapture descriptors; no insecure callable serialization is enabled
long-prefill source A/B by disabling existing prefill optimizations
Validation
Focused tests and build
58 passed, 2 skipped75 passed--helppaths andgit diff --checkpass
f95d5ff99: PASS in 53.1s with 51/51task-local ccache hits
f95d5ff99to74ed28bccis Python-only worker/harnessintrospection; no native input, dependency pin or build metadata changed
74ed28bccto574b8728bonly makes non-exact/speculative FULL descriptors globally fail closed and
adds its policy test; normal MP56 FULL behavior is unchanged
e185fdfd7makes the read-only evidence RPC tolerate eagerdense runners without a cudagraph dispatcher; source and model smokes pass
MP56 final-head graph replay
1→16→4→16→1→2→16FULL_AND_PIECEWISEstate and identicalFULL descriptors
64,16,4,2,1MP56 formal exact-source HTTP A/B
fcc2188a5e3a7176e5c714d6fe09cc8f930fe85074ed28bcc41cef187e77f001f2afe94ff4a74365sha256:b200181dfb64447567f663440fd40be0657a1e925b5c2b39acf592d04b460ffetemplate, exactly 1024 output tokens
A-B-B-A-A-BAll 24 normalized rows passed. Every request produced exactly 1024 tokens;
prompt identities and input-length vectors match across all six processes.
Output-throughput CV is below 0.72% for every arm/batch. Target gains, fallback
neutrality and all <=2% p99 regression gates pass.
Output-text digests are stable within each arm at BS1 but differ across arms;
at higher concurrency they are not stable even within the same source. This is
recorded as a model-quality review item. Direct fused-MoE numerical oracles and
all server/request health checks pass.
Evidence archive SHA256:
160a37d66032d710913d4da338cc9138feadea9dce9b359472989cb5aca718c6MP60 final-head runtime-mode replay
574b8728b, four physical MP60 GPUs, TP475 passed1→8→4→8→1→2→8, 256/128 tokensoutput and semantic checks on ranks 0/1/2/3
zero native selections and stays upstream
MP60 evidence archive SHA256:
dff887c1b8b5d6c52f983446d313a3e0e3c1a6a4fd0ebbd4b02a9f251a4c369fFinal-head regression controls
e185fdfd7, physical MP60 GPU, eager NONE75 passedexisting MP60 FP8 native fused-MoE route exercised
cudagraph dispatcher; final head now reports explicit NONE/empty state when
it is absent, and the same hardware smoke passes
Regression evidence archive SHA256:
ebdc09342d48e296898e065cd81504c398dcd849c7e22a028182453a9b620daaCurrent v0.28 release-base gate
Live base
3f728c148was merged into candidateaf16fcaf5. The dependency pinis now vLLM
2cf0a6915; all 133 MUSA patches apply in order. Exact editablenative build passes in 140.792s with 51/51 task-local ccache hits, exact imports,
and
91 passedfocused tests. No GDN source workaround is needed on this base.MP56 exact-source formal result:
MP60 exact-source formal result:
Both bins complete 24/24 rows with exact 1024-token outputs and all frozen
throughput/p99 gates PASS. Merged-head exact descriptor replays also pass on
both MP56 and MP60.
715276adb55d0efa724684801e46ef89962acb2117b3618a80dc28c45527a2992bc666fb05c338ba150b6d7fc9b7642cdba115f553d1992ddf6e65c638fa84f4Design guidance
The policy follows the common cross-vendor pattern rather than using MP alone:
(arch, active_mp, kernel/source ABI, op/stage, M bucket, N/K, dtype, layout/quant, graph descriptor) -> tacticNVIDIA CUTLASS/Triton and AMD CK/AITER use architecture- and shape-keyed tactic
selection with a conservative fallback. This change applies the same principle
to MUSA: exact entries only, explicit provenance, bounded tuning regions and no
nearest-MP guessing. The reusable policy is documented in
docs/vllm_musa/hardware-aware-kernel-tactics.md.Known limitations / why Draft remains
PIECEWISE capture crash; current v0.28 release-base gates need no workaround
and use the explicitly supported bounded FULL_DECODE_ONLY capture contract
Test plan
A-B-B-A-A-BHTTP gate