fix(startup): pre-build both rope store-hint variants; drop the stale cache switch #300
All Vouch review confidence checks passed
Residual risk 0.24 = Change Risk (0.44) × (1 − Review Confidence (0.47)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.44 · 272 lines diff across 3 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
Shallow Review Depth
shallow_review_depth
0.344
Diff Size
diff_size
0.336
Ai Authored
ai_authored
0.050
Real PR Conversation Timeline
1 comments
"Review active on #300"
general
weight: 0.35
yeahdongcn
What this fixes
The rotary-embedding store hint (
stwb/stcg) is a compile-time constant inthe JIT module name, so each value is its own
.so. The auto policy picksstcgfor 512..2048 tokens andstwbotherwise, so a server that only ever sawshort batches builds the other variant the first time a batch crosses 512
tokens — an mcc build in the middle of serving.
This prewarms both variants from the warmup that runs before graph capture, and
drops
VLLM_DISABLE_COMPILE_CACHE=1from the two Qwen3.5-27B recipes, where itturned off the compile cache to work around a safelist gap the in-tree patch
already fixes.
Stacked on #299
Rebased onto
dsh/pr-musa-multiarch-foundation(#299), becauserope.pyreadsthe arch from
vllm_musa.device_spec. The earlier revision imported that modulefrom a base that did not have it, so the first prefill raised
ModuleNotFoundErrorwhile the warmup's ownexceptturned it into a bootwarning. Merge #299 first.
Review follow-ups in this revision
prewarm_rope_modules(rot_dim)builds one variant when the model's rotarywidth is not 64:
_store_hintonly returnsstcgatrot_dim == 64, so amodel with another width was paying for a build it could never load. The
warmup passes
head_dim, andNone(unreadable) keeps both — the safedirection.
at plugin registration.
only that the stub was called, and a new test pins
reachable_store_hints()per width.narrating what the removed switch used to work around.
Verification
Tests are pure Python with the JIT layer stubbed (
tests/test_startup_prewarm.py).Not run: an mcc build of the two variants on hardware, and a serving run that
crosses 512 tokens. The earlier
Built MUSA rotary-embedding kernels: mp31_stwb,line in this PR could not have come from the previous revision, whosemp31_stcg
base had no
device_spec; the claim is withdrawn until a leased run produces it.