[torch/deploy] add torch.distributed to build (#63918)
authorMichael Suo <suo@fb.com>
Fri, 27 Aug 2021 03:54:54 +0000 (20:54 -0700)
committerFacebook GitHub Bot <facebook-github-bot@users.noreply.github.com>
Fri, 27 Aug 2021 03:58:44 +0000 (20:58 -0700)
commit63c90ec3bf6c9445a36199f65e0523a5e6532b0d
tree3fd1fe2900eb65bb1169e126b9aebf4f3d662fb8
parent65e6194aeb3269a182cfe2c05c122159da12770f
[torch/deploy] add torch.distributed to build (#63918)

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

Previously we were building with `USE_DISTRIBUTED` off, because c10d was built as a separately library for historical reasons. Since then, lw has merged the c10d build into libtorch, so this is fairly easy to turn on.

Differential Revision:
D30492442

**NOTE FOR REVIEWERS**: This PR has internal Facebook specific changes or comments, please review them on [Phabricator](https://our.intern.facebook.com/intern/diff/D30492442/)!
D30492442
D30492442

Test Plan: added a unit test

Reviewed By: wconstab

Pulled By: suo

fbshipit-source-id: 843b8fcf349a72a7f6fcbd1fcc8961268690fb8c
tools/build_variables.bzl
torch/CMakeLists.txt
torch/csrc/deploy/example/generate_examples.py
torch/csrc/deploy/test_deploy.cpp
torch/csrc/deploy/test_deploy_gpu.cpp
torch/csrc/distributed/c10d/frontend.cpp
torch/csrc/distributed/c10d/frontend.hpp
torch/csrc/distributed/c10d/frontend_cuda.cpp [new file with mode: 0644]
torch/csrc/distributed/c10d/frontend_cuda.hpp [new file with mode: 0644]
torch/csrc/distributed/c10d/init.cpp
torch/csrc/distributed/rpc/request_callback_impl.cpp