Skip to content

About

Kubernetes device plugin for Ascend NPUs, supporting hard and soft NPU slicing with HAMi and Volcano.

Topics

Resources

Stars

40 stars

Watchers

3 watching

Forks

Latest commit

 

History

364 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ascend Device Plugin

FOSSA Status

English | 中文

Introduction

This Ascend device plugin is implemented for NPU-Slicing for HAMi and volcano. It supports three modes:

1. Template-based Hard Slicing (vNPU)

Memory slicing is supported based on virtualization template. For detailed information, check template

2. Soft Slicing with Runtime Interception (hami-vnpu-core)

The hami-core backend uses libvnpu.so for memory accounting and compute sharing. It defaults to cooperative CANN Cube/Vector budgets (spatial), with explicit dynamic, fixed, and overdraft time-scheduling policies available. See the HAMi configuration guide and hami-vnpu-core.

Note: hami-vnpu-core currently only supports ARM platforms.

3. Soft Slicing with ubs-virt-enpu (vCANN-RT)

The enpu backend provides compute and memory quotas through vCANN-RT, with optional memory oversubscription through a compatible enpu-manager/runtime. It supports A2/910B and A3/910C; the single-DIE mode prerequisite applies only to A3/910C. An existing ConfigMap entry for 910A does not imply ENPU support.

Before enabling ENPU, follow the official vCANN-RT configuration guide for the hardware, driver/CANN, runtime assets and container prerequisites. Use the HAMi ENPU guide for integration settings and the complete ordinary soft-slicing and mem-swap Pod examples. Mem-swap requires a version that includes that feature; annotations alone do not enable it in an older release.

Deployment & Usage

Prerequisites, deployment steps and usage examples differ depending on which scheduler you use:

Compile

update submodule:

git submodule update --init --recursive
make all

Build image

docker buildx build -t $IMAGE_NAME .

Build an ENPU-enabled image

CI and plain docker build reuse the public ENPU release 1.0.0 / CANN 9.1.0 runtime image pinned by digest in the Dockerfile, verify its assets, and bundle them alongside hami-vnpu-core. CI builds the AMD64 and ARM64 plugin images on native runners; only main and version-tag pushes publish a combined manifest. Prepare the existing hami-vnpu-core assets before building locally. To rebuild ENPU from source instead, run make docker-enpu VERSION=<image-tag> on an ARM64 Linux host with Docker, Git and Python 3. No NPU or host driver installation is required for compilation. See release build prerequisites and options.

License

FOSSA Status

About

Kubernetes device plugin for Ascend NPUs, supporting hard and soft NPU slicing with HAMi and Volcano.

Topics

Resources

Stars

40 stars

Watchers

3 watching

Forks

Releases

Packages

Used by

Contributors

Languages