feat: add ENPU slicing and optional mem-swap allocation #141
All Vouch review confidence checks passed
Residual risk 0.22 = Change Risk (0.50) × (1 − Review Confidence (0.57)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.50 · 638 lines diff across 7 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.386
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #141"
general
weight: 0.35
archlitchi
What type of PR is this?
/kind feature
What this PR does / why we need it:
Adds
enpuas an opt-in Ascend backend alongside hami-vnpu-core and hardware vNPU templates. HAMi-selected devices receive per-container vCANN-RT configuration and runtime mounts, withfixed-share,elastic, orbest-effortpolicies.1.0.0in the official ARM64 compiler image, record provenance/checksums, and bundle the assets and upstream license in the device-plugin image.hami.io/enpunode capability annotation, synchronized with the companion scheduler, while retaining the existing hami-core annotation.Which issue(s) this PR fixes:
Part of #140. Companion HAMi scheduler PR: https://github.com/Project-HAMi/HAMi/pull/3110. Deploy both changes together for ENPU admission, scheduling, and runtime allocation.
Special notes for your reviewer:
ENPU is disabled by default. This initially supports one physical DIE per container and retains the Ascend RuntimeClass. A3/910C requires independent-DIE mode; A2/910B is a configuration compatibility target, not an additional hardware-validation claim.
Official release
1.0.0provides ordinary slicing only. The manager path is optional preparation for upstream mem-swap and does not change the pinned release build. Automatic manager allocation cleanup on Pod deletion is not implemented in this PR.Validation:
1.0.0supports mem-swap.TestNewPluginServerparallel global-map write; it reproduces on the pre-fix source. That unrelated path is unchanged.Does this PR introduce a user-facing change?:
Yes. Users can explicitly request
huawei.com/vnpu-mode: enpuand configure its policy. Mem-swap requires compatible upstream components and additional manager configuration. Existing deployments keep ENPU disabled unless configured otherwise.AI Disclosure:
Codex assisted with implementation, review, tests, documentation, and this PR description.
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
Summary by CodeRabbit
New Features
Added optional ENPU (vCANN-RT) runtime slicing for supported Ascend devices, with configurable scheduling policies and compute and memory quotas.
Added mem-swap support for memory oversubscription, along with deployment settings and workload examples.
Added Helm configuration for ENPU, including node-level enablement and runtime settings.
Added ENPU-enabled image builds, runtime asset verification, and checks when installing runtime assets.
Added persistent ENPU allocation tracking and Prometheus metrics for ENPU device and workload resource usage.
Documentation
Added ENPU setup guidance, hardware requirements, configuration and monitoring examples, and English and Chinese usage instructions.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->