The Ascend DRA Driver (ascend.project-hami.io) exposes Huawei Ascend NPUs through Kubernetes Dynamic Resource Allocation (DRA).
The driver provides two allocation modes:
- HAMivNPUCore sharing, which has been validated and requires the
DRAConsumableCapacityfeature gate. - Full-card and traditional vNPU allocation, which remains under development and is not production-ready.
- A Linux node with supported Huawei Ascend hardware
- Ascend Driver, DCMI,
npu-smi, and Ascend Docker Runtime - A container runtime with CDI enabled
- Kubernetes 1.34 or later with
DynamicResourceAllocationenabled - Helm 3 and kubectl for deployment
- Docker, GNU Make, and Go 1.26 for building
The Helm chart is in deployments/helm/ascend-dra-driver. The chart enables HAMivNPUCore by default.
To opt into the experimental full-card and traditional vNPU modes instead:
helm upgrade --install ascend-dra-driver \
deployments/helm/ascend-dra-driver \
--namespace ascend-dra-driver \
--create-namespace \
--set kubeletPlugin.fullCardAndTraditionalVNPU.enabled=trueThis setting disables the HAMivNPUCore feature gate.
The Kind demo shows how to deploy the driver and allocate Ascend NPUs with a ResourceClaim. On an ARM64 Ascend host, configure the physical card IDs in demo/kind-vnpu/demo.env, then run:
cd demo/kind-vnpu
./demo.sh allSee the demo documentation for ResourceClaim examples, configuration, additional commands, and troubleshooting.
Clone the repository with its submodules:
git clone --recurse-submodules https://github.com/4pdOss/hami-dra-driver.git
cd hami-dra-driverRun the checks:
make assert-fmt
make vet
go test ./...
go test ./cmd/ascend-dra-kubeletplugin \
-run 'TestMockDRA|TestMockDRALibvNPU' -v
make verify-helm-chartBuild libvnpu in an environment with the required Ascend development libraries, then build the driver image:
make libvnpu-artifacts
make image \
IMAGE_NAME=example.com/ascend-dra-driver \
VERSION=0.1.0 \
BASE_IMAGE=ubuntu:20.04The default image repository is projecthami/ascend-dra-driver. IMAGE_NAME, VERSION, BASE_IMAGE, and GOPROXY can be overridden.
Contributions are welcome. Changes to the allocation lifecycle should include tests for device discovery, published resources, Prepare and Unprepare behavior, CDI edits, checkpoint state, and error cleanup.
Contributions require a Developer Certificate of Origin (DCO).
Open a GitHub issue for questions, bugs, or feature requests. Include driver logs, relevant ResourceClaim and ResourceSlice objects, Kubernetes version, Ascend hardware model, and Ascend driver version.