Remove DDP process group timeout (#4422)
This commit is contained in:
1 parent
4e65052f28
commit
19d03a955c
2 files changed
+3
-3
No files matched your search
@@ -35,10 +35,10 @@ def torch_distributed_zero_first(local_rank: int):
|
||||
Decorator to make all processes in distributed training wait for each local_master to do something.
|
||||
"""
|
||||
if local_rank not in [-1, 0]:
|
||||
dist.barrier()
|
||||
dist.barrier(device_ids=[local_rank])
|
||||
yield
|
||||
if local_rank == 0:
|
||||
dist.barrier()
|
||||
dist.barrier(device_ids=[0])
|
||||
|
||||
|
||||
def init_torch_seeds(seed=0):
|
||||
|
||||
Reference in new issue
Block a user