-
Notifications
You must be signed in to change notification settings - Fork 21.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update on "Support device map for distributed autograd while using Te…
…nsorPipe." TensorPipe's `set_device_map` option was applied during the forward pass. However, if we ran the backward pass for the graph we would not automatically pick up the reverse device mapping. As a result, users had to specify both forward and backward device mapping which is very tedious to do. In this PR, I've added this functionality such that TensorPipe automatically picks up the reverse device mapping during the backward pass. This is done by storing the appropriate device mapping in the "recv" autograd function for distributed autograd. #Closes: #44170 Differential Revision: [D23751975](https://our.internmc.facebook.com/intern/diff/D23751975/) **NOTE FOR REVIEWERS**: This PR has internal Facebook specific changes or comments, please review them on [Phabricator](https://our.internmc.facebook.com/intern/diff/D23751975/)! [ghstack-poisoned]
- Loading branch information
Showing
3,228 changed files
with
233,874 additions
and
79,064 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,48 +1,55 @@ | ||
from collections import OrderedDict | ||
|
||
from cimodel.lib.miniutils import quote | ||
from cimodel.data.simple.util.branch_filters import gen_filter_dict, RC_PATTERN | ||
|
||
|
||
# TODO: make this generated from a matrix rather than just a static list | ||
IMAGE_NAMES = [ | ||
"pytorch-linux-bionic-cuda11.1-cudnn8-py3.6-gcc9", | ||
"pytorch-linux-bionic-cuda11.1-cudnn8-py3.8-gcc9", | ||
"pytorch-linux-bionic-cuda11.0-cudnn8-py3.6-gcc9", | ||
"pytorch-linux-bionic-cuda11.0-cudnn8-py3.8-gcc9", | ||
"pytorch-linux-bionic-cuda10.2-cudnn7-py3.8-gcc9", | ||
"pytorch-linux-bionic-py3.6-clang9", | ||
"pytorch-linux-bionic-cuda10.2-cudnn7-py3.6-clang9", | ||
"pytorch-linux-bionic-py3.8-gcc9", | ||
"pytorch-linux-bionic-rocm3.5.1-py3.6", | ||
"pytorch-linux-xenial-cuda10-cudnn7-py3-gcc7", | ||
"pytorch-linux-xenial-cuda10.1-cudnn7-py3-gcc7", | ||
"pytorch-linux-xenial-cuda10.2-cudnn7-py3-gcc7", | ||
"pytorch-linux-xenial-cuda11.0-cudnn8-py3-gcc7", | ||
"pytorch-linux-xenial-cuda11.1-cudnn8-py3-gcc7", | ||
"pytorch-linux-xenial-cuda9.2-cudnn7-py3-gcc5.4", | ||
"pytorch-linux-xenial-cuda9.2-cudnn7-py3-gcc7", | ||
"pytorch-linux-xenial-py3-clang5-android-ndk-r19c", | ||
"pytorch-linux-xenial-py3-clang5-asan", | ||
"pytorch-linux-xenial-py3-clang7-onnx", | ||
"pytorch-linux-xenial-py3.8", | ||
"pytorch-linux-xenial-py3.6-clang7", | ||
"pytorch-linux-xenial-py3.6-gcc4.8", | ||
"pytorch-linux-xenial-py3.6-gcc5.4", | ||
"pytorch-linux-xenial-py3.6-gcc5.4", # this one is used in doc builds | ||
"pytorch-linux-xenial-py3.6-gcc7.2", | ||
"pytorch-linux-xenial-py3.6-gcc7", | ||
"pytorch-linux-bionic-rocm3.7-py3.6", | ||
"pytorch-linux-bionic-rocm3.9-py3.6", | ||
"pytorch-linux-bionic-rocm3.10-py3.6", | ||
] | ||
|
||
|
||
def get_workflow_jobs(): | ||
"""Generates a list of docker image build definitions""" | ||
return [ | ||
OrderedDict( | ||
ret = [] | ||
for image_name in IMAGE_NAMES: | ||
parameters = OrderedDict({ | ||
"name": quote(f"docker-{image_name}"), | ||
"image_name": quote(image_name), | ||
}) | ||
if image_name == "pytorch-linux-xenial-py3.6-gcc5.4": | ||
# pushing documentation on tags requires CircleCI to also | ||
# build all the dependencies on tags, including this docker image | ||
parameters['filters'] = gen_filter_dict(branches_list=r"/.*/", | ||
tags_list=RC_PATTERN) | ||
ret.append(OrderedDict( | ||
{ | ||
"docker_build_job": OrderedDict( | ||
{ | ||
"name": quote(f"docker-{image_name}"), | ||
"image_name": quote(image_name), | ||
} | ||
) | ||
"docker_build_job": parameters | ||
} | ||
) | ||
for image_name in IMAGE_NAMES | ||
] | ||
)) | ||
return ret |
Oops, something went wrong.