Skip to content

Commit 45fcde7

Browse files
authored
version: TRT upgrade to 9.2 on Linux Testing (#2538)
1 parent 5f66ade commit 45fcde7

File tree

13 files changed

+43
-23
lines changed

13 files changed

+43
-23
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@ set -eou pipefail
44
source ${BUILD_ENV_FILE}
55
${CONDA_RUN} ${PIP_INSTALL_TORCH} torchvision pyyaml
66
export TRT_VERSION=$(${CONDA_RUN} python -c "import versions; versions.tensorrt_version()")
7-
${CONDA_RUN} python -m pip install /opt/torch-tensorrt-builds/torch_tensorrt*+${CU_VERSION}*.whl tensorrt~=${TRT_VERSION} tensorrt-bindings~=${TRT_VERSION} --extra-index-url=https://pypi.ngc.nvidia.com
7+
${CONDA_RUN} python -m pip install /opt/torch-tensorrt-builds/torch_tensorrt*+${CU_VERSION}*.whl tensorrt~=${TRT_VERSION} tensorrt-bindings~=${TRT_VERSION} --extra-index-url=https://pypi.nvidia.com
88

9-
echo -e "Running test script";
9+
echo -e "Running test script";

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ These are the following dependencies used to verify the testcases. Torch-TensorR
119119
- Libtorch 2.3.0.dev (latest nightly) (built with CUDA 12.1)
120120
- CUDA 12.1
121121
- cuDNN 8.9.5
122-
- TensorRT 8.6.1
122+
- TensorRT 9.2.0
123123

124124
## Prebuilt Binaries and Wheel files
125125

WORKSPACE

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,10 +81,10 @@ http_archive(
8181
http_archive(
8282
name = "tensorrt",
8383
build_file = "@//third_party/tensorrt/archive:BUILD",
84-
sha256 = "0f8157a5fc5329943b338b893591373350afa90ca81239cdadd7580cd1eba254",
85-
strip_prefix = "TensorRT-8.6.1.6",
84+
sha256 = "3dd505a9e0d0adf9257080b543f51d91df736dbd1f75417b9dde1a7b7a5d87f2",
85+
strip_prefix = "tensorrt-9.2.0.5",
8686
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",
87+
"https://developer.nvidia.com/downloads/compute/machine-learning/tensorrt/9.2.0/tensorrt-9.2.0.5.linux.x86_64-gnu.cuda-12.2.tar.gz",
8888
],
8989
)
9090

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.dev0"
22
__cuda_version__: "12.1"
33
__cudnn_version__: "8.9"
4-
__tensorrt_version__: "8.6"
4+
__tensorrt_version__: "9.2.0.post12.dev5"

docker/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -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.9 and TensorRT 8.6
20+
- The example below uses CUDNN 8.9 and TensorRT 9.2
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.6 --build-arg CUDNN_VERSION=8.9 -f docker/Dockerfile -t torch_tensorrt:latest .
27+
DOCKER_BUILDKIT=1 docker build --build-arg TENSORRT_VERSION=9.2 --build-arg CUDNN_VERSION=8.9 -f docker/Dockerfile -t torch_tensorrt:latest .
2828
```
2929

3030
Run:

packaging/pre_build_script.sh

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,35 @@
22

33
# Install dependencies
44
python3 -m pip install pyyaml
5-
TRT_VERSION=$(python3 -c "import versions; versions.tensorrt_version()")
5+
CUDNN_VERSION=$(python3 -c "import versions; print(versions.__cudnn_version__.split('.')[0])")
66
yum-config-manager --add-repo https://developer.download.nvidia.com/compute/cuda/repos/rhel7/x86_64/cuda-rhel7.repo
77
yum check-update
8-
yum install -y ninja-build gettext tensorrt-${TRT_VERSION}.*
8+
yum install -y ninja-build gettext libcudnn${CUDNN_VERSION} libcudnn${CUDNN_VERSION}-devel
99
wget https://github.com/bazelbuild/bazelisk/releases/download/v1.17.0/bazelisk-linux-amd64 \
1010
&& mv bazelisk-linux-amd64 /usr/bin/bazel \
1111
&& chmod +x /usr/bin/bazel
1212

13+
wget https://developer.nvidia.com/downloads/compute/machine-learning/tensorrt/9.2.0/tensorrt-9.2.0.5.linux.x86_64-gnu.cuda-12.2.tar.gz
14+
mkdir -p /usr/tensorrt
15+
tar -xzvf tensorrt-9.2.0.5.linux.x86_64-gnu.cuda-12.2.tar.gz -C /usr/tensorrt --strip-components=1
16+
mkdir -p /usr/lib
17+
cp /usr/tensorrt/lib/* /usr/lib/ || :
18+
mkdir -p /usr/lib64
19+
cp /usr/tensorrt/lib/* /usr/lib64/ || :
20+
mkdir -p /usr/include
21+
cp /usr/tensorrt/include/* /usr/include/ || :
22+
23+
mkdir -p /usr/lib/x86_64-linux-gnu
24+
cp /usr/tensorrt/targets/x86_64-linux-gnu/lib/* /usr/lib/x86_64-linux-gnu/ || :
25+
mkdir -p /usr/include/x86_64-linux-gnu
26+
cp /usr/tensorrt/targets/x86_64-linux-gnu/include/* /usr/include/x86_64-linux-gnu/ || :
27+
28+
rm tensorrt-9.2.0.5.linux.x86_64-gnu.cuda-12.2.tar.gz
29+
rm -rf /usr/tensorrt
30+
1331
export TORCH_BUILD_NUMBER=$(python -c "import torch, urllib.parse as ul; print(ul.quote_plus(torch.__version__))")
1432

1533
cat toolchains/ci_workspaces/WORKSPACE.x86_64.release.rhel.tmpl | envsubst > WORKSPACE
1634
export CI_BUILD=1
35+
36+
python -m pip config set global.extra-index-url "https://pypi.nvidia.com"

py/ci/soname_excludes.params

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,16 +24,18 @@
2424
--exclude libcudart.so.11
2525
--exclude libcudart.so.11.7.60
2626
--exclude libnvrtc.so.11.2
27+
--exclude libnvinfer_plugin.so.9
2728
--exclude libnvinfer_plugin.so.8
2829
--exclude libcublas.so.11
2930
--exclude libcuda.so.1
3031
--exclude libcuda.so.515
3132
--exclude libcublasLt.so.11
33+
--exclude libnvinfer.so.9
3234
--exclude libnvinfer.so.8
3335
--exclude libcudnn.so.8
3436
--exclude libcublas.so.12
3537
--exclude libcublasLt.so.12
3638
--exclude libcublas.so.12.1.3.1
3739
--exclude libcublasLt.so.12.1.3.1
3840
--exclude libcudart.so.11.8.89
39-
--exclude libcudart.so.11
41+
--exclude libcudart.so.11

py/requirements.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@ pybind11==2.6.2
44
--extra-index-url https://download.pytorch.org/whl/nightly/cu121
55
torch>=2.3.0.dev,<2.4.0
66
torchvision>=0.18.0.dev,<0.19.0
7-
--extra-index-url https://pypi.ngc.nvidia.com
8-
tensorrt==8.6.1
7+
--extra-index-url https://pypi.nvidia.com
8+
tensorrt==9.2.0.post12.dev5
99
pyyaml

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ requires = [
88
"cffi>=1.15.1",
99
"typing-extensions>=4.7.0",
1010
"future>=0.18.3",
11-
"tensorrt>=8.6,<8.7",
1211
"torch >=2.3.0.dev,<2.4.0",
12+
"tensorrt==9.2.0.post12.dev5",
1313
"pybind11==2.6.2",
1414
"numpy",
1515
]
@@ -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.3.0.dev,<2.4.0",
45-
"tensorrt>=8.6,<8.7",
45+
"tensorrt==9.2.0.post12.dev5",
4646
"packaging>=23",
4747
"numpy",
4848
"typing-extensions>=4.7.0",

tests/py/ts/models/hw_compat.ts

30.2 KB
Binary file not shown.

third_party/cudnn/local/BUILD

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ config_setting(
2828

2929
cc_library(
3030
name = "cudnn_headers",
31-
hdrs = ["include/cudnn.h"] + glob([
32-
"include/cudnn_*.h",
31+
hdrs = glob([
32+
"include/cudnn*.h",
3333
]),
3434
includes = ["include/"],
3535
visibility = ["//visibility:private"],

third_party/tensorrt/local/BUILD

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,7 @@ cc_library(
4040
"include/aarch64-linux-gnu/NvInferPluginUtils.h",
4141
],
4242
),
43-
":ci_rhel_x86_64_linux": [
44-
"include/NvUtils.h",
45-
] + glob(
43+
":ci_rhel_x86_64_linux": glob(
4644
[
4745
"include/NvInfer*.h",
4846
],

toolchains/legacy/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>=8.6,<8.7",
11+
"tensorrt==9.2.0.post12.dev5",
1212
"torch>=1.13.0,<2.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>=1.13.0,<2.0",
45-
"tensorrt>=8.6,<8.7",
45+
"tensorrt==9.2.0.post12.dev5",
4646
"packaging>=23",
4747
"numpy",
4848
"typing-extensions>=4.7.0",

0 commit comments

Comments
 (0)