You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Provisioning the PTO-ISA async-SDMA scratch workspace on an a2a3 device makes AICore fault recovery ~1000× slower (~0.3 s → ~306 s), and also changes the surfaced fault error code (507046 → 507015).
SdmaWorkspaceManager::Init() creates 48 STARS streams via aclrtCreateStreamWithConfig(..., ACL_STREAM_DEVICE_USE_ONLY). Those streams are device-visible and sit in the device fault/sync domain. Once any AICore task faults and poisons the card, tearing the 48 streams down — whether by aclrtResetDeviceForce/rtDeviceReset at finalize or by aclrtDestroyStream — blocks ~306 s. Merely provisioning the workspace (no SDMA op ever submitted) is enough to trigger this on the next AICore fault, because the cost is in creating/holding the streams, not using them.
This is latent on main (the SDMA workspace is provisioned only on the HCCL comm path today), and was surfaced while making single-card provisioning eager in PR #1406 (branch feat-sdma-prefetch-workspace-addr), which pointed the tests/st/aicore_op_timeout / tests/st/runtime_fatal_codes fault-injection STs at an SDMA-provisioned device.
Git Commit ID
simpler upstream/main4dbcc9c8; pto-isa pin 83d01313 (root cause is in SdmaWorkspaceManager::CreateStarsStreams). Reproduced on PR #1406 head.
Watch the device log (ASCEND_PROCESS_LOG_PATH): the fault (507015) surfaces in a few seconds, but DeviceReset/rtDeviceReset (or the stream teardown, if destroyed first) then blocks ~306 s before returning 507007.
Additional findings while narrowing the root cause:
Destroying the 48 streams before the reset does not help — the ~306 s just moves from rtDeviceReset into aclrtDestroyStream (poisoned-device teardown blocks either way).
The CANN-shipped SdmaWorkspaceManager (cann-9.0.0/include/pto/npu/...) creates the streams via rtsStreamCreate(RT_STREAM_CP_PROCESS_USE = 0x800) instead of ACL_STREAM_DEVICE_USE_ONLY. Swapping only that flag avoids the fault-domain interference but instead breaks simpler's AICore register MMIO setup (init_aicore_register_addresses → halMemCtl rc=13), failing even a normal prefetch run. So neither known stream flag lets the 48 STARS streams coexist with simpler's device infrastructure during/after a fault.
Expected Performance
AICore fault recovery on a2a3 should be ~0.3 s (as it is when no SDMA workspace is provisioned), and the fault should surface as it does without SDMA (507046 at the host stream sync).
Actual Performance
With the SDMA workspace provisioned, fault recovery takes ~306 s (~1000× slower) and the code changes to 507015. Any a2a3 workload that has the SDMA workspace on its device pays this on the next AICore fault.
Related: #1315 (gating the SDMA overlay behind a macro — different root cause, same subsystem).
Platform
a2a3 (Ascend 910B/C hardware)
Runtime Variant
tensormap_and_ringbuffer
Summary
Provisioning the PTO-ISA async-SDMA scratch workspace on an a2a3 device makes AICore fault recovery ~1000× slower (~0.3 s → ~306 s), and also changes the surfaced fault error code (507046 → 507015).
SdmaWorkspaceManager::Init()creates 48 STARS streams viaaclrtCreateStreamWithConfig(..., ACL_STREAM_DEVICE_USE_ONLY). Those streams are device-visible and sit in the device fault/sync domain. Once any AICore task faults and poisons the card, tearing the 48 streams down — whether byaclrtResetDeviceForce/rtDeviceResetat finalize or byaclrtDestroyStream— blocks ~306 s. Merely provisioning the workspace (no SDMA op ever submitted) is enough to trigger this on the next AICore fault, because the cost is in creating/holding the streams, not using them.This is latent on
main(the SDMA workspace is provisioned only on the HCCL comm path today), and was surfaced while making single-card provisioning eager in PR #1406 (branchfeat-sdma-prefetch-workspace-addr), which pointed thetests/st/aicore_op_timeout/tests/st/runtime_fatal_codesfault-injection STs at an SDMA-provisioned device.Git Commit ID
simpler
upstream/main4dbcc9c8; pto-isa pin83d01313(root cause is inSdmaWorkspaceManager::CreateStarsStreams). Reproduced on PR #1406 head.CANN Version
cann-9.0.0
Host Platform
Linux (aarch64)
Reproduction
main).ASCEND_PROCESS_LOG_PATH): the fault (507015) surfaces in a few seconds, butDeviceReset/rtDeviceReset(or the stream teardown, if destroyed first) then blocks ~306 s before returning507007.Controlled comparison (same
aicore_op_timeouttest, a2a3 hardware):mainsingle-card)Additional findings while narrowing the root cause:
rtDeviceResetintoaclrtDestroyStream(poisoned-device teardown blocks either way).SdmaWorkspaceManager(cann-9.0.0/include/pto/npu/...) creates the streams viartsStreamCreate(RT_STREAM_CP_PROCESS_USE = 0x800)instead ofACL_STREAM_DEVICE_USE_ONLY. Swapping only that flag avoids the fault-domain interference but instead breaks simpler's AICore register MMIO setup (init_aicore_register_addresses→halMemCtl rc=13), failing even a normal prefetch run. So neither known stream flag lets the 48 STARS streams coexist with simpler's device infrastructure during/after a fault.Expected Performance
AICore fault recovery on a2a3 should be ~0.3 s (as it is when no SDMA workspace is provisioned), and the fault should surface as it does without SDMA (507046 at the host stream sync).
Actual Performance
With the SDMA workspace provisioned, fault recovery takes ~306 s (~1000× slower) and the code changes to 507015. Any a2a3 workload that has the SDMA workspace on its device pays this on the next AICore fault.
Related: #1315 (gating the SDMA overlay behind a macro — different root cause, same subsystem).