Skip to content

Commit 249280d

Browse files
authored
TRT-10 GA Support for release/2.3 branch (#2778)
1 parent 8b9836f commit 249280d

File tree

9 files changed

+28
-45
lines changed

9 files changed

+28
-45
lines changed

.github/scripts/install-torch-tensorrt.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ ${CONDA_RUN} python -m pip install pyyaml mpmath==1.3.0
77
export TRT_VERSION=$(${CONDA_RUN} python -c "import versions; versions.tensorrt_version()")
88

99
# Install TensorRT manually
10-
wget -q -P /opt/torch-tensorrt-builds/ https://developer.nvidia.com/downloads/compute/machine-learning/tensorrt/10.0.0/TensorRT-10.0.0.6.Linux.x86_64-gnu.cuda-12.4.tar.gz
11-
tar -xzf /opt/torch-tensorrt-builds/TensorRT-10.0.0.6.Linux.x86_64-gnu.cuda-12.4.tar.gz -C /opt/torch-tensorrt-builds/
12-
python -m pip install /opt/torch-tensorrt-builds/TensorRT-10.0.0.6/python/tensorrt-10.0.0b6-cp${PYTHON_VERSION//./}-none-linux_x86_64.whl
10+
wget -q -P /opt/torch-tensorrt-builds/ https://developer.nvidia.com/downloads/compute/machine-learning/tensorrt/10.0.1/tars/TensorRT-10.0.1.6.Linux.x86_64-gnu.cuda-12.4.tar.gz
11+
tar -xzf /opt/torch-tensorrt-builds/TensorRT-10.0.1.6.Linux.x86_64-gnu.cuda-12.4.tar.gz -C /opt/torch-tensorrt-builds/
12+
python -m pip install /opt/torch-tensorrt-builds/TensorRT-10.0.1.6/python/tensorrt-10.0.1-cp${PYTHON_VERSION//./}-none-linux_x86_64.whl
1313

1414
# Install Torch-TensorRT
1515
${CONDA_RUN} python -m pip install /opt/torch-tensorrt-builds/torch_tensorrt*+${CU_VERSION}*.whl

.github/workflows/build-test.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
os: linux
2222
test-infra-repository: pytorch/test-infra
2323
test-infra-ref: main
24-
channel: test
24+
channel: release
2525
with-rocm: false
2626
with-cpu: false
2727

@@ -78,7 +78,7 @@ jobs:
7878
script: |
7979
export USE_HOST_DEPS=1
8080
export LD_LIBRARY_PATH=/usr/lib64:$LD_LIBRARY_PATH
81-
export LD_LIBRARY_PATH=/opt/torch-tensorrt-builds/TensorRT-10.0.0.6/lib:$LD_LIBRARY_PATH
81+
export LD_LIBRARY_PATH=/opt/torch-tensorrt-builds/TensorRT-10.0.1.6/lib:$LD_LIBRARY_PATH
8282
pushd .
8383
cd tests/modules
8484
# Don't use requirements.txt here as it contains tensorrt and torch which should have been installed by now.
@@ -115,7 +115,7 @@ jobs:
115115
pre-script: ${{ matrix.pre-script }}
116116
script: |
117117
export USE_HOST_DEPS=1
118-
export LD_LIBRARY_PATH=/opt/torch-tensorrt-builds/TensorRT-10.0.0.6/lib:$LD_LIBRARY_PATH
118+
export LD_LIBRARY_PATH=/opt/torch-tensorrt-builds/TensorRT-10.0.1.6/lib:$LD_LIBRARY_PATH
119119
pushd .
120120
cd tests/py/dynamo
121121
${CONDA_RUN} python -m pip install --pre pytest-xdist timm transformers parameterized expecttest==0.1.6 --use-deprecated=legacy-resolver
@@ -144,7 +144,7 @@ jobs:
144144
pre-script: ${{ matrix.pre-script }}
145145
script: |
146146
export USE_HOST_DEPS=1
147-
export LD_LIBRARY_PATH=/opt/torch-tensorrt-builds/TensorRT-10.0.0.6/lib:$LD_LIBRARY_PATH
147+
export LD_LIBRARY_PATH=/opt/torch-tensorrt-builds/TensorRT-10.0.1.6/lib:$LD_LIBRARY_PATH
148148
pushd .
149149
cd tests/py/dynamo
150150
${CONDA_RUN} python -m pip install --pre pytest timm transformers parameterized expecttest==0.1.6 --use-deprecated=legacy-resolver
@@ -174,7 +174,7 @@ jobs:
174174
pre-script: ${{ matrix.pre-script }}
175175
script: |
176176
export USE_HOST_DEPS=1
177-
export LD_LIBRARY_PATH=/opt/torch-tensorrt-builds/TensorRT-10.0.0.6/lib:$LD_LIBRARY_PATH
177+
export LD_LIBRARY_PATH=/opt/torch-tensorrt-builds/TensorRT-10.0.1.6/lib:$LD_LIBRARY_PATH
178178
pushd .
179179
cd tests/py/dynamo
180180
${CONDA_RUN} python -m pip install --pre pytest timm transformers parameterized expecttest==0.1.6 --use-deprecated=legacy-resolver
@@ -203,7 +203,7 @@ jobs:
203203
pre-script: ${{ matrix.pre-script }}
204204
script: |
205205
export USE_HOST_DEPS=1
206-
export LD_LIBRARY_PATH=/opt/torch-tensorrt-builds/TensorRT-10.0.0.6/lib:$LD_LIBRARY_PATH
206+
export LD_LIBRARY_PATH=/opt/torch-tensorrt-builds/TensorRT-10.0.1.6/lib:$LD_LIBRARY_PATH
207207
pushd .
208208
cd tests/py/dynamo
209209
${CONDA_RUN} python -m pip install --pre pytest-xdist timm transformers parameterized expecttest==0.1.6 --use-deprecated=legacy-resolver
@@ -234,7 +234,7 @@ jobs:
234234
pre-script: ${{ matrix.pre-script }}
235235
script: |
236236
export USE_HOST_DEPS=1
237-
export LD_LIBRARY_PATH=/opt/torch-tensorrt-builds/TensorRT-10.0.0.6/lib:$LD_LIBRARY_PATH
237+
export LD_LIBRARY_PATH=/opt/torch-tensorrt-builds/TensorRT-10.0.1.6/lib:$LD_LIBRARY_PATH
238238
pushd .
239239
cd tests/py/dynamo
240240
${CONDA_RUN} python -m pip install --pre pytest-xdist timm transformers parameterized expecttest==0.1.6 --use-deprecated=legacy-resolver
@@ -264,7 +264,7 @@ jobs:
264264
pre-script: ${{ matrix.pre-script }}
265265
script: |
266266
export USE_HOST_DEPS=1
267-
export LD_LIBRARY_PATH=/opt/torch-tensorrt-builds/TensorRT-10.0.0.6/lib:$LD_LIBRARY_PATH
267+
export LD_LIBRARY_PATH=/opt/torch-tensorrt-builds/TensorRT-10.0.1.6/lib:$LD_LIBRARY_PATH
268268
pushd .
269269
cd tests/py/core
270270
${CONDA_RUN} python -m pip install --pre pytest-xdist timm transformers parameterized expecttest==0.1.6 --use-deprecated=legacy-resolver

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,8 +118,7 @@ These are the following dependencies used to verify the testcases. Torch-TensorR
118118
- Bazel 5.2.0
119119
- Libtorch 2.3.0 (built with CUDA 12.1)
120120
- CUDA 12.1
121-
- cuDNN 8.9.5
122-
- TensorRT 10.0.0.6
121+
- TensorRT 10.0.1.6
123122

124123
## Prebuilt Binaries and Wheel files
125124

WORKSPACE

Lines changed: 5 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -54,37 +54,27 @@ http_archive(
5454
name = "libtorch",
5555
build_file = "@//third_party/libtorch:BUILD",
5656
strip_prefix = "libtorch",
57-
urls = ["https://download.pytorch.org/libtorch/test/cu121/libtorch-cxx11-abi-shared-with-deps-2.3.0%2Bcu121.zip"],
57+
urls = ["https://download.pytorch.org/libtorch/cu121/libtorch-cxx11-abi-shared-with-deps-2.3.0%2Bcu121.zip"],
5858
)
5959

6060
http_archive(
6161
name = "libtorch_pre_cxx11_abi",
6262
build_file = "@//third_party/libtorch:BUILD",
6363
strip_prefix = "libtorch",
64-
urls = ["https://download.pytorch.org/libtorch/test/cu121/libtorch-shared-with-deps-2.3.0%2Bcu121.zip"],
64+
urls = ["https://download.pytorch.org/libtorch/cu121/libtorch-shared-with-deps-2.3.0%2Bcu121.zip"],
6565
)
6666

6767
# Download these tarballs manually from the NVIDIA website
6868
# Either place them in the distdir directory in third_party and use the --distdir flag
6969
# or modify the urls to "file:///<PATH TO TARBALL>/<TARBALL NAME>.tar.gz
7070

71-
http_archive(
72-
name = "cudnn",
73-
build_file = "@//third_party/cudnn/archive:BUILD",
74-
sha256 = "2a2eb89a2ab51071151c6082f1e816c702167a711a9372f9f73a7b5c4b06e01a",
75-
strip_prefix = "cudnn-linux-x86_64-8.9.5.30_cuda12-archive",
76-
urls = [
77-
"https://developer.nvidia.com/downloads/compute/cudnn/secure/8.9.5/local_installers/12.x/cudnn-linux-x86_64-8.9.5.30_cuda12-archive.tar.xz",
78-
],
79-
)
80-
8171
http_archive(
8272
name = "tensorrt",
8373
build_file = "@//third_party/tensorrt/archive:BUILD",
84-
sha256 = "0f8157a5fc5329943b338b893591373350afa90ca81239cdadd7580cd1eba254",
85-
strip_prefix = "TensorRT-8.6.1.6",
74+
sha256 = "a5cd2863793d69187ce4c73b2fffc1f470ff28cfd91e3640017e53b8916453d5",
75+
strip_prefix = "TensorRT-10.0.1.6",
8676
urls = [
87-
"https://developer.nvidia.com/downloads/compute/machine-learning/tensorrt/secure/8.6.1/tars/TensorRT-8.6.1.6.Linux.x86_64-gnu.cuda-12.0.tar.gz",
77+
"https://developer.nvidia.com/downloads/compute/machine-learning/tensorrt/10.0.1/tars/TensorRT-10.0.1.6.Linux.x86_64-gnu.cuda-12.4.tar.gz",
8878
],
8979
)
9080

@@ -111,12 +101,6 @@ http_archive(
111101
# build_file = "third_party/libtorch/BUILD"
112102
#)
113103

114-
#new_local_repository(
115-
# name = "cudnn",
116-
# path = "/usr/",
117-
# build_file = "@//third_party/cudnn/local:BUILD"
118-
#)
119-
120104
#new_local_repository(
121105
# name = "tensorrt",
122106
# path = "/usr/",

dev_dep_versions.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
__version__: "2.3.0"
22
__cuda_version__: "12.1"
33
__cudnn_version__: "8.9"
4-
__tensorrt_version__: "10.0.0.6"
4+
__tensorrt_version__: "10.0.1.6"

packaging/pre_build_script.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
python3 -m pip install pyyaml
55
yum install -y ninja-build gettext
66
TRT_VERSION=$(python3 -c "import versions; versions.tensorrt_version()")
7-
wget -q -P /opt/torch-tensorrt-builds/ https://developer.nvidia.com/downloads/compute/machine-learning/tensorrt/10.0.0/TensorRT-10.0.0.6.Linux.x86_64-gnu.cuda-12.4.tar.gz
8-
tar -xzf /opt/torch-tensorrt-builds/TensorRT-10.0.0.6.Linux.x86_64-gnu.cuda-12.4.tar.gz -C /opt/torch-tensorrt-builds/
9-
export LD_LIBRARY_PATH=/opt/torch-tensorrt-builds/TensorRT-10.0.0.6/lib:$LD_LIBRARY_PATH
7+
wget -q -P /opt/torch-tensorrt-builds/ https://developer.nvidia.com/downloads/compute/machine-learning/tensorrt/10.0.1/tars/TensorRT-10.0.1.6.Linux.x86_64-gnu.cuda-12.4.tar.gz
8+
tar -xzf /opt/torch-tensorrt-builds/TensorRT-10.0.1.6.Linux.x86_64-gnu.cuda-12.4.tar.gz -C /opt/torch-tensorrt-builds/
9+
export LD_LIBRARY_PATH=/opt/torch-tensorrt-builds/TensorRT-10.0.1.6/lib:$LD_LIBRARY_PATH
1010
wget https://github.com/bazelbuild/bazelisk/releases/download/v1.17.0/bazelisk-linux-amd64 \
1111
&& mv bazelisk-linux-amd64 /usr/bin/bazel \
1212
&& chmod +x /usr/bin/bazel

py/requirements.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
numpy
22
packaging
33
pybind11==2.6.2
4-
--extra-index-url https://download.pytorch.org/whl/test/cu121
4+
--extra-index-url https://download.pytorch.org/whl/cu121
55
torch==2.3.0
66
torchvision==0.18.0
77
--extra-index-url https://pypi.ngc.nvidia.com
88
pyyaml
9-
tensorrt
9+
tensorrt==10.0.1.6

py/torch_tensorrt/csrc/torch_tensorrt_py.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#include "pybind11/stl.h"
33

44
#include "ATen/core/jit_type.h"
5-
#include "NvInferRuntimeBase.h"
5+
#include "NvInferRuntime.h"
66
#include "Python.h"
77
#include "core/compiler.h"
88
#include "core/conversion/conversion.h"

toolchains/ci_workspaces/WORKSPACE.x86_64.release.rhel.tmpl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,21 +58,21 @@ http_archive(
5858
name = "libtorch",
5959
build_file = "@//third_party/libtorch:BUILD",
6060
strip_prefix = "libtorch",
61-
urls = ["https://download.pytorch.org/libtorch/test/cu121/libtorch-cxx11-abi-shared-with-deps-2.3.0%2Bcu121.zip"],
61+
urls = ["https://download.pytorch.org/libtorch/cu121/libtorch-cxx11-abi-shared-with-deps-2.3.0%2Bcu121.zip"],
6262
)
6363

6464
http_archive(
6565
name = "libtorch_pre_cxx11_abi",
6666
build_file = "@//third_party/libtorch:BUILD",
6767
strip_prefix = "libtorch",
68-
urls = ["https://download.pytorch.org/libtorch/test/cu121/libtorch-shared-with-deps-2.3.0%2Bcu121.zip"],
68+
urls = ["https://download.pytorch.org/libtorch/cu121/libtorch-shared-with-deps-2.3.0%2Bcu121.zip"],
6969
)
7070

7171
http_archive(
7272
name = "tensorrt",
73-
urls = ["file:////opt/torch-tensorrt-builds/TensorRT-10.0.0.6.Linux.x86_64-gnu.cuda-12.4.tar.gz",],
73+
urls = ["file:////opt/torch-tensorrt-builds/TensorRT-10.0.1.6.Linux.x86_64-gnu.cuda-12.4.tar.gz",],
7474
build_file = "@//third_party/tensorrt/archive:BUILD",
75-
strip_prefix = "TensorRT-10.0.0.6"
75+
strip_prefix = "TensorRT-10.0.1.6"
7676
)
7777

7878
# #########################################################################

0 commit comments

Comments
 (0)