Skip to content

Commit 3da6dda

Browse files
author
Andrew Gu
committed
Fix comment to use zero-indexed ranks
1 parent 95cbc6c commit 3da6dda

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)