Skip to content

Commit

Permalink
refactor! : Update Pytorch version to 1.10
Browse files Browse the repository at this point in the history
BREAKING CHANGE: This commit updates the pytorch version to 1.10. To use python API of torch_tensorrt, please upgrade your local pytorch to 1.10 to avoid ABI incompatibility errors. WORKSPACE and requirements files are updated accordingly

Signed-off-by: Dheeraj Peri <peri.dheeraj@gmail.com>

Signed-off-by: Dheeraj Peri <peri.dheeraj@gmail.com>
  • Loading branch information
peri044 authored and narendasan committed Nov 3, 2021
1 parent a8a407f commit cc7d0b7
Show file tree
Hide file tree
Showing 9 changed files with 17 additions and 18 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ torch.jit.save(trt_ts_module, "trt_torchscript_module.ts")
These are the following dependencies used to verify the testcases. Torch-TensorRT can work with other versions, but the tests are not guaranteed to pass.

- Bazel 4.0.0
- Libtorch 1.9.1 (built with CUDA 11.1)
- Libtorch 1.10.0 (built with CUDA 11.3)
- CUDA 11.1 (10.2 on Jetson)
- cuDNN 8.2
- TensorRT 8.0.3.4 (TensorRT 8.0.1.6 on Jetson)
Expand Down
8 changes: 4 additions & 4 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -56,17 +56,17 @@ new_local_repository(
http_archive(
name = "libtorch",
build_file = "@//third_party/libtorch:BUILD",
sha256 = "db57b1023fb33768286a98ba22c44cfe03d6ed158bc2dc0ca1d4928ee5f19f60",
sha256 = "190e963e739d5f7c2dcf94b3994de8fcd335706a4ebb333812ea7d8c841beb06",
strip_prefix = "libtorch",
urls = ["https://download.pytorch.org/libtorch/cu111/libtorch-cxx11-abi-shared-with-deps-1.9.1%2Bcu111.zip"],
urls = ["https://download.pytorch.org/libtorch/cu113/libtorch-cxx11-abi-shared-with-deps-1.10.0%2Bcu113.zip"],
)

http_archive(
name = "libtorch_pre_cxx11_abi",
build_file = "@//third_party/libtorch:BUILD",
sha256 = "5563ca53b2b5342f1ab7eef9baf308f197673663ad5b1458a031c46dd802f413",
sha256 = "0996a6a4ea8bbc1137b4fb0476eeca25b5efd8ed38955218dec1b73929090053",
strip_prefix = "libtorch",
urls = ["https://download.pytorch.org/libtorch/cu111/libtorch-shared-with-deps-1.9.1%2Bcu111.zip"],
urls = ["https://download.pytorch.org/libtorch/cu113/libtorch-shared-with-deps-1.10.0%2Bcu113.zip"],
)

# Download these tarballs manually from the NVIDIA website
Expand Down
9 changes: 4 additions & 5 deletions docker/WORKSPACE.docs
Original file line number Diff line number Diff line change
Expand Up @@ -52,17 +52,17 @@ new_local_repository(
http_archive(
name = "libtorch",
build_file = "@//third_party/libtorch:BUILD",
sha256 = "db57b1023fb33768286a98ba22c44cfe03d6ed158bc2dc0ca1d4928ee5f19f60",
sha256 = "190e963e739d5f7c2dcf94b3994de8fcd335706a4ebb333812ea7d8c841beb06",
strip_prefix = "libtorch",
urls = ["https://download.pytorch.org/libtorch/cu111/libtorch-cxx11-abi-shared-with-deps-1.9.1%2Bcu111.zip"],
urls = ["https://download.pytorch.org/libtorch/cu113/libtorch-cxx11-abi-shared-with-deps-1.10.0%2Bcu113.zip"],
)

http_archive(
name = "libtorch_pre_cxx11_abi",
build_file = "@//third_party/libtorch:BUILD",
sha256 = "5563ca53b2b5342f1ab7eef9baf308f197673663ad5b1458a031c46dd802f413",
sha256 = "0996a6a4ea8bbc1137b4fb0476eeca25b5efd8ed38955218dec1b73929090053",
strip_prefix = "libtorch",
urls = ["https://download.pytorch.org/libtorch/cu111/libtorch-shared-with-deps-1.9.1%2Bcu111.zip"],
urls = ["https://download.pytorch.org/libtorch/cu113/libtorch-shared-with-deps-1.10.0%2Bcu113.zip"],
)

####################################################################################
Expand Down Expand Up @@ -99,4 +99,3 @@ pip3_import(

load("@py_test_deps//:requirements.bzl", "pip_install")
pip_install()

2 changes: 1 addition & 1 deletion docsrc/tutorials/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ the CUDA driver installed and the container must have CUDA)

The correct LibTorch version will be pulled down for you by bazel.

NOTE: For best compatability with official PyTorch, use torch==1.9.1+cuda111, TensorRT 8.0 and cuDNN 8.2 for CUDA 11.1 however Torch-TensorRT itself supports
NOTE: For best compatability with official PyTorch, use torch==1.10.0+cuda113, TensorRT 8.0 and cuDNN 8.2 for CUDA 11.3 however Torch-TensorRT itself supports
TensorRT and cuDNN for CUDA versions other than 11.1 for usecases such as using NVIDIA compiled distributions of PyTorch that use other versions of CUDA
e.g. aarch64 or custom compiled version of PyTorch.

Expand Down
2 changes: 1 addition & 1 deletion examples/int8/training/vgg16/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
torch>=1.9.1
torch>=1.10.0
tensorboard>=1.14.0
pytorch-quantization --extra-index-url https://pypi.ngc.nvidia.com
4 changes: 2 additions & 2 deletions py/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
-f https://download.pytorch.org/whl/torch_stable.html
torch==1.9.1+cu111
pybind11==2.6.2
torch==1.10.0+cu113
pybind11==2.6.2
2 changes: 1 addition & 1 deletion py/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ def run(self):
long_description=long_description,
ext_modules=ext_modules,
install_requires=[
'torch>=1.9.0<1.11.0',
'torch>=1.10.0<1.11.0',
],
setup_requires=[],
cmdclass={
Expand Down
2 changes: 1 addition & 1 deletion tests/modules/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
-f https://download.pytorch.org/whl/torch_stable.html
timm==v0.4.12
torch==1.9.1+cu111
torch==1.10.0+cu113
4 changes: 2 additions & 2 deletions tests/py/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
torchvision==0.10.1+cu111
-f https://download.pytorch.org/whl/torch_stable.html
torchvision==0.11.1+cu113
-f https://download.pytorch.org/whl/torch_stable.html

0 comments on commit cc7d0b7

Please sign in to comment.