Skip to content

feat: package ascend npu support for adx - #174

Open
mhsong1998-dot wants to merge 1 commit into
inclusionAI:developfrom
mhsong1998-dot:smh/ascend-npu-adx
Open

mhsong1998-dot wants to merge 1 commit into
inclusionAI:developfrom
mhsong1998-dot:smh/ascend-npu-adx

Conversation

@mhsong1998-dot

@mhsong1998-dot mhsong1998-dot commented Nov 19, 2026 •

Copy link
Copy Markdown

Enable opt-in Ascend NPU sandboxes on Linux/amd64 runc workers. Package the checksum-pinned Ascend adapter, mount host driver paths read-only, and constrain Helm placement to labeled Ascend workers. The SDK forwards runtime="runc" and the normalized NPU request to ADX. When Ascend is enabled in standalone, ADX reads device inventory from the sandboxd resource socket.

Depends on sandboxd #39, pinned at b2ae9fe, and adapter PR #2. The build pins the released adapter bundle from adapter commit 90f3049 by SHA-256.

Host validation

On Huawei Cloud cn-south-1f (ai2.4xlarge.4, one physical Ascend 310P3, HCE 2.0 x86_64, HDK 22.0.4, CANN 6.0.0), ADX and sandboxd ran directly on the host at AKernel commit 348bbc7. The runc sandboxes used a local OCI image.

  • The SDK requested runtime="runc" and npu:ascend310p3:1. ADX scheduled the sandbox with /dev/davinci0, and CANN returned ACL_ADD_OK: [11, 22, 33, 44].
  • After deleting the first sandbox, the SDK created a second sandbox with the same request, and CANN returned the same result. The device was available again after cleanup.

The temporary ECS instance and its attached resources were released.

Six-device Ascend 310P3 source candidate

On a Huawei Cloud Guangzhou x86 host with six physical Ascend 310P3 devices (HCE 2.0, HDK 22.0.4, CANN 6.0.0), the source candidate mapped logical IDs 0–5 to /dev/davinci suffixes 0, 2, 4, 6, 8, and 10. Two concurrent ADX runc sandboxes using the default EROFS lower each saw its allocated compute node (davinci0 or davinci2), and both returned ACL_ADD_OK: [11, 22, 33, 44]. Free devices went from six to four to six, and a later sandbox reacquired device 0. npu-smi info -l inside both sandboxes still returned -9005. The temporary host was released.

CCE package verification

At AKernel c901d9e, all 59 ELF and build-helper tests passed on Linux/amd64 CCE. The installer smoke verified the adapter archive checksum, native ELF, version output, and the sandboxd mount profile. The physical results above were obtained with the source candidate.

The pinned sandboxd and adapter now share one node-ID contract for admitted 310P and 910 A2/A3 cards. CCE covered a synthetic sparse Ascend910 allocation. A2/A3 hardware validation is pending.

Host validation of the current pins

ADX and sandboxd ran directly on a Huawei Cloud Guangzhou x86 host with six physical Ascend 310P3 devices (HCE 2.0 kernel 5.10.0-182.0.0.95.r1941_123.hce2.x86_64, driver 22.0.4, runc 1.5.1, CANN 6.0.0). The test used ADX 0b7a07f91bfb, sandboxd 2ce8457 built on CCE, and the published Adapter v0.1.0-rc.4 review bundle from 90f3049, as pinned by AKernel c901d9e.

  • All six discovery and CDI edits mapped logical IDs 0–5 to node suffixes 0, 2, 4, 6, 8, and 10.
  • Two concurrent runc sandboxes used the default EROFS lower. Each saw only its allocated compute node (/dev/davinci0 or /dev/davinci2). Both returned ACL_ADD_OK: [11, 22, 33, 44].
  • ADX free capacity went from six to four to six after deletion. A new sandbox reacquired device 0. The final runc inventory was empty.
  • In-sandbox npu-smi info -l returned -9005 in both sandboxes. The temporary ECS, EIP, and EVS disk were released.

Review fixes

AKernel f0f19b0 pins sandboxd 255c5b3 with stale-attempt cleanup protection, allocation-scoped Ascend environment ownership and runtime-aware accelerator capacity. It consumes the published Adapter v0.1.0-rc.4 asset with the same SHA-256 as the hardware-tested bundle. The prior hardware record above predates these lifecycle fixes. CCE package tests and focused race tests passed for the sandboxd fixes, along with vet and a read-only-module build.

Current review revision

AKernel e68e4ce incorporates develop c05fed0 and pins sandboxd b2ae9fe. Both PR branches consolidate their feature changes into one signed-off commit. The SDK conflict preserves both the Ascend encoding regression and the temporary-image deletion regression. Runtime recovery returns Unavailable for valid NPU requests, while incompatible allocations retain InvalidArgument.

The earlier Standalone E2E run exhausted its 60-minute job budget after a successful 59m30s image build. Slow APT downloads through the configured mirror consumed the time. Standalone startup was cancelled after approximately 24 seconds and SDK E2E did not run. The workflow configuration matches develop. Run log

CCE validation at e68e4ce passed all 547 SDK unit tests and all 59 ELF/build-helper checks.

Signed-off-by: mhsong2 <songminhui2@huawei.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant