From 83b47adf0d7d4229759dc8c5485290781a130c26 Mon Sep 17 00:00:00 2001 From: Victor Skvortsov Date: Wed, 12 Feb 2025 00:23:49 +0500 Subject: [PATCH] Comment that DDP-script.py does not work with GPUs > 2 (#523) --- appendix-A/01_main-chapter-code/DDP-script.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/appendix-A/01_main-chapter-code/DDP-script.py b/appendix-A/01_main-chapter-code/DDP-script.py index 1234a61..557c7b4 100644 --- a/appendix-A/01_main-chapter-code/DDP-script.py +++ b/appendix-A/01_main-chapter-code/DDP-script.py @@ -179,6 +179,8 @@ def compute_accuracy(model, dataloader, device): if __name__ == "__main__": + # This script may not work for GPUs > 2 due to the small dataset + # Run `CUDA_VISIBLE_DEVICES=0,1 python DDP-script.py` if you have GPUs > 2 print("PyTorch version:", torch.__version__) print("CUDA available:", torch.cuda.is_available()) print("Number of GPUs available:", torch.cuda.device_count())