We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 01539f9 + 95cbc6c commit c002856Copy full SHA for c002856
distributed/ddp/example.py
@@ -25,8 +25,8 @@ def forward(self, x):
25
def demo_basic(local_world_size, local_rank):
26
27
# setup devices for this process. For local_world_size = 2, num_gpus = 8,
28
- # rank 1 uses GPUs [0, 1, 2, 3] and
29
- # rank 2 uses GPUs [4, 5, 6, 7].
+ # rank 0 uses GPUs [0, 1, 2, 3] and
+ # rank 1 uses GPUs [4, 5, 6, 7].
30
n = torch.cuda.device_count() // local_world_size
31
device_ids = list(range(local_rank * n, (local_rank + 1) * n))
32
0 commit comments