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
TL/CUDA: fix NVLS fallback and EC persistent hangs (#1320)
## What
Fix TL/CUDA NVLS hangs/failures that broke `test_c10d_ucc.py` (e.g.
`test_ddp_checkpointing_dynamic_module`) on aarch64 (Grace/GB200/VR200)
and in
containers without ptrace permission:
- **NVLS init deadlock**: if one rank fails to import the peer multicast
handle
(e.g. `pidfd_getfd` EPERM in a restricted container), it fell back while
the
other ranks blocked forever in the collective `cuMulticastBindAddr`. All
ranks
now exchange import status and disable NVLS together.
- **EC persistent executor hang on weakly-ordered CPUs**: the CPU↔GPU
shutdown
and task-publish flags in device-mapped memory used inner-shareable
fences,
which don't order against the GPU on aarch64, so the persistent kernel
never
saw the update. Use the bus (outer-shareable) fences.
- **Wrong-result after NVLS fallback**: allreduce was still routed to
the NVLS
algorithm (based on a static HW capability check) even when NVLS did not
initialize. Advertise/route NVLS allreduce only when NVLS is actually
enabled.
- **Diagnostics**: on a peer-fd import denial, emit one actionable
warning
(ptrace_scope / CAP_SYS_PTRACE / docker / enroot hints); keep the rest
at
debug so a supported fallback is not noisy.
## Why ?
On aarch64 (GB200/VR200) and permission-restricted containers, NVLS
either
deadlocked at team creation (hang in the first DDP collective) or
silently
produced wrong results after falling back. NCCL worked, so it was
UCC-specific.
Root-caused on a VR200 node: the progress thread was stuck in
`ucc_cuda_executor_persistent_stop`, and the peer-fd EPERM caused an
asymmetric
NVLS init.
Fixes: **RM 5113172**
## How ?
- `tl_cuda_nvls`: add `STATE_SYNC_STATUS` that allgathers each rank's
import
result; disable NVLS team-wide on any failure. Track `nvls.enabled` (set
only
after the final NVLS barrier).
- `ec_cuda_executor_persistent`: publish/poll shutdown and task-post
flags with
`ucc_memory_bus_store_fence()` / `ucc_memory_bus_load_fence()`.
- `tl_cuda_team` / `allreduce`: gate advertising and dispatch of NVLS
allreduce
on `nvls.enabled`.
Validated on VR200 (aarch64) and H100 (x86): `test_c10d_ucc.py` passes
(50 passed / 14 skipped), single-node and multinode NVLS allreduce
correct,
and the forced-EPERM path falls back cleanly instead of hanging.
0 commit comments