Configure Ascend Slicing Mode
Use this procedure to switch a HAMi-managed Ascend node between fixed-template hard slicing and hami-core soft slicing. Whole-card workloads are selected by a count-only request and can run in either node mode.
Stop or migrate partial-memory Ascend workloads on the target nodes before changing their mode. Hard- and soft-slice workloads are not migrated between modes.
TOC
Understand the effective configurationUpdate the custom resourceConfigure logical scheduling slotsWait for the change to take effectVerify with a workloadUnderstand the effective configuration
The v1.4.1 Alauda delivery normally has spec.config.create: false and reuses the HAMi-owned hami-scheduler-device ConfigMap. In this layout, changing only spec.hamiVnpuCore.enabled does not update the shared ConfigMap and therefore does not change the effective node mode.
Use the structured spec.nodeConfig object on the HAMiAscendDevicePlugin resource for an explicit per-node setting. The chart renders it into hami-device-node-config, and the matching node entry overrides the global value. The CRD preserves the open spec object; the installed chart schema defines the nodes shape.
Check the current owner and effective values:
Interpret the node annotation only for partial-memory requests:
hami-vnpu-core=false: fixed-template hard slicing;hami-vnpu-core=true:hami-coresoft slicing;- whole card: selected by requesting only the count resource, regardless of this annotation.
Update the custom resource
Edit the existing instance; do not create a second HAMiAscendDevicePlugin instance:
Set spec.nodeConfig as an object. Preserve entries for other nodes when editing the list.
To enable soft slicing on one node:
To select hard slicing instead, set the node value to false:
Use the exact Kubernetes Node name reported by kubectl get nodes. The nodes list is part of the object and must remain under spec.nodeConfig.
For an instance whose nodeConfig contains only this node, the equivalent complete patch commands are:
These merge patches replace the complete spec.nodeConfig object. When it already contains other nodes, use kubectl edit and preserve every required entry instead of applying the single-node patch.
Configure logical scheduling slots
vDeviceCount is the number of logical scheduling slots reported for each physical NPU. It does not split memory into equal pieces and is not a universal soft-slice default.
Leave it unset to use the value derived from the installed device configuration:
For example, the delivered configuration derives 4 slots for Ascend 910B4-1 from 65536 / 16384. Set a different integer only when the capacity plan intentionally permits that many concurrent allocations. The following value 20 is an operator-selected concurrency policy, not the Ascend 910B4-1 default:
Do not quote vDeviceCount as a string. Each workload remains constrained by its memory and optional core requests.
Wait for the change to take effect
After changing spec.nodeConfig, verify that the generated ConfigMap changed and that a new Ascend Device Plugin Pod has loaded it. The scheduler and ADP read their device configuration at process startup; a live ConfigMap edit does not refresh an existing process. A Helm/operator reconciliation that rolls the Pod is the normal update path:
If the custom resource and generated ConfigMap contain the intended value but the DaemonSet did not roll out, restart only the operator-managed Device Plugin:
Do not restart the HAMi scheduler or application workloads merely to reload hami-device-node-config. Do not edit the generated ConfigMap as the normal update path; change its owning custom resource instead.
Verify with a workload
- For hard slicing, use the hard-slice manifest.
- For soft slicing, use the soft-slice manifest.
- For whole-card allocation, use the whole-card manifest.