diff options
author | Edward Yang <ezyang@fb.com> | 2018-10-05 17:28:05 -0700 |
---|---|---|
committer | Facebook Github Bot <facebook-github-bot@users.noreply.github.com> | 2018-10-05 17:38:41 -0700 |
commit | 058a31839dbb670f4f3f2148cbf562ea34a152ac (patch) | |
tree | 64e1a1ce32104928a6c90b5a775deba6733ed323 /torch | |
parent | 3f04ca9a915b3991aef6e324911c1fe6ed1d6c26 (diff) | |
download | pytorch-058a31839dbb670f4f3f2148cbf562ea34a152ac.tar.gz pytorch-058a31839dbb670f4f3f2148cbf562ea34a152ac.tar.bz2 pytorch-058a31839dbb670f4f3f2148cbf562ea34a152ac.zip |
Warn about local_rank not being globally unique. (#12370)
Summary:
Signed-off-by: Edward Z. Yang <ezyang@fb.com>
CC deepakn94
Pull Request resolved: https://github.com/pytorch/pytorch/pull/12370
Differential Revision: D10220135
Pulled By: ezyang
fbshipit-source-id: 6d1a8a383951ae52753e4f75a14b8080bf02b815
Diffstat (limited to 'torch')
-rw-r--r-- | torch/distributed/launch.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/torch/distributed/launch.py b/torch/distributed/launch.py index 3489e16eb0..3decb59bf3 100644 --- a/torch/distributed/launch.py +++ b/torch/distributed/launch.py @@ -120,6 +120,14 @@ process. In other words, the ``device_ids`` needs to be ``[args.local_rank]``, and ``output_device`` needs to be ``args.local_rank`` in order to use this utility +.. warning:: + + ``local_rank`` is NOT globally unique: it is only unique per process + on a machine. Thus, don't use it to decide if you should, e.g., + write to a networked filesystem. See + https://github.com/pytorch/pytorch/issues/12042 for an example of + how things can go wrong if you don't do this correctly. + """ |