Skip to content

Commit 8c246ba

Browse files
authored
warning added for single GPU and NCCL (#1226)
* issue link referred * nccl required version mentioned
1 parent ec8a172 commit 8c246ba

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

imagenet/main.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,11 @@ def main():
106106

107107
if torch.cuda.is_available():
108108
ngpus_per_node = torch.cuda.device_count()
109+
if ngpus_per_node == 1 and args.dist_backend == "nccl":
110+
warnings.warn("nccl backend >=2.5 requires GPU count>1, see https://github.com/NVIDIA/nccl/issues/103 perhaps use 'gloo'")
109111
else:
110112
ngpus_per_node = 1
113+
111114
if args.multiprocessing_distributed:
112115
# Since we have ngpus_per_node processes per node, the total world_size
113116
# needs to be adjusted accordingly

0 commit comments

Comments
 (0)