Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Torch 1.10.2 #531

Merged
merged 1 commit into from
Feb 18, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
82 changes: 82 additions & 0 deletions .buildkite/pipeline.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions .github/workflows/mac_ci.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions build/ci_matrix.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@
{"cuda": "10.1", "tensorflow": "2.2.0", "torch": "1.7.0", "python": "3.8", "test_frameworks": "torchscript,python"},
{"cuda": "10.2", "tensorflow": "2.2.0", "torch": "1.8.1", "python": "3.8", "test_frameworks": "torchscript,python"},
{"cuda": "10.2", "tensorflow": "2.2.0", "torch": "1.9.0", "python": "3.8", "test_frameworks": "torchscript,python"},
{"cuda": "10.2", "tensorflow": "2.2.0", "torch": "1.10.2", "python": "3.8", "test_frameworks": "torchscript,python"},

# Only testing TF
{"cuda": "11.2.1", "cudnn": "8", "tensorflow": "2.5.0", "torch": "1.7.0", "python": "3.8", "test_frameworks": "tensorflow"},
Expand Down
2 changes: 1 addition & 1 deletion build/install_frameworks.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ def install_pytorch(version):
version += "+" + torch_cuda_string

# For 1.8.1 and 1.9.0, they always include the cuda version in the version string
if version_base in ["1.8.1", "1.9.0"] and version_date is None:
if version_base in ["1.8.1", "1.9.0", "1.10.2"] and version_date is None:
version += "+" + torch_cuda_string

# The Mac 1.3.0 stable release doesn't exist in `torch_stable.html`
Expand Down
17 changes: 17 additions & 0 deletions docker-compose.test.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions source/bazel/libtorch.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,10 @@ def _impl(repository_ctx):
"url": "https://download.pytorch.org/libtorch/cpu/libtorch-shared-with-deps-1.9.0%2Bcpu.zip",
"sha256": "",
},
"1.10.2-linux-cpu": {
"url": "https://download.pytorch.org/libtorch/cpu/libtorch-shared-with-deps-1.10.2%2Bcpu.zip",
"sha256": "fa3fad287c677526277f64d12836266527d403f21f41cc2e7fb9d904969d4c4a",
},

# Linux GPU
"1.1.0-linux-cu90": {
Expand Down Expand Up @@ -102,6 +106,10 @@ def _impl(repository_ctx):
"url": "https://download.pytorch.org/libtorch/cu102/libtorch-shared-with-deps-1.9.0%2Bcu102.zip",
"sha256": "",
},
"1.10.2-linux-cu102": {
"url": "https://download.pytorch.org/libtorch/cu102/libtorch-shared-with-deps-1.10.2%2Bcu102.zip",
"sha256": "206ab3f44d482a1d9837713cafbde9dd9d7907efac2dc94f1dc86e9a1101296f",
},

# Mac CPU
"1.1.0-mac-cpu": {
Expand Down Expand Up @@ -140,6 +148,10 @@ def _impl(repository_ctx):
"url": "https://download.pytorch.org/libtorch/cpu/libtorch-macos-1.9.0.zip",
"sha256": "",
},
"1.10.2-mac-cpu": {
"url": "https://download.pytorch.org/libtorch/cpu/libtorch-macos-1.10.2.zip",
"sha256": "d1711e844dc69c2338adfc8ce634806a9ae36e54328afbe501bafd2d70f550e2",
},
}

download_mapping = MAPPING["{}-{}-{}".format(
Expand Down
2 changes: 1 addition & 1 deletion source/deps/BUILD.libtorch
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ cc_library(
name = "libtorch",
srcs = select({
"@bazel_tools//src/conditions:darwin": glob(["lib/libcaffe2.dylib", "lib/libc10.dylib", "lib/libtorch.dylib", "lib/libtorch_cpu.dylib", "lib/libtorch.1.dylib", "lib/libtensorpipe.dylib"]),
"//conditions:default": glob(["lib/lib*.so*"], exclude=["lib/libtorch_python.so"]),
"//conditions:default": glob(["lib/lib*.so*"], exclude=["lib/libtorch_python.so", "lib/libnnapi_backend.so"]),
}),
deps = select({
"@bazel_tools//src/conditions:darwin": ["@mklml_repo_darwin//:mklml"],
Expand Down
5 changes: 5 additions & 0 deletions source/neuropod/backends/torchscript/torch_tensor.hh
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,11 @@ limitations under the License.
// The date of the official torch 1.9.0 release
#define CAFFE2_NIGHTLY_VERSION 20210615
#endif

#if CAFFE2_VERSION == 11002
// The date of the official torch 1.10.2 release
#define CAFFE2_NIGHTLY_VERSION 20220127
#endif
#endif

namespace neuropod
Expand Down
2 changes: 1 addition & 1 deletion source/neuropod/internal/backend_registration.cc
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ std::vector<BackendLoadSpec> get_default_backend_map()
{"torchscript",
"libneuropod_torchscript_backend.so",
true,
{"1.1.0", "1.2.0", "1.3.0", "1.4.0", "1.5.0", "1.6.0", "1.7.0", "1.8.1", "1.9.0"}},
{"1.1.0", "1.2.0", "1.3.0", "1.4.0", "1.5.0", "1.6.0", "1.7.0", "1.8.1", "1.9.0", "1.10.2"}},
{"tensorflow",
"libneuropod_tensorflow_backend.so",
true,
Expand Down