Repository navigation
feat: package ascend npu support for adx - #174
Open
mhsong1998-dot wants to merge 1 commit into
Open
mhsong1998-dot wants to merge 1 commit into
mhsong1998-dot wants to merge 1 commit into
Conversation
This was referenced Nov 19, 2026
mhsong1998-dot
force-pushed
the
smh/ascend-npu-adx
branch
2 times, most recently
from
November 24, 2026 03:50
dfe4230 to
c53d647
Compare
Signed-off-by: mhsong2 <songminhui2@huawei.com>
mhsong1998-dot
force-pushed
the
smh/ascend-npu-adx
branch
from
November 26, 2026 02:49
f0f19b0 to
e68e4ce
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 commit90f3049by 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 commit348bbc7. The runc sandboxes used a local OCI image.runtime="runc"andnpu:ascend310p3:1. ADX scheduled the sandbox with/dev/davinci0, and CANN returnedACL_ADD_OK: [11, 22, 33, 44].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 -linside 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 ADX0b7a07f91bfb, sandboxd2ce8457built on CCE, and the published Adapterv0.1.0-rc.4review bundle from90f3049, as pinned by AKernelc901d9e./dev/davinci0or/dev/davinci2). Both returnedACL_ADD_OK: [11, 22, 33, 44].npu-smi info -lreturned-9005in both sandboxes. The temporary ECS, EIP, and EVS disk were released.Review fixes
AKernel
f0f19b0pins sandboxd255c5b3with 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
e68e4ceincorporates developc05fed0and pins sandboxdb2ae9fe. 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 returnsUnavailablefor valid NPU requests, while incompatible allocations retainInvalidArgument.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
e68e4cepassed all 547 SDK unit tests and all 59 ELF/build-helper checks.