From: mrshenli Date: Fri, 27 Aug 2021 18:28:31 +0000 (-0700) Subject: Improve `distributed.get_rank()` API docstring (#63296) X-Git-Tag: accepted/tizen/8.0/unified/20231005.095509~642 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=101a6263309ae2f9e52947c7d02d630e1190b6c3;p=platform%2Fupstream%2Fpytorch.git Improve `distributed.get_rank()` API docstring (#63296) Summary: See discussion in https://pytorch.slack.com/archives/CBHSWPNM7/p1628792389008600 Pull Request resolved: https://github.com/pytorch/pytorch/pull/63296 Reviewed By: cbalioglu Differential Revision: D30332042 Pulled By: mrshenli fbshipit-source-id: 3a642fda2e106fd35b67709ed2adb60e408854c2 --- diff --git a/torch/distributed/distributed_c10d.py b/torch/distributed/distributed_c10d.py index fac096e..302114e 100644 --- a/torch/distributed/distributed_c10d.py +++ b/torch/distributed/distributed_c10d.py @@ -800,7 +800,8 @@ def destroy_process_group(group=None): def get_rank(group=None): """ - Returns the rank of current process group + Returns the rank of the current process in the provided ``group`` or the + default group if none was provided. Rank is a unique identifier assigned to each process within a distributed process group. They are always consecutive integers ranging from 0 to