← Back to Pull requests

feat(device): route arch gates through MusaDeviceSpec instead of (3, 1) literals #292

Closed
unknown closed this pull request without merging on Oct 22, 2026 08:54 UTC
View on GitHub
unknown unknown commented on Oct 22, 2026 07:07 UTC
Author

MUSA capabilities are not ordered the way NVIDIA compute capabilities are: warp width is 32 on mp_31 and 128 elsewhere, native FP8 is an mp_31-only build feature, and the SM count differs per bin inside one arch. device_capability == (3, 1) therefore reads like an ordering while being an identity check, and an unvalidated arch silently inherits (or silently loses) the S5000 path.

This adds vllm_musa/device_spec.py with a frozen MusaDeviceSpec, capability answers taken from explicit per-arch sets, a None ("unknown") result when the device probe fails, and a one-time warning for arches outside VALIDATED_MUSA_ARCHS. Six runtime gates now route through it (_custom_ops, platform.supports_fp8, pass_manager, gated_qkv, fused-MoE FP8, fused-MoE tactic selection) and the MoE fingerprint reads the same spec so the tactic key and the gates cannot disagree.

The three remaining NVIDIA-threshold comparisons are left alone: the first two are already short-circuited by an explicit is_musa() branch, so rewriting them would be no-op churn. A source-scan test pins that allowlist and fails on any new capability literal.

Verified on MTT S5000 80GB, driver 5.2.0-server, mcc 5.2.0, torch 2.11.0.post2+musa5.2.0 (image v0.32.0-ph1-5.2.0-torch2.11.0.post2-20261022): pytest tests/test_device_spec.py tests/test_chunked_min_p_sampler_source.py -> 12 passed. Tests cover mp_22/mp_32/mp_42 failing closed on both predicates, arch code/name derivation, cache_tag distinguishing MP bins, a failed probe yielding None, and the lint guard.

Diff: 194 lines (+145 / -49) across 2 files Reviewer: yeahdongcn Review duration: 107m
All Vouch review confidence checks passed
Residual risk 0.16 = Change Risk (0.41) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.41 · 194 lines diff across 2 files
0.41
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
0.17
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
60%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq
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.315
Shallow Review Depth shallow_review_depth
0.289
Ai Authored ai_authored
0.050
Real PR Conversation Timeline
1 comments
"Review active on #292"
general weight: 0.35
Reviewers
Assignees
Unassigned
Labels
risk: low confidence: 60.5% reviewed
Vouch Risk Breakdown
AI-powered review risk analysis
Change Risk
Change Risk · Model 1 (XGBoost)
Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
Score: 41% (MEDIUM) · Higher = larger blast radius
41%
Review Confidence
Review Confidence · Models 2 & 3
Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
Score: 60.5% · Lower = rushed or shallow review
60.5%
Residual Risk
Residual Risk · Core Equation
Residual = Change × (1 − Confidence)
Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
Score: 16.2% · Safe to merge
16.2%