perf(s5000): consolidate v0.32.0-dev S5000 performance rollup (#376-#387) #391
All Vouch review confidence checks passed
Residual risk 0.30 = Change Risk (0.57) × (1 − Review Confidence (0.47)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.57 · 650 lines diff across 8 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.388
Shallow Review Depth
shallow_review_depth
0.344
Ai Authored
ai_authored
0.050
Real PR Conversation Timeline
1 comments
"Review active on #391"
general
weight: 0.35
yeahdongcn
Summary
Consolidates the 12 S5000 performance PRs (#376, #377, #378, #379, #380, #381, #382, #383, #384, #385, #386, #387) into one conflict-free, end-to-end validated rollup on top of
v0.32.0-dev(82534a26d), preserving reviewable per-topic commits while eliminating cross-PR patch-series and shared-module rebase conflicts.In addition to folding in all
dsh-auto-review v2review fixes and runtime kill-switches across #376–#387, combined S5000 Baseline-vs-Candidate A/B testing caught and resolved two cross-subsystem interactions:1. Exact FP32 carrier before asymmetric INT8 zero-point adjustment (
730e37d63,881a5b976):MUSATorchInt8ScaledMMLinearKernel.apply_weightsnow computestorch.mm(x_q.to(torch.float32), w_q.to(torch.float32))rather than accumulating through a 7-bit-mantissabfloat16GEMM carrier before subtractingx_zp azp_adj, keeping asymmetric W8A8 output within< 1 FP16 ULPof the exact int32 dequant reference.2. Per-
VllmConfigquantized piecewise native route across rotary adapters (e00c4146e): Boundbind_quantized_piecewise_native_route/should_use_native_quantized_piecewise_opontoMusaRotaryEmbedding,MusaMRotaryEmbedding,MusaVisionApplyRotaryEmb, anddeep_gemm_warmup.pyin lockstep withRMSNorm/SiluAndMul/QuantFP8. This preserves Inductorq_norm + k_norm + RoPEfusion on FP8 piecewise prefill (Qwen3-8B-FP8TP=1 prefill+1.06%,0.0logprob diff) without mutating process-globalos.environacross BF16 engines.---
Consolidated PRs & Ordered Commits
| Supersedes | Commit | Subsystem & Summary |
|---|---|---|
| #376 |
013c257d0| Distributed / Logits: Generalize MUSA JIT IPCall_gatherfor TPLogitsProcessoracross arbitrary vocabulary sizes, dtypes, and batch sizes (VLLM_MUSA_TP_LOGITS_IPC=0kill-switch). || #377 + fix |
e948a9c36,e00c4146e| Compilation / Custom Ops: ScopeVLLM_MUSA_CUSTOM_OP_USE_NATIVEper-VllmConfigstrictly to FP8 piecewise graphs across norm, activation, quant, and rotary adapters instead of mutating process-globalos.environ. || #378 |
b31aaf79e| MoE BF16 Prefill: Support foldedE=257, top_k=9(QWEN35_SHARED_EXPERT_FOLD) in BF16 MoE prefill contract and skip dead DeepGEMM warmup when unquantized. || #380 |
1a6903b5d| MRV2 Sampler: ReplaceO(B)sequential Pythontorch.multinomialloop on seeded requests with batched stateless Philoxgumbel_sample(VLLM_MUSA_MRV2_SEEDED_GUMBEL=0kill-switch) and add152064vocab Triton hints. || #381 |
da00488d5| MoE S5000 MP-Bin Fallback: Add nearest-MP-bin dispatch-policy fallback across S500048 / 56 / 60 / 64MP cards and calibrate foldedQwen3.5-35B-A3B-FP8GEMV(VLLM_MUSA_FUSED_MOE_DISPATCH=0kill-switch). || #382 + fix |
58edcffca,730e37d63,881a5b976| FP8 / INT8 Linear & Quant: Fuse staticscaled_fp8_quant(per-tensor/rowwise/colmajor/group) in a single-pass Triton kernel and registerMUSARowWiseTorchFP8ScaledMMLinearKernel+ FP32-carrierMUSATorchInt8ScaledMMLinearKernel. || #383 |
1520173fa| Attention (mate >= 0.2.8): Restore Qwen FA3 single-request LUT scheduler metadata across S5000 MP bins and DeepSeek sparse FlashMLA direct-out (num_heads in (64, 128)) onmate >= 0.2.8, withhead_size_vguard. || #384 |
3e49de584| FP8 MoE Mid-Batch: Extend compact/dedupfp8_moe_mmawith chunked 16-row route map (R <= 280) and fusedmoe_route_prep(VLLM_MUSA_FP8_MOE_ROUTE_PREP=0kill-switch). || #385 |
76be99045| Multimodal / ViT: Add contiguous 4D FA3 + chunked/broadcast SDPA fastpaths inMusaMMEncoderAttentionand enable bucketed ViTEncoderCudaGraphManagerwhencudagraph_mm_encoder=True. || #386 |
ea6d25687| FP8 Block Split-K: Pre-quantize BF16 activations once infp8_block_splitk_mm(32x32/128x128), add MP64 split-K calibration, and bound dynamic workspace cache (VLLM_MUSA_FP8_SPLITK_ACT_QUANT=0kill-switch). || #387 |
9b7e7de58| Qwen3.5 GDN Projections: Pack unquantized[in_proj_qkvz; in_proj_ba]into a single GEMM +fused_zba_packedand restore compiled FP8 dual-stream overlap vialayer_name-freemusa_gdn_fp8_qkvz_bf16_ba_proj. || #379 |
1a9b3070a| Speculative Decoding (Eagle/Eagle3/DFlash): EnableFULLdraft CUDAGraph capture (VLLM_MUSA_DRAFT_FULL_WRAP=1default), fix MRV1 padded decode FA metadata length mismatch, fix MRV2 Eagle3target_hidden_states/slot_mappingswiring, and replace review-flaggedtorch.cuda.calls withtorch.musa.*+ explicitdelbuffer release. || Tests |
236071ba7| Unit Test Alignment: Align integrated S5000 unit tests withv0.32.0-devcontracts (nn.Module.__init__in IPC logits test,is_prefilling,FP8ScaledMMLinearLayerConfig). || Cleanup |
f9640e858,e3277473d,02e7f4e97,aa7f49e80| Lint, Idiom, Test & Dead-Code Cleanup: Applyruff-format0.15.1, drop redundanthasattr(torch, "musa")and dict-idlru_cacheguards, updatetest_fp8_block_gemv_native.pysource assertion, and remove unreferencedtree_attn.py(-469lines). |---
Environment Variables (New & Updated Kill-Switches)
1. New Environment Variables Introduced in This PR
| Env Var | Default | Module / File | Purpose & Fallback (
0) ||---|---|---|---|
|
VLLM_MUSA_TP_LOGITS_IPC|1|distributed/device_communicators/musa_jit_custom_all_reduce.py| Enable MUSA JIT IPCall_gatherfor TPLogitsProcessor;0falls back to tensor-model-parallelgather/all_reduce. ||
VLLM_MUSA_MRV2_SEEDED_GUMBEL|1|v1/sample/topk_topp_sampler.py| Enable batched stateless Philoxgumbel_sampleon seeded MRV2 requests;0falls back to sequentialtorch.multinomial. ||
VLLM_MUSA_TRITON_STATIC_FP8_QUANT|1|patches/vllm___custom_ops.patch.py| Enable fused single-pass Triton staticscaled_fp8_quant;0falls back to PyTorch eager quantization. ||
VLLM_MUSA_ROWWISE_FP8_SCALED_MM|1|model_executor/kernels/linear/scaled_mm/torch_scaled_mm.py| EnableMUSARowWiseTorchFP8ScaledMMLinearKernelfor row-wise FP8scaled_mm;0declines registration. ||
VLLM_MUSA_FP8_MOE_ROUTE_PREP|1|kernels/fp8_moe_mma.py| Enable fusedmoe_route_prep+ chunked 16-rowfp8_moe_mmaroute map (R <= 280);0reverts to legacy route prep. ||
VLLM_MUSA_FP8_SPLITK_ACT_QUANT|1|kernels/fp8_block_splitk.py| Pre-quantize BF16 activations once vianative.act_quantinfp8_block_splitk_mm;0keeps in-CTA Triton quantization. ||
MUSA_GDN_PACKED_PROJ|1|model_executor/layers/mamba/gdn/qwen_gdn_linear_attn.py| Pack unquantized[in_proj_qkvz; in_proj_ba]into a single GEMM on Qwen3.5 GDN;0keeps separate projections. ||
MUSA_GDN_OPAQUE_DUAL_STREAM|1|model_executor/layers/mamba/gdn/qwen_gdn_linear_attn.py| Overlap FP8in_proj_qkvzand BF16in_proj_baon dual MUSA streams undertorch.compile;0runs sequentially. |2. Existing Environment Variables Updated / Interacting with This PR
| Env Var | Default | Module / File | Behavior |
|---|---|---|---|
|
VLLM_MUSA_CUSTOM_OP_USE_NATIVE| unset (per-VllmConfig) |utils/environ.py,optimization_contract/policy.py| When unset, auto-routes per-VllmConfigstrictly for FP8 piecewise CUDAGraph models without mutatingos.environ; explicit0/1overrides process-wide. ||
VLLM_MUSA_DRAFT_FULL_WRAP|1(was0on Eagle3) |patches/series/0030,0159| Default enabled (1) for Eagle / Eagle3 / DFlashFULLdraft CUDAGraph capture; set0to revert draft model toPIECEWISE. ||
VLLM_MUSA_DFLASH_FULL_WRAP|1|patches/series/0030,0159| DFlash-specific gate forFULLdraft CUDAGraph capture; set0to revert DFlash draft toPIECEWISE. ||
VLLM_MUSA_FUSED_MOE_DISPATCH|auto|model_executor/layers/fused_moe/dispatch_policy.py| Existing MoE dispatch selector;0/upstreambypasses S500048/56/60/64MP-bin dispatch overrides. ||
VLLM_MUSA_FP8_NATIVE_GEMV|1|kernels/fp8_block_splitk.py| Existing native FP8 GEMV toggle;0also disablesnative.act_quantpre-quantization infp8_block_splitk_mm. |---
Validation & S5000 Baseline-vs-PR A/B Evidence
Environment
v0.32.0-ph1-5.2.0-torch2.13.0.post1-20261126(Python 3.12.16,torch/torch_musa 2.13.0.post1+musa5.2.0, MUSA runtime50200/ driver5.2.0-server,torchada 0.1.111,mate 0.2.8.post1,flash_attn_3 0.2.8.post1+musa,triton 3.2.0).MP64andMP60bins.TORCHDYNAMO_DISABLEunset), interleaved Baseline (v0.32.0-dev6bddc3bf1) vs Integrated Candidate runs on the same physical GPUs.1. Offline CI & S5000 Pytest Gates
python3 tools/musa_sync.py check-series --replay: 223 / 223 clean (PASS) after merging82534a26d(#363).ruff check&ruff format --checkacross all 48 touched Python files:PASS.151 passed.pytestsuite (MP64) + post-fix delta suite (MP60):411 passed, 0 failed(43.39s) +74 passed, 0 failed(65.97s).2. TP=1 Compiled + CUDAGraph Interleaved A/B (S5000)
| Model (
TP=1) | KV Cache Delta | Greedy Token / Logprob Parity (6prompts) | Prefill (Base -> Cand) | Decodec=1(Base -> Cand) | Batched Decode (Base -> Cand) ||---|---|---|---|---|---|
|
Qwen3-8BBF16 (MRV2 seeded) |0.0%(47.35 GiB) |6/6exact prefix,max_diff=0.0|16275 -> 16283 tok/s(+0.05%) |76.09 -> 76.14 tok/s(+0.07%) |c=32:1749.9 -> 2085.9 tok/s(+19.21%) ||
Qwen3-8B-FP8|0.0%(53.74 GiB) |6/6exact prefix,max_diff=0.0|16131 -> 16301 tok/s(+1.06%) |110.55 -> 114.53 tok/s(+3.60%MP64) /+0.28%MP60 |c=32:3105.6 -> 3142.1 tok/s(+1.17%MP64) /+0.07%MP60 ||
Qwen3.5-2BBF16 (GDN) |0.0%(59.02 GiB) |6/6exact 8-tok prefix |18374 -> 18107 tok/s(-1.45%) |210.56 -> 229.46 tok/s(+8.98%) |c=64:8777.7 -> 9098.9 tok/s(+3.66%) ||
Qwen3.5-35B-A3B-FP8(GDN+MoE) |-0.04%(27.02 GiB) |6/6exact prefix,max_diff=0.0|7010 -> 6450 tok/s(pre-e00c4146e;-4.14%TP=2 post-fix) |95.03 -> 121.41 tok/s(+27.76%) |c=16:896.6 -> 903.8 tok/s(+0.80%) ||
Qwen3-VL-8B-Instruct(VLM) |0.0%(42.80 GiB) | Semantic image match (PASS) | 1-image E2E:175.34 -> 174.94 ms(-0.23%) | 4-image E2E:711.30 -> 711.30 ms(0.0%) |cudagraph_mm_encoder=True:175.99 ms/712.95 ms(PASS) |3. TP=2 Multi-Subsystem Compiled + CUDAGraph Interleaved A/B (S5000
MP60)| Model (
TP=2) | Subsystem | KV Cache Delta | Greedy Parity | Prefill (Base -> Cand) | Decodec=1(Base -> Cand) | Batched Decode (Base -> Cand) ||---|---|---|---|---|---|---|
|
Qwen3-8BBF16 | Dense + MRV2 seeded + IPC |0.0%(50.10 GiB) |6/6exact prefix |14639 -> 14589 tok/s(-0.34%) |109.23 -> 110.06 tok/s(+0.76%) |c=32:2109.2 -> 2683.2 tok/s(+27.21%) ||
Qwen3-30B-A3B-FP8| FP8 MoE (E=128) |0.0%(41.60 GiB) |6/6exact,max_diff=0.0|6494 -> 6627 tok/s(+2.04%) |94.95 -> 94.27 tok/s(-0.72%) |c=32:1960.2 -> 1960.5 tok/s(+0.02%) ||
DeepSeek-V2-Lite-Chat| MLA (FLASHMLA+ MP60 MoE) |0.0%(44.56 GiB) |6/6exact 1st tok |3321 -> 9064 tok/s(+172.97%) |73.15 -> 98.36 tok/s(+34.46%) |c=16:777.3 -> 960.9 tok/s(+23.62%) ||
Qwen3.5-35B-A3B-FP8| Hybrid GDN + Folded FP8 MoE |-0.05%(39.02 GiB) |6/6exact prefix |5767 -> 5529 tok/s(-4.14%) |93.07 -> 132.14 tok/s(+41.98%) |c=16:1075.1 -> 1094.3 tok/s(+1.79%) ||
DeepSeek-V2-Lite + Eagle3| Spec-Decode (eagle3,k=3) |0.0%(37.49 GiB) |6/6exact,max_diff=0.0| Baselinev0.32.0-dev:CRASH(EngineDeadError) -> Cand:10129 tok/s| Baseline:CRASH-> Cand:133.56 tok/s(+35.8%vs non-spec98.36) |c=8:762.24 tok/s(PASS) |4. OpenAI HTTP
vllm serveMulti-Turn + 8-Way Concurrent Burst Gate (S5000)| Serve Target | Attention Backend | KV Cache / CUDAGraph | 5-Turn Chat Reply Chars | 8-Way Mixed-Seed Burst Chars | Error-Log Audit |
|---|---|---|---|---|---|
|
Qwen3-8B-FP8(TP=1) |FLASH_ATTN|51.75 GiB(376,768tok) /1.06 GiB|[143, 463, 151, 517, 140]|[220, 220, 226, 227, 216, 217, 210, 213]|PASS(no non-contiguous FP8 / Triton fallback) ||
Qwen3.5-2BGDN (TP=1) |FLASH_ATTN|56.24 GiB(2,495,926tok) /0.78 GiB|[32, 413, 141, 411, 127]|[205, 212, 208, 191, 209, 196, 232, 196]|PASS||
DeepSeek-V2-Lite-Chat(TP=1) |FLASHMLA|32.67 GiB(1,127,680tok) /0.82 GiB|[97, 459, 100, 491, 110]|[250, 193, 235, 193, 183, 193, 193, 242]|PASS|