fix(musa): build the rope store-hint variants during warmup #327
All Vouch review confidence checks passed
Residual risk 0.29 = Change Risk (0.50) × (1 − Review Confidence (0.43)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.50 · 420 lines diff across 5 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.362
Shallow Review Depth
shallow_review_depth
0.344
Ai Authored
ai_authored
0.050
Real PR Conversation Timeline
1 comments
"Review active on #327"
general
weight: 0.35
yeahdongcn
Summary
Stacked on #326 (base
xd/musa-arch-infra); retarget tov0.32.0-devafter #326 merges.The MUSA rotary-embedding kernel picks its cache-store hint from the runtime token count:
stcgfor 512..2048 tokens at rotary width 64,stwbotherwise. Each hint is its own JIT module, so a server that had only seen short batches built the other module the first time a batch crossed 512 tokens, in the middle of serving.The DeepGEMM warmup runs before graph capture for every model. It now loads every hint the kernel can pick, for each rotary width a live call path hands the kernel. It builds nothing a live path cannot reach:
MusaRotaryEmbedding: counts when CustomOp dispatches it toforward_oot,VLLM_MUSA_CUSTOM_OP_USE_NATIVEis unset, and the config does not prefer the Qwen3 QK-RoPE-KV pre-split.- The pre-split replaces the rotary calls (default Qwen3 compiled servers), so those models build no rope module.
- The width comes from the module's
cos_sin_cache, so partial-rotary models use the rotated width.MusaVisionApplyRotaryEmb: counts unlessVLLM_MUSA_CUSTOM_OP_USE_NATIVEis set.A separate docs commit, unrelated to the rope change, removes
export VLLM_DISABLE_COMPILE_CACHE=1from the two Qwen3.5-27B recipes (docs/cookbook/qwen/qwen3.5-27b-bf16.md,qwen3.5-27b-fp8.md). Both run with compilation modeNONE, where vLLM never compiles the model and never reads or writes its compile cache, so the variable has no effect.Test plan
On 2x MTT S5000, driver 5.2.0-server, image
vllm:v0.32.0-ph1-5.2.0-torch2.11.0.post2-20261106(digest-pinned), this branch built from source with torchada 0.1.107 (MooreThreads/torchada#146):tests/test_rope_store_hint_prewarm.py: 53 passed. It needs no device.MusaRotaryEmbeddingon the device:- dispatch is
forward_oot;- warmup builds
vllm_musa_rope_stwbandvllm_musa_rope_stcg;- 700-token and 100-token calls build nothing new and match
forward_nativewithin bf16 tolerance.--enforce-eager(rope kernel live): warmup logsLoaded MUSA rotary-embedding kernels: vllm_musa_rope_stwb. The requests build no new module, and 4/4 pass.vllm_musa_rope_stwb, and 4/4 requests pass.-
tests/test_rope_store_hint_prewarm.pypassed on the device, inside the focused set listed on #326.- BF16 was ready in 543 s and FP8 (
quantization=fp8) in 282 s.- Each answered 3/3 requests correctly, including a 1479-token prompt, and MTP accepted its drafted tokens.
- Both logs say "Inductor compilation was disabled by user settings" and contain no compile-cache or AOT load/save lines. Neither run wrote a
torch_compile_cachefile under its freshVLLM_CACHE_ROOT.AI assistance: Claude Code drafted this change and ran the MUSA validation listed above.