mirror of
https://github.com/wassname/pytorch-lightning.git
synced 2026-09-10 12:21:57 +08:00
updated docs
This commit is contained in:
@@ -108,7 +108,7 @@ trainer = Trainer(gpus=8, distributed_backend='ddp')
|
|||||||
Multi-node training is easily done by specifying these flags.
|
Multi-node training is easily done by specifying these flags.
|
||||||
```python
|
```python
|
||||||
# train on 12*8 GPUs
|
# train on 12*8 GPUs
|
||||||
trainer = Trainer(gpus=8, nb_gpu_nodes=12)
|
trainer = Trainer(gpus=8, nb_gpu_nodes=12, distributed_backend='ddp')
|
||||||
```
|
```
|
||||||
|
|
||||||
In addition, make sure to set up your SLURM job correctly via the [SlurmClusterObject](https://williamfalcon.github.io/test-tube/hpc/SlurmCluster/). In particular, specify the number of tasks per node correctly.
|
In addition, make sure to set up your SLURM job correctly via the [SlurmClusterObject](https://williamfalcon.github.io/test-tube/hpc/SlurmCluster/). In particular, specify the number of tasks per node correctly.
|
||||||
@@ -140,6 +140,9 @@ cluster.per_experiment_nb_gpus = 8
|
|||||||
cluster.add_slurm_cmd(cmd='ntasks-per-node', value=8, comment='1 task per gpu')
|
cluster.add_slurm_cmd(cmd='ntasks-per-node', value=8, comment='1 task per gpu')
|
||||||
```
|
```
|
||||||
|
|
||||||
|
**NOTE:** When running in DDP mode, any errors in your code will show up as an NCCL issue.
|
||||||
|
Set the ```NCCL_DEBUG=INFO``` flag to see the ACTUAL error.
|
||||||
|
|
||||||
Finally, make sure to add a distributed sampler to your dataset. The distributed sampler copies a
|
Finally, make sure to add a distributed sampler to your dataset. The distributed sampler copies a
|
||||||
portion of your dataset onto each GPU. (World_size = gpus_per_node * nb_nodes).
|
portion of your dataset onto each GPU. (World_size = gpus_per_node * nb_nodes).
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user