Skip to content

Commit 482206f

Browse files
authored
TRT-10 GA Support for main branch (#2781)
1 parent 1a4ffe4 commit 482206f

File tree

11 files changed

+30
-41
lines changed

11 files changed

+30
-41
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: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ jobs:
7777
script: |
7878
export USE_HOST_DEPS=1
7979
export LD_LIBRARY_PATH=/usr/lib64:$LD_LIBRARY_PATH
80-
export LD_LIBRARY_PATH=/opt/torch-tensorrt-builds/TensorRT-10.0.0.6/lib:$LD_LIBRARY_PATH
80+
export LD_LIBRARY_PATH=/opt/torch-tensorrt-builds/TensorRT-10.0.1.6/lib:$LD_LIBRARY_PATH
8181
pushd .
8282
cd tests/modules
8383
# Don't use requirements.txt here as it contains tensorrt and torch which should have been installed by now.
@@ -114,7 +114,7 @@ jobs:
114114
pre-script: ${{ matrix.pre-script }}
115115
script: |
116116
export USE_HOST_DEPS=1
117-
export LD_LIBRARY_PATH=/opt/torch-tensorrt-builds/TensorRT-10.0.0.6/lib:$LD_LIBRARY_PATH
117+
export LD_LIBRARY_PATH=/opt/torch-tensorrt-builds/TensorRT-10.0.1.6/lib:$LD_LIBRARY_PATH
118118
pushd .
119119
cd tests/py/dynamo
120120
${CONDA_RUN} python -m pip install --pre pytest-xdist timm transformers parameterized expecttest==0.1.6 --use-deprecated=legacy-resolver
@@ -143,7 +143,7 @@ jobs:
143143
pre-script: ${{ matrix.pre-script }}
144144
script: |
145145
export USE_HOST_DEPS=1
146-
export LD_LIBRARY_PATH=/opt/torch-tensorrt-builds/TensorRT-10.0.0.6/lib:$LD_LIBRARY_PATH
146+
export LD_LIBRARY_PATH=/opt/torch-tensorrt-builds/TensorRT-10.0.1.6/lib:$LD_LIBRARY_PATH
147147
pushd .
148148
cd tests/py/dynamo
149149
${CONDA_RUN} python -m pip install --pre pytest timm transformers parameterized expecttest==0.1.6 --use-deprecated=legacy-resolver
@@ -173,7 +173,7 @@ jobs:
173173
pre-script: ${{ matrix.pre-script }}
174174
script: |
175175
export USE_HOST_DEPS=1
176-
export LD_LIBRARY_PATH=/opt/torch-tensorrt-builds/TensorRT-10.0.0.6/lib:$LD_LIBRARY_PATH
176+
export LD_LIBRARY_PATH=/opt/torch-tensorrt-builds/TensorRT-10.0.1.6/lib:$LD_LIBRARY_PATH
177177
pushd .
178178
cd tests/py/dynamo
179179
${CONDA_RUN} python -m pip install --pre pytest timm transformers parameterized expecttest==0.1.6 --use-deprecated=legacy-resolver
@@ -202,7 +202,7 @@ jobs:
202202
pre-script: ${{ matrix.pre-script }}
203203
script: |
204204
export USE_HOST_DEPS=1
205-
export LD_LIBRARY_PATH=/opt/torch-tensorrt-builds/TensorRT-10.0.0.6/lib:$LD_LIBRARY_PATH
205+
export LD_LIBRARY_PATH=/opt/torch-tensorrt-builds/TensorRT-10.0.1.6/lib:$LD_LIBRARY_PATH
206206
pushd .
207207
cd tests/py/dynamo
208208
${CONDA_RUN} python -m pip install --pre pytest-xdist timm transformers parameterized expecttest==0.1.6 --use-deprecated=legacy-resolver
@@ -233,7 +233,7 @@ jobs:
233233
pre-script: ${{ matrix.pre-script }}
234234
script: |
235235
export USE_HOST_DEPS=1
236-
export LD_LIBRARY_PATH=/opt/torch-tensorrt-builds/TensorRT-10.0.0.6/lib:$LD_LIBRARY_PATH
236+
export LD_LIBRARY_PATH=/opt/torch-tensorrt-builds/TensorRT-10.0.1.6/lib:$LD_LIBRARY_PATH
237237
pushd .
238238
cd tests/py/dynamo
239239
${CONDA_RUN} python -m pip install --pre pytest-xdist timm transformers parameterized expecttest==0.1.6 --use-deprecated=legacy-resolver
@@ -263,7 +263,7 @@ jobs:
263263
pre-script: ${{ matrix.pre-script }}
264264
script: |
265265
export USE_HOST_DEPS=1
266-
export LD_LIBRARY_PATH=/opt/torch-tensorrt-builds/TensorRT-10.0.0.6/lib:$LD_LIBRARY_PATH
266+
export LD_LIBRARY_PATH=/opt/torch-tensorrt-builds/TensorRT-10.0.1.6/lib:$LD_LIBRARY_PATH
267267
pushd .
268268
cd tests/py/core
269269
${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.4.0.dev (latest nightly) (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: 3 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -68,23 +68,13 @@ http_archive(
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 = "0e35729954681411a79ccf31df089523caa11838095fbd025ddc7cd6f73f02de",
85-
strip_prefix = "TensorRT-10.0.0.6",
74+
sha256 = "a5cd2863793d69187ce4c73b2fffc1f470ff28cfd91e3640017e53b8916453d5",
75+
strip_prefix = "TensorRT-10.0.1.6",
8676
urls = [
87-
"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",
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.4.0.dev0"
22
__cuda_version__: "12.1"
33
__cudnn_version__: "8.9"
4-
__tensorrt_version__: "10.0.0.6"
4+
__tensorrt_version__: "10.0.1"

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: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ torch>=2.4.0.dev,<2.5.0
66
torchvision>=0.19.0.dev,<0.20.0
77
--extra-index-url https://pypi.ngc.nvidia.com
88
pyyaml
9-
tensorrt
9+
tensorrt==10.0.1

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"

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ requires = [
88
"cffi>=1.15.1",
99
"typing-extensions>=4.7.0",
1010
"future>=0.18.3",
11-
"tensorrt==10.0.0b6",
11+
"tensorrt==10.0.1",
1212
"torch >=2.4.0.dev,<2.5.0",
1313
"pybind11==2.6.2",
1414
"numpy",
@@ -42,7 +42,7 @@ requires-python = ">=3.8"
4242
keywords = ["pytorch", "torch", "tensorrt", "trt", "ai", "artificial intelligence", "ml", "machine learning", "dl", "deep learning", "compiler", "dynamo", "torchscript", "inference"]
4343
dependencies = [
4444
"torch >=2.4.0.dev,<2.5.0",
45-
"tensorrt",
45+
"tensorrt==10.0.1",
4646
"packaging>=23",
4747
"numpy",
4848
"typing-extensions>=4.7.0",

tests/py/dynamo/models/test_dyn_models.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@
99
assertions = unittest.TestCase()
1010

1111

12+
@unittest.skip(
13+
"Skipping this test for now due to constraint violation error: https://github.com/pytorch/TensorRT/issues/2794"
14+
)
1215
@pytest.mark.unit
1316
def test_base_dynamic(ir):
1417
"""
@@ -66,6 +69,9 @@ def forward(self, x):
6669
torch.cuda.empty_cache()
6770

6871

72+
@unittest.skip(
73+
"Skipping this test for now due to constraint violation error: https://github.com/pytorch/TensorRT/issues/2794"
74+
)
6975
@pytest.mark.unit
7076
def test_base_dynamic_fallback(ir):
7177
"""

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,9 @@ http_archive(
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)