Skip to content

Commit f90bec7

Browse files
authored
Comment that DDP-script.py does not work with GPUs > 2 (#523)
1 parent a6cc574 commit f90bec7

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

appendix-A/01_main-chapter-code/DDP-script.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,8 @@ def compute_accuracy(model, dataloader, device):
179179

180180

181181
if __name__ == "__main__":
182+
# This script may not work for GPUs > 2 due to the small dataset
183+
# Run `CUDA_VISIBLE_DEVICES=0,1 python DDP-script.py` if you have GPUs > 2
182184
print("PyTorch version:", torch.__version__)
183185
print("CUDA available:", torch.cuda.is_available())
184186
print("Number of GPUs available:", torch.cuda.device_count())

0 commit comments

Comments
 (0)