[c10d] Prefer use of torch_check (#63928)
authorRohan Varma <rvarm1@fb.com>
Wed, 1 Sep 2021 23:21:31 +0000 (16:21 -0700)
committerFacebook GitHub Bot <facebook-github-bot@users.noreply.github.com>
Wed, 1 Sep 2021 23:34:05 +0000 (16:34 -0700)
commit9b8f9d5a25ca7a9ebd54a07ab88b3a540111e5b3
tree29c16bc6dfd57971473e0bb3064a25db77227f96
parent5d80a48cef373e22393af1b1f4f4e3f2ad948a76
[c10d] Prefer use of torch_check (#63928)

Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/63928

throw std::invalid_argument results in not getting stacktraces with
TORCH_SHOW_CPP_STACKTRACES=1, so instead prefer torch_check here.
ghstack-source-id: 137135328

Test Plan: CI

Reviewed By: mrshenli

Differential Revision: D30533955

fbshipit-source-id: 33e5bf4f449e3043dec68da93f8022f6624d9675
test/distributed/test_c10d_gloo.py
torch/csrc/distributed/c10d/ProcessGroupGloo.cpp