|
|
5 місяців тому | |
|---|---|---|
| .. | ||
| DDP-script-torchrun.py | 9 місяців тому | |
| DDP-script.py | 9 місяців тому | |
| README.md | 9 місяців тому | |
| code-part1.ipynb | 1 рік тому | |
| code-part2.ipynb | 5 місяців тому | |
| exercise-solutions.ipynb | 1 рік тому | |
python DDP-script.py. If your machine has more than 2 GPUs, run it as CUDA_VISIBLE_DEVIVES=0,1 python DDP-script.py.DDP-script.py script that runs via the PyTorch torchrun command instead of spawning and managing multiple processes ourselves via multiprocessing.spawn. The torchrun command has the advantage of automatically handling distributed initialization, including multi-node coordination, which slightly simplifies the setup process. You can use this script via torchrun --nproc_per_node=2 DDP-script-torchrun.py