fix(ascend): stop A5 from receiving a ranktable its HCCL rejects - #27
Merged
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces a new Device resource injection policy for the Docker deployer, allowing direct injection of device nodes and bind mounts without relying on a CDI-capable Docker or setting visible-devices environment variables. It also updates the Ascend CDI generator to omit the host ranktable on A5 (Ascend 950) hosts to prevent initialization failures, and adds a warning for incompatible ranktables. Feedback suggests calling the ranktable warning only under the Env policy since other policies already prevent mounting it, and defensively checking for the ranktable path's presence before removing it from the mount list.
Supersedes #25. yxf0314's diagnosis was right that multi-card A5 needed a change; this takes the part of it that holds up, and drops the rest. A5 loads libhccl_v2.so, which accepts a 2.0 ranktable only. Ranktable format is bound to the chip generation -- 1.0 for A2, 1.2 for A3, 2.0 for A5 -- so a table left over from an older fleet is refused, not ignored: HCCL fails with Config_Error_Ranktable(EI0014) and multi-card init never happens. Isolated on an 8x Ascend950PR host: mounting only /etc/hccl_rootinfo.json into an otherwise working container reproduces EI0014, mounting only driver/topo does not. Two things follow, and nothing else does. GPUStack stops mounting the file on A5. This is its own mount list only, so it covers the CDI path. Older generations keep the file, which is correct for them. Under the default Env policy the mount is ascend-docker-runtime's -- addUBMount is a bare os.Stat with no version check -- so GPUStack cannot prevent it and reporting is the only available action. A one-shot warning names EI0014 and says the file must be absent or 2.0. An absent file is the healthy host and stays silent; so does an older generation with its own table, since only the A5 row of the generation mapping has a measured failure behind it. This is defence, not repair: with the host file moved aside, unmodified gpustack-runtime already runs GLM-5.3-Flash TP=8 under the default policy. What it stops is a node's leftover ranktable silently killing multi-card workloads on it. Deliberately not included, having been measured and found unnecessary: A Device injection policy. It adds a configuration knob that does nothing by default, on the Env path where the vendor runtime does the mounting -- so it would not protect anyone who had not already been told to configure it. Its isolation is also nominal in the shape GPUStack deploys in, since a privileged container sees every device node whatever it was granted. Mounting the whole /usr/local/Ascend/driver for A5. driver/ube_mgmt is a staging directory for upgrade-tool holding one zero-byte lock file; no library under driver/lib64 references it, and the urma symbols are already inside the lib64 mount. The tree would also carry upgrade-tool and hccn_tool into a container holding /dev/davinci_manager, plus the CA store and 2570 kernel sources.
thxCode
force-pushed
the
feat/ascend-device-injection-policy
branch
from
September 6, 2026 13:55
4c92a8b to
535e7a4
Compare
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.
Supersedes #25. @yxf0314's diagnosis was right that multi-card A5 needed a change — this takes the part of it that holds up on hardware, and deliberately drops the rest.
Summary
This is defence, not repair. With the host's stale ranktable moved aside, unmodified
gpustack-runtimealready runs GLM-5.3-Flash TP=8 under the defaultEnvpolicy, serving real requests. Nothing is blocked today once the host file is right. What this PR stops is a node's leftover ranktable silently killing every multi-card workload on it, with an error that gives the operator nothing to go on.The failure chain, measured on an 8x Ascend950PR host:
ascend-docker-runtimemounts/etc/hccl_rootinfo.jsonwhenever the host has it (addUBMountis a bareos.Stat, no version check). A5 loadslibhccl_v2.so, which accepts a 2.0 ranktable only. A table left from an A2 fleet is 1.0, so HCCL refuses it withConfig_Error_Ranktable(EI0014)and multi-card init never happens. Ranktable format is bound to the chip generation — 1.0 = A2, 1.2 = A3, 2.0 = A5 (ascend-operator/pkg/ranktable/common/common.go:37-38,ranktable/v2dot0/ranktable.go:27). Isolated: adding only that file to an otherwise-working container reproducesEI0014; adding onlydriver/topodoes not. Nothing inlibhccl_v2.so'sHCCL_*/RANK_*/ASCEND_*strings disables the check, so not mounting the file is the only lever.The file is user-maintained state — it belongs to no driver package, and the vendor documents it as generated by mindcluster-tools and mounted only when present. The operating rule is simply: either absent, or a 2.0 table.
Changes
EI0014. On the defaultEnvpath the mount is the vendor runtime's and GPUStack cannot prevent it, so reporting is the only available action — the warning says the file must be absent or 2.0. An absent file is the healthy host and stays silent; so does an older generation with its own table, since only the A5 row of the generation mapping has a measured failure behind itDeliberately not included
Both were built and measured, then dropped:
Deviceinjection policy (feat(ascend): add Device injection policy and fix A5 driver/UB mounts #25's main proposal). It adds a configuration knob that does nothing by default — and the defaultEnvpath is exactly where the vendor runtime does the mounting, so it would only protect operators who had already been told to configure it. Its isolation is also nominal in the shape GPUStack deploys in: a privileged container sees every device node whatever it was granted, and GPUStack deploys workloads privileged today/usr/local/Ascend/driverfor A5 (feat(ascend): add Device injection policy and fix A5 driver/UB mounts #25's other change).driver/ube_mgmt/is a staging directory forupgrade-tool --upgrade_ube_mgmt_packholding a single zero-byte lock file; no library underdriver/lib64/references it, andube_mgmtappears zero times in all of mind-cluster. The real UB code (libascend_hal.so, 15urmasymbols;libibv_extend.so*) is already inside thelib64mount. The tree would also carrydriver/tools/(upgrade-tool,hccn_tool, both0555, beside ~120 MB of firmware images) into a container that already holds/dev/davinci_manager, plusdriver/cert/caand 2570 DKMS kernel sourcesVerification
uv run pytest: 651 passed, 20 skipped;pre-commitclean (ruff check, ruff format, codespell, commitizen)ascend-docker-runtimev26.1.0, CANN 9.1). The end-to-end confirmation that GLM-5.3-Flash TP=8 serves once the host ranktable is corrected was taken against unmodified 0.2.4.post1, which is what establishes the defence-not-repair framing aboveNot covered
That host is a card-4p inference node with no super-pod UB interconnect (
spod-infounsupported, no/dev/uburma, no user-spaceurmalibraries; card-internal UB endpoints do enumerate through dcmi). It therefore says nothing about #25's original claim that env-triggered isolation hides the UB fabric — that needs a super-pod-attached A5.EI0014explains the observed failure completely without invoking UB.The evidence is also single-node. A multi-node deployment does need a ranktable; when that lands it has to be a 2.0 one, and this is noted in the code.