Enable distributed package on windows, Gloo backend supported only (#42897)

Summary:
Fixes https://github.com/pytorch/pytorch/issues/42095

For test case part will be committed to this PR later

mrshenli, please help to review

Pull Request resolved: https://github.com/pytorch/pytorch/pull/42897

Reviewed By: osalpekar

Differential Revision: D23841786

Pulled By: mrshenli

fbshipit-source-id: 334ba1ed73eff2f668857390fc32d1bc7f08e5f3
This commit is contained in:
gunandrose4u
2020-09-24 21:12:16 -07:00
committed by Facebook GitHub Bot
parent c6500bcf14
commit 0122299f9b
39 changed files with 462 additions and 167 deletions

View File

@ -916,7 +916,7 @@ std::shared_ptr<SugaredValue> toSugaredValue(
} else if (
obj.ptr() == py::module::import("torch.jit").attr("annotate").ptr()) {
return SpecialFormValue::create(prim::annotate);
#ifdef USE_DISTRIBUTED
#ifdef USE_RPC
// RPC module is only avaialble when build flag "USE_DISTRIBUTED" is on.
} else if (
obj.ptr() ==