refactor: unify vLLM-MUSA registration around native vLLM plugin contracts #365
All Vouch review confidence checks passed
Residual risk 0.23 = Change Risk (0.57) × (1 − Review Confidence (0.60)).
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.17 · 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.289
Ai Authored
ai_authored
0.050
Real PR Conversation Timeline
1 comments
"Review active on #365"
general
weight: 0.35
yeahdongcn
Summary
Unifies vLLM-MUSA's registration architecture around vLLM's native out-of-tree plugin contracts (superseding #359 and #362 without adding a parallel manifest or global registry):
pyproject.toml,vllm_musa/__init__.py):-
vllm.general_pluginsdeclaresmusa_out_of_tree = "vllm_musa:register_out_of_tree"andmusa_attn_backends = "vllm_musa:register_attn_backends", removing the legacymusa_custom_opsalias and allVLLM_PLUGINS=musa,musa_custom_opssettings across docs, cookbook recipes, and examples (vLLM auto-discovers all installed plugins whenVLLM_PLUGINSis unset).- Deferred
maybe_register_musa_template_heuristics()out of bareimport vllm_musainto_register_patches().- Aligned
MUSAPlatformBase.import_kernels()to load all four AOT extensions (vllm._C,vllm._C_stable_libtorch,vllm._moe_C,vllm_musa._C), matching #360'sNATIVE_MODULES.vllm_musa/ir/fromvllm_musa/kernels/:- Moved IR providers into
vllm_musa/ir/{layernorm.py,gated_qkv.py}(1:1 with upstreamvllm/ir/ops/), loaded exclusively byMUSAPlatformBase.import_ir_kernels().-
vllm_musa/kernels/holds only standalone MUSA/Triton kernel helpers (no IR registration or re-export shims).install_hooks()for all 14 compatibility adapters:- 7 model-executor adapters wired into
vllm_musa.model_executor.register_model_executor_adapters()(cleanly separated from the 8@*.register_ootlayers).- 7 v1 runtime adapters wired into
vllm_musa.v1.register_v1_adapters()(withmla/commoncat-4a drift tripwire regenerated).-
vllm_musa/ir/layernorm.pywires MUSA JITmusa_csrc_rmsnormahead of_C::rms_normunder@ir.ops.rms_norm.register_impl("musa").-
MusaRMSNorm.forward_oot()delegates non-residual RMSNorm toself.forward_native(x, residual)->vllm.ir.ops.rms_norm;get_default_ir_op_priority()honorsVLLM_MUSA_CUSTOM_OP_USE_NATIVEand quantized PIECEWISE safety routing.- Added
docs/vllm_musa/registration.mdandtests/test_registration_architecture.py(wired into.github/workflows/patch-series.yml).Alignment with #360
When rebasing onto #360 (
codex/v032-image-runtime-refactor):lora_filesystem_resolverandlora_hf_hub_resolverunder[project.entry-points."vllm.general_plugins"].musa_custom_ops->musa_out_of_tree+musa_attn_backendsin #360'stests/packaging/verify_install.pyandtests/packaging/verify_bundled_wheel.py.Validation
Offline & CI (
543945ba8)pre-commit runon all changed files: 15/15 passed (isort,ruff,black,codespell,check-toml,check-ast, etc.)pytest -q tests/test_v1_worker_import_order.py tests/test_registration_architecture.py: 29 passed, 5 skipped (runtime MUSA tests run on S5000 below)Patch series gates / offline-series&Cookbook site / buildgreenS5000 Runtime & Functional Validation
worker34068(10.20.34.68), MTT S5000 (GPUs 6 & 7), pre-built imagesh-harbor.mthreads.com/mcctest/vllm:v0.32.0-ph1-5.2.0-torch2.13.0.post1-20261124@sha256:3bd17e280acd003685a88a337cde333022c713449bfd59a0a7ab6936619fa889(torch 2.13.0.post1+musa5.2.0,torchada 0.1.111,mate 0.2.8.post1,vllm 0.32.0)VLLM_PLUGINSauto-discovery & custom-op invocation (96f40aac1):unset VLLM_PLUGINS && pytest -q tests/test_registration_architecture.py tests/test_fused_add_rms_norm_compile.py— 27/27 passed (verifies automatic plugin discovery, 4 AOT extensions loaded, direct MUSA execution + parity of AOT_C_musa_ops::musa_fused_add_rms_normand JITvllm::musa_csrc_rmsnorm, all 14 adapters_HOOKS_INSTALLED, andMusaRMSNormOOT -> IR dispatch).125895a08):tests/test_registration_architecture.py+tests/test_musa.py+tests/test_fused_add_rms_norm_compile.py— 103/103 passed;Qwen3.5-27B-FP8TP2+MTP1 chat smoke returned"Beijing".S5000 A/B Serving Performance (Baseline pre-built image vs PR #365)
All runs use identical model checkpoints, cookbook flags,
vllm bench serverandom1024 -> 256(--seed 12345 --ignore-eos), and verifiedFLASH_ATTN+ graph capture withVLLM_PLUGINSunset:| Model / Config | Concurrency | Baseline Out tok/s | PR #365 Out tok/s | Delta | Baseline TTFT / TPOT p50 | PR #365 TTFT / TPOT p50 |
| --- | --- | ---: | ---: | ---: | --- | --- |
|
Qwen3-8B-FP8(TP1,FULL_AND_PIECEWISE) | c=1 (n=16) | 89.45 | 89.50 | +0.06% | 49.86 / 9.44 ms | 50.19 / 9.44 ms ||
Qwen3-8B-FP8(TP1,FULL_AND_PIECEWISE) | c=16 (n=64) | 163.32 | 163.97 | +0.40% | 330.69 / 12.98 ms | 335.23 / 12.98 ms ||
Qwen3.5-27B-FP8(TP2, MTP1,FULL_DECODE_ONLY) | c=1 (n=16) | 34.20 | 34.18 | -0.06% | 153.87 / 15.15 ms | 153.74 / 15.19 ms ||
Qwen3.5-27B-FP8(TP2, MTP1,FULL_DECODE_ONLY) | c=16 (n=48) | 158.21 | 158.62 | +0.26% | 440.96 / 28.13 ms | 499.67 / 28.49 ms ||
Qwen3.5-35B-A3B-FP8(TP2 MoE,FULL_DECODE_ONLY) | c=1 (n=16) | 40.14 | 40.02 | -0.30% | 108.53 / 10.98 ms | 109.15 / 11.01 ms ||
Qwen3.5-35B-A3B-FP8(TP2 MoE,FULL_DECODE_ONLY) | c=16 (n=48) | 713.71 | 712.13 | -0.22% | 503.02 / 17.12 ms | 502.07 / 17.23 ms |All three models (TP1 Dense
FULL_AND_PIECEWISE, TP2 Dense + MTP1, TP2 MoE + Mamba/Hybrid) are within ±0.4% throughput parity with the stock pre-built image.