feat(multiarch): make the MUSA architecture a fact - device spec, arch-keyed JIT cache, build stamp #299
All Vouch review confidence checks passed
Residual risk 0.25 = Change Risk (0.47) × (1 − Review Confidence (0.47)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.47 · 490 lines diff across 6 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.371
Shallow Review Depth
shallow_review_depth
0.344
Real PR Conversation Timeline
1 comments
"Review active on #299"
general
weight: 0.35
yeahdongcn
What this is
One change in three steps: on MUSA the architecture is a fact that has to be
identified, recorded and keyed on — not a literal to guess. Today the tree hardcodes
(3, 1),mp_31,--offload-arch=mp_31and__MUSA_ARCH_LIST__=310in a dozenplaces, so a second arch either silently runs the wrong kernels or is refused by
accident.
This consolidates what were three separate PRs (#292, #293, #296), because any
subset leaves the tree incoherent — e.g. a
MusaDeviceSpecthatjit.pydoes notuse yet.
| commit | what |
|---|---|
|
feat(device)|MusaDeviceSpec+ routing the six(3,1)gates through it ||
fix(jit)| JIT cache key carries arch andmccversion; nomp_31fallback ||
feat(build)| build-time arch stamp + import-time fail-closed assert ||
build(docker)| three arch selectors become ARGs, with a guard that they agree |Why the gating is a hard requirement, not hygiene
A wrong-arch cubin on MUSA does not fault.
musaDeviceSynchronizereturns 0 andthe output buffer is simply not written — so "the arch check is too strict" is not a
trade-off anyone should be allowed to make in a code review. The capability flags are
explicit booleans/sets rather than
>=comparisons because MUSA's axes arenon-monotonic: warp width 32 exists only on
mp_31, native FP8 only onmp_31, andthe SM count varies (48/52/56/60) within one arch. This follows the AMD/ROCm
pattern — arch identity plus explicit capability bits — rather than NVIDIA's
compute-capability ordering.
Verification
tests/test_device_spec.py— 12 passedtests/test_jit_cache_key.py— 8 passed (tag ismp_31__mcc5.2.0, not bare)tests/test_build_arch_stamp.py— 9 passed (manifest, stamp writer viaastextraction, runtime assert)mp_31/31/3.1PASS,mp_22/22/2.2PASS,mp_32/31/3.1REFUSE,mp_31/31/3.2REFUSE,mp31/31/3.1REFUSEVerified as one suite on the combined branch, on a real device:
Host
10.20.32.80(dev pool, S5000 80 GB, driver3.3.5-server), imagev0.32.0-ph1-5.2.0-torch2.11.0.post2-20261022, branchdsh/pr-musa-multiarch-foundation@e6b04c0d2d.The warning path was exercised too: this image has no build stamp (it predates
the change), and the assert degrades to
Refusing when a stamp exists and disagrees, but only warning when none exists, is
deliberate: every image built before this change has no stamp and would otherwise
be bricked on upgrade.
Dockerfile guard dry run:
mp_31/31/3.1PASS,mp_22/22/2.2PASS,mp_32/31/3.1REFUSE,mp_31/31/3.2REFUSE,mp31/31/3.1REFUSE.Rebased onto
v0.32.0-dev@93183864c3; the four commits cherry-picked cleanly.Not run
_write_build_stamp. The stampwriter itself is unit-tested by extracting the real function from
setup.pywithastand loading its output, and the Dockerfile guard was exercised as a shell dryrun, but no
pip install -e .was run here: the only host with this image has no/home/dist/ccache-vllm-musaand noccachebinary, andmusa-source-cacheforbids falling back to a cold build.
exercised on real S5000 hardware, but
get_device_spec()was not called from a livevllm serveon an mp_22 board — there is none available in the development pool.