Fix distributed store to use add for the counter of DL shared seed (#80348) (#80348) (#81860)
Summary:
In order to get the result of `_shared_seed_recv_cnt` properly, switch from `store.get` to `store.add(key, 0)`.
See the comment from distributed team for the reason:
https://github.com/pytorch/pytorch/blob/590d3e5774110e4657dcaa6acdb387ef69e41b47/torch/distributed/distributed_c10d.py#L242-L246
Pull Request resolved: https://github.com/pytorch/pytorch/pull/80348
Approved by: https://github.com/VitalyFedyunin, https://github.com/NivekT
Test Plan: contbuild & OSS CI, see https://hud.pytorch.org/commit/pytorch/pytorch/3ec9d34f21edfb330076a2e57dd9b30649070e80
Reviewed By: NivekT
Differential Revision: D37458370
Pulled By: ejguan
fbshipit-source-id: 386457bef43dbb47e3c5b8bb4524d456b5f4343a
Co-authored-by: erjia (Meta Employee) <erjia@fb.com>