File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
torch/distributed/algorithms/ddp_comm_hooks Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -235,7 +235,7 @@ def hook_with_zero_step(
235235 # NOTE: Gloo may hang with this overlapping approach, so we require
236236 # NCCL/HCCL backend for now; see https://github.com/pytorch/pytorch/issues/62300
237237 pg = dist .get_backend (ddp_ref ().process_group ) # type: ignore[union-attr]
238- if (pg != dist .Backend .NCCL ) and (pg != "hccl" ):
238+ if (pg != dist .Backend .NCCL ) and (pg != "hccl" ) and ( pg != "xccl" ) :
239239 raise RuntimeError (
240240 "Overlapping DDP with ZeRO using this approach currently requires "
241241 "NCCL/HCCL backend to avoid hangs"
@@ -397,7 +397,7 @@ def hook_with_zero_step_interleaved(
397397 # NOTE: Gloo may hang with this overlapping approach, so we require
398398 # NCCL/HCCL backend for now; see https://github.com/pytorch/pytorch/issues/62300
399399 pg = dist .get_backend (ddp_ref ().process_group ) # type: ignore[union-attr]
400- if (pg != dist .Backend .NCCL ) and (pg != "hccl" ):
400+ if (pg != dist .Backend .NCCL ) and (pg != "hccl" ) and ( pg != "xccl" ) :
401401 raise RuntimeError (
402402 "Overlapping DDP with ZeRO using this approach currently requires "
403403 "NCCL/HCCL backend to avoid hangs"
You can’t perform that action at this time.
0 commit comments