You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: Upgrade to PyTorch 2.0.1 + Other improvements
- Add support for `--legacy` flag in `setup.py`, to enable installation
with PyTorch 1.13.1
- Add in test cases previously disabled due to dependency issues
- Improve documentation of `README`s across repository
- Update cudnn version to 8.8, update TRT version to 8.6 across all
files and `README`s
- Update `docker` folder on release branch to use new build system with
custom TRT, cudnn, CUDA, and Python versions
- Update `WORKSPACE` files to use Torch 2.0.1 Release Candidate
Copy file name to clipboardExpand all lines: README.md
+14-12Lines changed: 14 additions & 12 deletions
Original file line number
Diff line number
Diff line change
@@ -31,12 +31,7 @@ In the case of building on top of a custom base container, you first must determ
31
31
version of the PyTorch C++ ABI. If your source of PyTorch is pytorch.org, likely this is the pre-cxx11-abi in which case you must modify `//docker/dist-build.sh` to not build the
enabled_precisions = {torch.half}, # Run with FP16
85
87
)
86
88
@@ -114,17 +116,17 @@ torch.jit.save(trt_ts_module, "trt_torchscript_module.ts") # save the TRT embedd
114
116
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.
115
117
116
118
- Bazel 5.2.0
117
-
- Libtorch 2.0.0.dev20230103 (built with CUDA 11.7)
RUN test -n "$TENSORRT_VERSION" || (echo "No tensorrt version specified, please use --build-arg TENSORRT_VERSION=x.y.z to specify a version." && exit 1)
7
+
ARG CUDNN_VERSION
8
+
RUN test -n "$CUDNN_VERSION" || (echo "No cudnn version specified, please use --build-arg CUDNN_VERSION=x.y.z to specify a version." && exit 1)
Copy file name to clipboardExpand all lines: docker/README.md
+11-4Lines changed: 11 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -2,22 +2,29 @@
2
2
3
3
* Use `Dockerfile` to build a container which provides the exact development environment that our master branch is usually tested against.
4
4
5
-
*`Dockerfile` currently uses the exact library versions (Torch, CUDA, CUDNN, TensorRT) listed in <ahref="https://github.com/pytorch/TensorRT#dependencies">dependencies</a> to build Torch-TensorRT.
5
+
* The `Dockerfile` currently uses <ahref="https://github.com/bazelbuild/bazelisk">Bazelisk</a> to select the Bazel version, and uses the exact library versions of Torch and CUDA listed in <ahref="https://github.com/pytorch/TensorRT#dependencies">dependencies</a>.
6
+
* The desired versions of CUDNN and TensorRT must be specified as build-args, with major, minor, and patch versions as in: `--build-arg TENSORRT_VERSION=a.b.c --build-arg CUDNN_VERSION=x.y.z`
7
+
*[**Optional**] The desired base image be changed by explicitly setting a base image, as in `--build-arg BASE_IMG=nvidia/cuda:11.8.0-devel-ubuntu22.04`, though this is optional
8
+
*[**Optional**] Additionally, the desired Python version can be changed by explicitly setting a version, as in `--build-arg PYTHON_VERSION=3.10`, though this is optional as well.
6
9
7
10
* This `Dockerfile` installs `pre-cxx11-abi` versions of Pytorch and builds Torch-TRT using `pre-cxx11-abi` libtorch as well.
8
-
Note: To install `cxx11_abi` version of Torch-TensorRT, enable `USE_CXX11=1` flag so that `dist-build.sh` can build it accordingly.
11
+
12
+
Note: By default the container uses the `pre-cxx11-abi` version of Torch + Torch-TRT. If you are using a workflow that requires a build of PyTorch on the CXX11 ABI (e.g. using the PyTorch NGC containers as a base image), add the Docker build argument: `--build-arg USE_CXX11_ABI=1`
9
13
10
14
### Dependencies
11
15
12
16
* Install nvidia-docker by following https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/install-guide.html#docker
13
17
14
18
### Instructions
15
19
20
+
- The example below uses CUDNN 8.8.0 and TensorRT 8.6.0
21
+
- See <ahref="https://github.com/pytorch/TensorRT#dependencies">dependencies</a> for a list of current default dependencies.
@@ -38,4 +45,4 @@ bazel test //tests/core/conversion/converters:test_activation --compilation_mode
38
45
39
46
### Pytorch NGC containers
40
47
41
-
We also ship Torch-TensorRT in <ahref="https://catalog.ngc.nvidia.com/orgs/nvidia/containers/pytorch">Pytorch NGC containers </a>. Release notes for these containers can be found <ahref="https://docs.nvidia.com/deeplearning/frameworks/pytorch-release-notes/index.html">here</a>. Check out `release/ngc/23.XX` branch of Torch-TensorRT for source code that gets shipped with `23.XX` version of Pytorch NGC container.
48
+
We also ship Torch-TensorRT in <ahref="https://catalog.ngc.nvidia.com/orgs/nvidia/containers/pytorch">Pytorch NGC containers </a>. Release notes for these containers can be found <ahref="https://docs.nvidia.com/deeplearning/frameworks/pytorch-release-notes/index.html">here</a>. Check out `release/ngc/23.XX` branch of Torch-TensorRT for source code that gets shipped with `23.XX` version of Pytorch NGC container.
0 commit comments