Repository navigation
Commit 22847fc
committed
fix(ezpz): xpu-aware set_pg_timeouts workaround for xccl
Upstream torch.distributed.distributed_c10d._set_pg_timeout has no
xpu branch — only cpu (gloo) and cuda (nccl / gloo / torchcomms).
On xccl PGs the loop adds no backends, emits the warning
"Set timeout is now only supported for either nccl or gloo.", and
never calls _set_default_timeout. Result: CommConfig.train_timeout_seconds
silently no-ops on every Intel XPU run we've ever done — including
the moe_debugmodel_ep step-41 incident where a 100s configured
timeout watched a 985s silence go by without firing.
ProcessGroupXCCL itself has set_timeout and abort methods; the
dispatch upstream just doesn't route to them. Until that's fixed
upstream, _set_pg_timeouts_xpu_aware calls upstream first (covers
cpu/cuda backends + the safety barrier) then walks each PG and
calls ProcessGroupXCCL.set_timeout directly on any xccl-backed
group, logging the count of patched groups.
Verified on 2N Sunspot (alloc 12467180): moe_debugmodel_ep clean
10 steps, exit 0, log line "Applied train timeout 0:01:40 to 6
xccl ProcessGroup(s)" fires alongside the still-present upstream
warning.
Note: this only fixes the Python dispatch. Empirical work in the
follow-up commit shows the xccl C++ runtime still doesn't enforce
the per-collective timeout, so a hung xccl collective will still
not abort. See docs/upstream-issues/train_timeout_xpu_silent_noop.md.1 parent 2e71e14 commit 22847fc
1 file changed
Lines changed: 53 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
35 | 87 | | |
36 | 88 | | |
37 | 89 | | |
| |||
621 | 673 | | |
622 | 674 | | |
623 | 675 | | |
624 | | - | |
| 676 | + | |
625 | 677 | | |
626 | 678 | | |
627 | 679 | | |
| |||
0 commit comments