Skip to content

Commit baf61e0

Browse files
committed
fix: Upgrade main to TRT 8.6, CUDA 11.8, Torch Dev
- Upgrade versions, make required code edits for functionality and coverage for tests and CI
1 parent 2dc510b commit baf61e0

File tree

6 files changed

+19
-21
lines changed

6 files changed

+19
-21
lines changed

.circleci/config.yml

+8-5
Original file line numberDiff line numberDiff line change
@@ -270,15 +270,18 @@ commands:
270270
torch-build:
271271
type: string
272272
default: "2.1.0.dev20230421+cu118"
273+
torchvision-build:
274+
type: string
275+
default: "0.16.0.dev20230421+cu118"
273276
torch-build-index:
274277
type: string
275-
default: "https://download.pytorch.org/whl/cu118"
278+
default: "https://download.pytorch.org/whl/nightly/cu118"
276279
steps:
277280
- run:
278281
name: Install Torch
279282
command: |
280283
pip3 install --upgrade pip
281-
pip3 install torch==<< parameters.torch-build >> torchvision torchaudio --extra-index-url << parameters.torch-build-index >>
284+
pip3 install torch==<< parameters.torch-build >> torchvision==<< parameters.torchvision-build >> --extra-index-url << parameters.torch-build-index >>
282285
283286
build-py:
284287
description: "Build the torch-tensorrt python release (pre-cxx11-abi)"
@@ -1208,13 +1211,13 @@ parameters:
12081211
default: "2.1.0.dev20230421+cu118"
12091212
torch-build-index:
12101213
type: string
1211-
default: "https://download.pytorch.org/whl/cu118"
1214+
default: "https://download.pytorch.org/whl/nightly/cu118"
12121215
torch-build-legacy:
12131216
type: string
1214-
default: "1.13.1+cu118"
1217+
default: "1.13.1+cu117"
12151218
torch-build-index-legacy:
12161219
type: string
1217-
default: "https://download.pytorch.org/whl/cu118"
1220+
default: "https://download.pytorch.org/whl/cu117"
12181221
cudnn-version:
12191222
type: string
12201223
default: "8.5.0.96"

README.md

+4-9
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,7 @@ In the case of building on top of a custom base container, you first must determ
3131
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
3232
C++11 ABI version of Torch-TensorRT.
3333

34-
You can then build the container using:
35-
36-
37-
```bash
38-
docker build --build-arg BASE_IMG=<IMAGE> -f docker/Dockerfile -t torch_tensorrt:latest .
39-
```
34+
You can then build the container using the build command in the [docker README](docker/README.md#instructions)
4035

4136
If you would like to build outside a docker container, please follow the section [Compiling Torch-TensorRT](#compiling-torch-tensorrt)
4237

@@ -121,10 +116,10 @@ torch.jit.save(trt_ts_module, "trt_torchscript_module.ts") # save the TRT embedd
121116
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.
122117

123118
- Bazel 5.2.0
124-
- Libtorch 2.1.0.dev20230314 (built with CUDA 11.7)
125-
- CUDA 11.7
119+
- Libtorch 2.1.0.dev20230421 (built with CUDA 11.8)
120+
- CUDA 11.8
126121
- cuDNN 8.5.0
127-
- TensorRT 8.5.1.7
122+
- TensorRT 8.6.0
128123

129124
## Prebuilt Binaries and Wheel files
130125

docker/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Base image starts with CUDA
2-
ARG BASE_IMG=nvidia/cuda:11.7.1-devel-ubuntu22.04
2+
ARG BASE_IMG=nvidia/cuda:11.8.0-devel-ubuntu22.04
33
FROM ${BASE_IMG} as base
44

55
ARG TENSORRT_VERSION

docker/README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
* The `Dockerfile` currently uses <a href="https://github.com/bazelbuild/bazelisk">Bazelisk</a> to select the Bazel version, and uses the exact library versions of Torch and CUDA listed in <a href="https://github.com/pytorch/TensorRT#dependencies">dependencies</a>.
66
* 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.7.1-devel-ubuntu22.04`, though this is optional
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
88
* [**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.
99

1010
* This `Dockerfile` installs `pre-cxx11-abi` versions of Pytorch and builds Torch-TRT using `pre-cxx11-abi` libtorch as well.
@@ -17,14 +17,14 @@ Note: By default the container uses the `pre-cxx11-abi` version of Torch + Torch
1717

1818
### Instructions
1919

20-
- The example below uses CUDNN 8.5.0 and TensorRT 8.5.1
20+
- The example below uses CUDNN 8.5.0 and TensorRT 8.6.0
2121
- See <a href="https://github.com/pytorch/TensorRT#dependencies">dependencies</a> for a list of current default dependencies.
2222

2323
> From root of Torch-TensorRT repo
2424
2525
Build:
2626
```
27-
DOCKER_BUILDKIT=1 docker build --build-arg TENSORRT_VERSION=8.5.1 --build-arg CUDNN_VERSION=8.5.0 -f docker/Dockerfile -t torch_tensorrt:latest .
27+
DOCKER_BUILDKIT=1 docker build --build-arg TENSORRT_VERSION=8.6.0 --build-arg CUDNN_VERSION=8.5.0 -f docker/Dockerfile -t torch_tensorrt:latest .
2828
```
2929

3030
Run:

py/setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -380,7 +380,7 @@ def run(self):
380380
long_description=long_description,
381381
ext_modules=ext_modules,
382382
install_requires=[
383-
"torch==2.0.0",
383+
"torch>=1.13.1",
384384
],
385385
setup_requires=[],
386386
cmdclass={

py/versions.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
__version__ = "1.4.0.dev0"
2-
__cuda_version__ = "11.7"
2+
__cuda_version__ = "11.8"
33
__cudnn_version__ = "8.5"
4-
__tensorrt_version__ = "8.5"
4+
__tensorrt_version__ = "8.6"

0 commit comments

Comments
 (0)