"docs/vscode:/vscode.git/clone" did not exist on "4cc1a6143387f41e2466536abcd6a2620b63a35b"
Unverified Commit 64f3d362 authored by mcarilli's avatar mcarilli Committed by GitHub
Browse files

Distributed backend compatibility update

parent 2b8277e5
...@@ -157,10 +157,14 @@ class DistributedDataParallel(Module): ...@@ -157,10 +157,14 @@ class DistributedDataParallel(Module):
super(DistributedDataParallel, self).__init__() super(DistributedDataParallel, self).__init__()
# Backward/forward compatibility around # Backward/forward compatibility around
# https://github.com/pytorch/pytorch/commit/540ef9b1fc5506369a48491af8a285a686689b36 # https://github.com/pytorch/pytorch/commit/540ef9b1fc5506369a48491af8a285a686689b36 and
if(hasattr(dist, "get_backend")): # https://github.com/pytorch/pytorch/commit/044d00516ccd6572c0d6ab6d54587155b02a3b86
if hasattr(dist, "get_backend"):
self._backend = dist.get_backend() self._backend = dist.get_backend()
self.backend_enum_holder = dist.DistBackend if hasattr(dist, "DistBackend"):
self.backend_enum_holder = dist.DistBackend
else:
self.backend_enum_holder = dist.Backend
else: else:
self._backend = dist._backend self._backend = dist._backend
self.backend_enum_holder = dist.dist_backend self.backend_enum_holder = dist.dist_backend
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment