Skip to content

Commit ec8a172

Browse files
authored
Revert "Fixes in Imagenet training script" (#1225)
1 parent a848347 commit ec8a172

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

imagenet/main.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -106,12 +106,8 @@ def main():
106106

107107
if torch.cuda.is_available():
108108
ngpus_per_node = torch.cuda.device_count()
109-
assert not (ngpus_per_node == 1 and args.dist_backend == "nccl"),\
110-
"nccl backend requires GPU count>1, see https://github.com/NVIDIA/nccl/issues/103 perhaps use 'gloo'"
111109
else:
112-
ngpus_per_node = 0
113-
assert args.dist_backend != "nccl",\
114-
"nccl backend does not work without GPU, see https://pytorch.org/docs/stable/distributed.html"
110+
ngpus_per_node = 1
115111
if args.multiprocessing_distributed:
116112
# Since we have ngpus_per_node processes per node, the total world_size
117113
# needs to be adjusted accordingly

0 commit comments

Comments
 (0)