Skip to content

Commit cbb760d

Browse files
authored
Merge pull request #917 from andwgu/master
Fix comment to use zero-indexed ranks
2 parents c002856 + 3da6dda commit cbb760d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

distributed/ddp/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,8 +120,8 @@ Given the local rank and world size, the training function, `demo_basic` initial
120120
def demo_basic(local_world_size, local_rank):
121121

122122
# setup devices for this process. For local_world_size = 2, num_gpus = 8,
123-
# rank 1 uses GPUs [0, 1, 2, 3] and
124-
# rank 2 uses GPUs [4, 5, 6, 7].
123+
# rank 0 uses GPUs [0, 1, 2, 3] and
124+
# rank 1 uses GPUs [4, 5, 6, 7].
125125
n = torch.cuda.device_count() // local_world_size
126126
device_ids = list(range(local_rank * n, (local_rank + 1) * n))
127127

0 commit comments

Comments
 (0)