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
PR #1179 landed the a5 SDMA workspace overlay (ensure_sdma_workspace → aclnnShmemSdmaStarsQuery) but gated it behind an opt-in macro because the available a5 CANN drops do not expose working SDMA primitives:
CANN 9.1.T500: aclnnShmemSdmaStarsQuery creates STARS streams but aclrtSynchronizeStream fails with AICPU exception 0x715002a, which poisons the AICPU context and turns every subsequent kernel launch into 507018. This breaks all a5 communication cases, not just the SDMA demo.
CANN 9.1.0 (timestamp=20260625): HcclCommInitRootInfo itself returns HCCL_E_INTERNAL (4) — base HCCL never comes up.
The overlay was verified working on a separate a5 box whose CANN does expose the primitive (sdma_async_completion_demo passes). So this is purely an environment gating issue, not a code defect.
Currently the overlay defaults OFF via option(SIMPLER_ENABLE_PTO_SDMA_WORKSPACE ... OFF) and the SIMPLER_ENABLE_PTO_SDMA_WORKSPACE env var. With it OFF: ensure_sdma_workspace is a no-op, CommContext.workSpace stays 0, the SDMA demo self-skips, and all other comm cases run normally.
(revised 2026-07-22) PR #1392 (ca000263) added the URMA deferred completion backend behind the same gating pattern (SIMPLER_ENABLE_PTO_URMA_WORKSPACE, default OFF), and PR #1421 (a7a29ee3) added its two-device demo. The two overlays are mutually exclusive — see the 2026-07-22 update below.
Location
(revised 2026-07-22 — extended to both overlays and the post-#1403 mechanism)
-`src/a5/platform/onboard/host/CMakeLists.txt` — `option(SIMPLER_ENABLE_PTO_SDMA_WORKSPACE ... OFF)` + `option(SIMPLER_ENABLE_PTO_URMA_WORKSPACE ... OFF)`, the mutual-exclusion `FATAL_ERROR` guard, and the shared `if(SDMA OR URMA)``PTO_ISA_ROOT` check (`-DPTO_ISA_ROOT=` required; `$ENV{PTO_ISA_ROOT}` is explicitly rejected since #1403)
-`simpler_setup/runtime_compiler.py` — `_init_a5` resolves the pinned pto-isa checkout via `ensure_pto_isa_root()` when `_sdma_workspace_enabled() or _urma_workspace_enabled()` (overlay-keyed, per #1351); path stored for RuntimeBuilder to pass by value as `-DPTO_ISA_ROOT=` (#1403)
-`simpler_setup/runtime_builder.py` — `_compile_target` env-var→CMake-define forwarding for both overlay vars
-`examples/a5/tensormap_and_ringbuffer/sdma_async_completion_demo/test_sdma_async_completion_demo.py` — `pytest.skip` when the SDMA env var is unset
-`examples/a5/tensormap_and_ringbuffer/urma_deferred_completion_demo/test_urma_deferred_completion_demo.py` — `pytest.skip` when the URMA env var is unset (#1421)
Proposed Fix
Once the st-onboard-a5 CI CANN exposes a working aclnnShmemSdmaStarsQuery (verify with nm -D $ASCEND_HOME_PATH/lib64/libascendcl.so | grep -ic SdmaStars), re-enable the overlay. Two options:
Option A — CI env var only (no code change): set SIMPLER_ENABLE_PTO_SDMA_WORKSPACE=ON in the st-onboard-a5 job. (revised 2026-07-22) No manual PTO_ISA_ROOT export is needed — and ambient $ENV{PTO_ISA_ROOT} is explicitly rejected since #1403; _init_a5 resolves the pinned checkout automatically once the overlay var is set, and RuntimeBuilder passes it by value. The existing env-var→CMake define forwarding and test skip gate pick it up automatically.
Option B — make SDMA the a5 default (revert the gating):
(revised 2026-07-22 — step 2 rewritten; the originally described mechanism no longer exists post-#1351/#1403)
CMakeLists.txt: option(... OFF) → set(SIMPLER_ENABLE_PTO_SDMA_WORKSPACE ON); move the PTO_ISA_ROOT check + pto-isa include back out of the if-guard.
runtime_builder.py _compile_target: the env-var→define forwarding can stay (harmless) or be removed.
test_sdma_async_completion_demo.py: remove the env-var pytest.skip gate.
Optionally also have build_runtimes.py auto-resolve PTO_ISA_ROOT for a5 the same way it does for a2a3 — (2026-07-22) obsoleted by the overlay-keyed resolution from #1351.
Per the discussion below, flipping SIMPLER_ENABLE_PTO_SDMA_WORKSPACE=ON (under either Option A or Option B) is blocked on #1351.
Enabling the overlay makes a5 host_runtime.so compile pto-isa headers into itself, but the PTO-ISA build/run version guard (#1096 + #1194) is still scoped to arch == "a2a3" — it was never extended to a5 when #1179 introduced this dependency. Re-enabling now would embed pto-isa on a5 with:
no pin verification
no build-metadata recording
no load-time staleness rejection
no cmake-cache / ccache invalidation on a pin bump
— silently re-arming the 507018/507899-class stale-binary failure #1194 was written to prevent.
#1351 was closed as COMPLETED on 2026-07-20, implemented exactly as recommended here: the a5 guard is keyed on the overlay being enabled (SIMPLER_ENABLE_PTO_SDMA_WORKSPACE / SIMPLER_ENABLE_PTO_URMA_WORKSPACE truthy), not on arch == "a5" — so a default-OFF a5 build is untouched, and flipping the overlay ON automatically pulls in pin verification / build metadata / staleness rejection / cache invalidation. Re-enabling can no longer bypass the guard.
CANN exposes working aclnnShmemSdmaStarsQuery (verify via nm -D ... | grep -ic SdmaStars)
Proceed with Option A or Option B
Update (2026-07-20): URMA overlay added in PR #1392, same gating pattern — ✅ LANDED 2026-07-22
(status annotated 2026-07-22)
PR #1392 (landed as ca000263) introduces the a5 URMA deferred completion backend. Its host-side URMA workspace is gated behind SIMPLER_ENABLE_PTO_URMA_WORKSPACE (default OFF), mirroring the SDMA overlay. When OFF:
a5 host_runtime does not require PTO_ISA_ROOT.
comm_hccl.cpp does not compile/link the PTO-ISA UrmaWorkspaceManager.
comm_alloc_windows / comm_alloc_domain_windows cannot fail due to URMA workspace initialization.
Existing non-URMA a5 communication paths keep current behavior.
(revised 2026-07-22) Manual validation on real a5: set SIMPLER_ENABLE_PTO_URMA_WORKSPACE=ON and rebuild — the pinned pto-isa checkout is resolved automatically (no manual PTO_ISA_ROOT export; ambient exports are rejected since #1403).
PR #1421 (landed as a7a29ee3) added examples/a5/tensormap_and_ringbuffer/urma_deferred_completion_demo, the concrete vehicle for the two-device verification step below.
st-onboard-a5 CI CANN exposes working URMA/HCCL async workspace primitives
(added 2026-07-22) Resolve the SDMA/URMA mutual exclusion first if both overlays are ever needed simultaneously — see the 2026-07-22 update below
Enable SIMPLER_ENABLE_PTO_URMA_WORKSPACE=ON in the a5 validation environment (pin-resolved pto-isa flows automatically)
Verify the real a5 URMA deferred completion path on two devices: python -m pytest examples/a5/tensormap_and_ringbuffer/urma_deferred_completion_demo/ -v --platform a5 --device <ids> (must PASS, not skip)
Verify existing non-URMA a5 communication cases remain green
Only after the above, consider enabling URMA in CI or changing the default
New constraint from #1392 — SDMA and URMA overlays are mutually exclusive.src/a5/platform/onboard/host/CMakeLists.txt hard-fails at configure time (FATAL_ERROR) if both SIMPLER_ENABLE_PTO_SDMA_WORKSPACE and SIMPLER_ENABLE_PTO_URMA_WORKSPACE are ON, because CommContext carries a single workSpace/workSpaceSize pair that both backends would claim. The re-enable plan must therefore either:
enable only one overlay in CI (the other stays opt-in local), or
first split the CommContext workspace fields per backend, then enable both.
Remaining blocker for both overlays: st-onboard-a5 CI CANN exposing working SDMA (aclnnShmemSdmaStarsQuery) / URMA primitives.
Optional cleanup while re-enabling (non-blocking leftovers from the #1392 review): src/a5/platform/onboard/host/CMakeLists.txt links c_sec/nnopbase unconditionally (should fold into the overlay if block); src/a5/runtime/tensormap_and_ringbuffer/runtime/backend/urma/urma_completion_scheduler.hkCqeBytes is unused.
Category
Technical Debt (cleanup, refactor)
Component
Host Runtime
Description
PR #1179 landed the a5 SDMA workspace overlay (
ensure_sdma_workspace→aclnnShmemSdmaStarsQuery) but gated it behind an opt-in macro because the available a5 CANN drops do not expose working SDMA primitives:aclnnShmemSdmaStarsQuerycreates STARS streams butaclrtSynchronizeStreamfails with AICPU exception0x715002a, which poisons the AICPU context and turns every subsequent kernel launch into507018. This breaks all a5 communication cases, not just the SDMA demo.timestamp=20260625):HcclCommInitRootInfoitself returnsHCCL_E_INTERNAL (4)— base HCCL never comes up.The overlay was verified working on a separate a5 box whose CANN does expose the primitive (
sdma_async_completion_demopasses). So this is purely an environment gating issue, not a code defect.Currently the overlay defaults OFF via
option(SIMPLER_ENABLE_PTO_SDMA_WORKSPACE ... OFF)and theSIMPLER_ENABLE_PTO_SDMA_WORKSPACEenv var. With it OFF:ensure_sdma_workspaceis a no-op,CommContext.workSpacestays 0, the SDMA demo self-skips, and all other comm cases run normally.(revised 2026-07-22) PR #1392 (
ca000263) added the URMA deferred completion backend behind the same gating pattern (SIMPLER_ENABLE_PTO_URMA_WORKSPACE, default OFF), and PR #1421 (a7a29ee3) added its two-device demo. The two overlays are mutually exclusive — see the 2026-07-22 update below.Location
(revised 2026-07-22 — extended to both overlays and the post-#1403 mechanism)
Proposed Fix
Once the st-onboard-a5 CI CANN exposes a working
aclnnShmemSdmaStarsQuery(verify withnm -D $ASCEND_HOME_PATH/lib64/libascendcl.so | grep -ic SdmaStars), re-enable the overlay. Two options:Option A — CI env var only (no code change): set
SIMPLER_ENABLE_PTO_SDMA_WORKSPACE=ONin the st-onboard-a5 job. (revised 2026-07-22) No manualPTO_ISA_ROOTexport is needed — and ambient$ENV{PTO_ISA_ROOT}is explicitly rejected since #1403;_init_a5resolves the pinned checkout automatically once the overlay var is set, and RuntimeBuilder passes it by value. The existing env-var→CMake define forwarding and test skip gate pick it up automatically.Option B — make SDMA the a5 default (revert the gating):
(revised 2026-07-22 — step 2 rewritten; the originally described mechanism no longer exists post-#1351/#1403)
CMakeLists.txt:option(... OFF)→set(SIMPLER_ENABLE_PTO_SDMA_WORKSPACE ON); move thePTO_ISA_ROOTcheck + pto-isa include back out of theif-guard.Obsolete. Since [Code Health] Extend PTO-ISA build/run version guard to a5 onboard SDMA overlay (missed after #1179) #1351 the a5 pto-isa resolution is keyed on the overlay being enabled, and since [Code Health] Stop transporting PTO_ISA_ROOT via the environment; pass the pin-resolved path by value / -D #1403 it flows by value (runtime_compiler.py _init_a5: makeenv_manager.ensure("PTO_ISA_ROOT")unconditional again (mirror_init_a2a3).ensure_pto_isa_root()+-DPTO_ISA_ROOT=), same as_init_a2a3. Flipping the option ON pulls the guard in automatically — no_init_a5edit needed.runtime_builder.py _compile_target: the env-var→define forwarding can stay (harmless) or be removed.test_sdma_async_completion_demo.py: remove the env-varpytest.skipgate.Optionally also have— (2026-07-22) obsoleted by the overlay-keyed resolution from #1351.build_runtimes.pyauto-resolvePTO_ISA_ROOTfor a5 the same way it does for a2a3Verification after re-enabling:
The SDMA demo must PASS (not skip) and the allreduce regression must stay green.
Priority
Low (no impact today, good to fix eventually)
Update (2026-07-13): prerequisite — resolve #1351 before re-enabling — ✅ RESOLVED 2026-07-20
(status annotated 2026-07-22)
#1351 was closed as COMPLETED on 2026-07-20, implemented exactly as recommended here: the a5 guard is keyed on the overlay being enabled (
SIMPLER_ENABLE_PTO_SDMA_WORKSPACE/SIMPLER_ENABLE_PTO_URMA_WORKSPACEtruthy), not onarch == "a5"— so a default-OFF a5 build is untouched, and flipping the overlay ON automatically pulls in pin verification / build metadata / staleness rejection / cache invalidation. Re-enabling can no longer bypass the guard.Re-enable checklist (updated 2026-07-22):
[Code Health] Extend PTO-ISA build/run version guard to a5 onboard SDMA overlay (missed after #1179) #1351 resolved(PTO-ISA version guard extended to a5, overlay-keyed)aclnnShmemSdmaStarsQuery(verify vianm -D ... | grep -ic SdmaStars)Update (2026-07-20): URMA overlay added in PR #1392, same gating pattern — ✅ LANDED 2026-07-22
(status annotated 2026-07-22)
PR #1392 (landed as
ca000263) introduces the a5 URMA deferred completion backend. Its host-side URMA workspace is gated behindSIMPLER_ENABLE_PTO_URMA_WORKSPACE(default OFF), mirroring the SDMA overlay. When OFF:host_runtimedoes not requirePTO_ISA_ROOT.comm_hccl.cppdoes not compile/link the PTO-ISAUrmaWorkspaceManager.comm_alloc_windows/comm_alloc_domain_windowscannot fail due to URMA workspace initialization.(revised 2026-07-22) Manual validation on real a5: set
SIMPLER_ENABLE_PTO_URMA_WORKSPACE=ONand rebuild — the pinned pto-isa checkout is resolved automatically (no manualPTO_ISA_ROOTexport; ambient exports are rejected since #1403).PR #1421 (landed as
a7a29ee3) addedexamples/a5/tensormap_and_ringbuffer/urma_deferred_completion_demo, the concrete vehicle for the two-device verification step below.URMA re-enable checklist (updated 2026-07-22):
[Code Health] Extend PTO-ISA build/run version guard to a5 onboard SDMA overlay (missed after #1179) #1351 resolved— PTO-ISA version guard / build metadata / cache invalidation covers a5 host runtime (overlay-keyed)SIMPLER_ENABLE_PTO_URMA_WORKSPACE=ONin the a5 validation environment (pin-resolved pto-isa flows automatically)python -m pytest examples/a5/tensormap_and_ringbuffer/urma_deferred_completion_demo/ -v --platform a5 --device <ids>(must PASS, not skip)Update (2026-07-22): #1392 / #1421 landed; SDMA+URMA mutually exclusive
ca000263: URMA deferred completion backend +SIMPLER_ENABLE_PTO_URMA_WORKSPACEgating (default OFF), mirroring the SDMA overlay.a7a29ee3:urma_deferred_completion_demoon main.New constraint from #1392 — SDMA and URMA overlays are mutually exclusive.
src/a5/platform/onboard/host/CMakeLists.txthard-fails at configure time (FATAL_ERROR) if bothSIMPLER_ENABLE_PTO_SDMA_WORKSPACEandSIMPLER_ENABLE_PTO_URMA_WORKSPACEare ON, becauseCommContextcarries a singleworkSpace/workSpaceSizepair that both backends would claim. The re-enable plan must therefore either:CommContextworkspace fields per backend, then enable both.Remaining blocker for both overlays: st-onboard-a5 CI CANN exposing working SDMA (
aclnnShmemSdmaStarsQuery) / URMA primitives.Optional cleanup while re-enabling (non-blocking leftovers from the #1392 review):
src/a5/platform/onboard/host/CMakeLists.txtlinksc_sec/nnopbaseunconditionally (should fold into the overlayifblock);src/a5/runtime/tensormap_and_ringbuffer/runtime/backend/urma/urma_completion_scheduler.hkCqeBytesis unused.