Skip to content

Commit

Permalink
[Docs] Updating init_process_group docs to indicate correct rank range (
Browse files Browse the repository at this point in the history
pytorch#49131)

Summary:
Pull Request resolved: pytorch#49131

Users frequently assume the correct range of ranks is 1 ...
`world_size`. This PR udpates the docs to indicate that the correct rank range
users should specify is 0 ... `world_size` - 1.

Test Plan: Rendering and Building Docs

Reviewed By: mrshenli

Differential Revision: D25410532

fbshipit-source-id: fe0f17a4369b533dc98543204a38b8558e68497a
  • Loading branch information
osalpekar authored and hwangdeyu committed Dec 23, 2020
1 parent d73c1f4 commit 98c4a4d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion torch/distributed/distributed_c10d.py
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,8 @@ def init_process_group(backend,
Mutually exclusive with ``store``.
world_size (int, optional): Number of processes participating in
the job. Required if ``store`` is specified.
rank (int, optional): Rank of the current process.
rank (int, optional): Rank of the current process (it should be a
number between 0 and ``world_size``-1).
Required if ``store`` is specified.
store(Store, optional): Key/value store accessible to all workers, used
to exchange connection/address information.
Expand Down

0 comments on commit 98c4a4d

Please sign in to comment.