Let TensorPipe detect peer access (#50676)
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/50676
Test Plan: Imported from OSS
Reviewed By: beauby
Differential Revision: D25941962
Pulled By: mrshenli
fbshipit-source-id: 7d4fd3b4fbd5ae5a0c50ad65605ced9db10ede4a