Skip to content

Commit

Permalink
Deprecations fix TORCH_NCCL_BLOCKING_WAIT (ultralytics#9448)
Browse files Browse the repository at this point in the history
  • Loading branch information
glenn-jocher authored Mar 31, 2024
1 parent aa75606 commit 7df821e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ultralytics/engine/trainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ def _setup_ddp(self, world_size):
torch.cuda.set_device(RANK)
self.device = torch.device("cuda", RANK)
# LOGGER.info(f'DDP info: RANK {RANK}, WORLD_SIZE {world_size}, DEVICE {self.device}')
os.environ["NCCL_BLOCKING_WAIT"] = "1" # set to enforce timeout
os.environ["TORCH_NCCL_BLOCKING_WAIT"] = "1" # set to enforce timeout
dist.init_process_group(
"nccl" if dist.is_nccl_available() else "gloo",
timeout=timedelta(seconds=10800), # 3 hours
Expand Down

0 comments on commit 7df821e

Please sign in to comment.