Skip to content

Commit 7ff3ad6

Browse files
upgrade tensorrt dependency to >=10.3.0,<=10.6.0 (#3286)
1 parent 184f601 commit 7ff3ad6

File tree

10 files changed

+141
-201
lines changed

10 files changed

+141
-201
lines changed

.github/workflows/docker_builder.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ on:
77
- main
88
- nightly
99
- release/*
10+
workflow_dispatch:
1011

1112
# If pushes to main are made in rapid succession,
1213
# cancel existing docker builds and use newer commits

MODULE.bazel

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -79,20 +79,20 @@ http_archive(
7979
http_archive(
8080
name = "tensorrt",
8181
build_file = "@//third_party/tensorrt/archive:BUILD",
82-
sha256 = "adff1cd5abe5d87013806172351e58fd024e5bf0fc61d49ef4b84cd38ed99081",
83-
strip_prefix = "TensorRT-10.3.0.26",
82+
sha256 = "33d3c2f3f4c84dc7991a4337a6fde9ed33f5c8e5c4f03ac2eb6b994a382b03a0",
83+
strip_prefix = "TensorRT-10.6.0.26",
8484
urls = [
85-
"https://developer.nvidia.com/downloads/compute/machine-learning/tensorrt/10.3.0/tars/TensorRT-10.3.0.26.Linux.x86_64-gnu.cuda-12.5.tar.gz",
85+
"https://developer.nvidia.com/downloads/compute/machine-learning/tensorrt/10.6.0/tars/TensorRT-10.6.0.26.Linux.x86_64-gnu.cuda-12.6.tar.gz",
8686
],
8787
)
8888

8989
http_archive(
9090
name = "tensorrt_win",
9191
build_file = "@//third_party/tensorrt/archive:BUILD",
92-
sha256 = "2bb4bcb79e8c33575816d874b0512ea28c302af1c06ee6d224da71aa182f75e0",
93-
strip_prefix = "TensorRT-10.3.0.26",
92+
sha256 = "6c6d92c108a1b3368423e8f69f08d31269830f1e4c9da43b37ba34a176797254",
93+
strip_prefix = "TensorRT-10.6.0.26",
9494
urls = [
95-
"https://developer.nvidia.com/downloads/compute/machine-learning/tensorrt/10.3.0/zip/TensorRT-10.3.0.26.Windows.win10.cuda-12.5.zip",
95+
"https://developer.nvidia.com/downloads/compute/machine-learning/tensorrt/10.6.0/zip/TensorRT-10.6.0.26.Windows.win10.cuda-12.6.zip",
9696
],
9797
)
9898

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
- Bazel 6.3.2
120120
- Libtorch 2.5.0.dev (latest nightly) (built with CUDA 12.4)
121121
- CUDA 12.4
122-
- TensorRT 10.3.0.26
122+
- TensorRT 10.6.0.26
123123
124124
## Deprecation Policy
125125

dev_dep_versions.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
__cuda_version__: "12.4"
2-
__tensorrt_version__: "10.3.0"
2+
__tensorrt_version__: ">=10.3.0,<=10.6.0"

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 TensorRT 10.3.0.26
20+
- The example below uses TensorRT 10.6.0.26
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=10.3.0 -f docker/Dockerfile -t torch_tensorrt:latest .
27+
DOCKER_BUILDKIT=1 docker build --build-arg TENSORRT_VERSION=10.6.0 -f docker/Dockerfile -t torch_tensorrt:latest .
2828
```
2929

3030
Run:

packaging/pre_build_script.sh

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,18 +23,20 @@ export TORCH_INSTALL_PATH=$(python -c "import torch, os; print(os.path.dirname(t
2323

2424
if [[ ${TENSORRT_VERSION} != "" ]]; then
2525
# this is the upgraded TensorRT version, replace current tensorrt version to the upgrade tensorRT version in the pyproject.toml
26+
# example: __tensorrt_version__: ">=10.3.0,<=10.6.0"
27+
# replace: tensorrt-cu12>=10.3.0,<=10.6.0 to tensorrt-cu12==10.7.0
2628
current_version=$(cat dev_dep_versions.yml | grep __tensorrt_version__ | sed 's/__tensorrt_version__: //g' | sed 's/"//g')
27-
sed -i -e "s/tensorrt-cu12==${current_version}/tensorrt-cu12==${TENSORRT_VERSION}/g" \
28-
-e "s/tensorrt-cu12-bindings==${current_version}/tensorrt-cu12-bindings==${TENSORRT_VERSION}/g" \
29-
-e "s/tensorrt-cu12-libs==${current_version}/tensorrt-cu12-libs==${TENSORRT_VERSION}/g" \
29+
sed -i -e "s/tensorrt-cu12${current_version}/tensorrt-cu12==${TENSORRT_VERSION}/g" \
30+
-e "s/tensorrt-cu12-bindings${current_version}/tensorrt-cu12-bindings==${TENSORRT_VERSION}/g" \
31+
-e "s/tensorrt-cu12-libs${current_version}/tensorrt-cu12-libs==${TENSORRT_VERSION}/g" \
3032
pyproject.toml
3133
fi
3234

3335
if [[ "${CU_VERSION::4}" < "cu12" ]]; then
3436
# replace dependencies from tensorrt-cu12-bindings/libs to tensorrt-cu11-bindings/libs
35-
sed -i -e "s/tensorrt-cu12==/tensorrt-${CU_VERSION::4}==/g" \
36-
-e "s/tensorrt-cu12-bindings==/tensorrt-${CU_VERSION::4}-bindings==/g" \
37-
-e "s/tensorrt-cu12-libs==/tensorrt-${CU_VERSION::4}-libs==/g" \
37+
sed -i -e "s/tensorrt-cu12/tensorrt-${CU_VERSION::4}/g" \
38+
-e "s/tensorrt-cu12-bindings/tensorrt-${CU_VERSION::4}-bindings/g" \
39+
-e "s/tensorrt-cu12-libs/tensorrt-${CU_VERSION::4}-libs/g" \
3840
pyproject.toml
3941
fi
4042

packaging/pre_build_script_windows.sh

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,23 +8,23 @@ echo TENSORRT_VERSION=${TENSORRT_VERSION}
88

99
if [[ ${TENSORRT_VERSION} != "" ]]; then
1010
# this is the upgraded TensorRT version, replace current tensorrt version to the upgrade tensorRT version in the pyproject.toml
11+
# example: __tensorrt_version__: ">=10.3.0,<=10.6.0"
12+
# replace: tensorrt-cu12>=10.3.0,<=10.6.0 to tensorrt-cu12==10.7.0
1113
current_version=$(cat dev_dep_versions.yml | grep __tensorrt_version__ | sed 's/__tensorrt_version__: //g' | sed 's/"//g')
12-
sed -i -e "s/tensorrt-cu12==${current_version}/tensorrt-cu12==${TENSORRT_VERSION}/g" \
13-
-e "s/tensorrt-cu12-bindings==${current_version}/tensorrt-cu12-bindings==${TENSORRT_VERSION}/g" \
14-
-e "s/tensorrt-cu12-libs==${current_version}/tensorrt-cu12-libs==${TENSORRT_VERSION}/g" \
14+
sed -i -e "s/tensorrt-cu12${current_version}/tensorrt-cu12==${TENSORRT_VERSION}/g" \
15+
-e "s/tensorrt-cu12-bindings${current_version}/tensorrt-cu12-bindings==${TENSORRT_VERSION}/g" \
16+
-e "s/tensorrt-cu12-libs${current_version}/tensorrt-cu12-libs==${TENSORRT_VERSION}/g" \
1517
pyproject.toml
1618
fi
1719

1820
if [[ "${CU_VERSION::4}" < "cu12" ]]; then
1921
# replace dependencies from tensorrt-cu12-bindings/libs to tensorrt-cu11-bindings/libs
20-
sed -i -e "s/tensorrt-cu12==/tensorrt-${CU_VERSION::4}==/g" \
21-
-e "s/tensorrt-cu12-bindings==/tensorrt-${CU_VERSION::4}-bindings==/g" \
22-
-e "s/tensorrt-cu12-libs==/tensorrt-${CU_VERSION::4}-libs==/g" \
22+
sed -i -e "s/tensorrt-cu12/tensorrt-${CU_VERSION::4}/g" \
23+
-e "s/tensorrt-cu12-bindings/tensorrt-${CU_VERSION::4}-bindings/g" \
24+
-e "s/tensorrt-cu12-libs/tensorrt-${CU_VERSION::4}-libs/g" \
2325
pyproject.toml
2426
fi
2527

26-
#curl -Lo TensorRT.zip https://developer.nvidia.com/downloads/compute/machine-learning/tensorrt/10.3.0/zip/TensorRT-10.3.0.26.Windows.win10.cuda-12.5.zip
27-
#unzip -o TensorRT.zip -d C:/
2828
TORCH_TORCHVISION=$(grep "^torch" py/requirements.txt)
2929
INDEX_URL=https://download.pytorch.org/whl/${CHANNEL}/${CU_VERSION}
3030

pyproject.toml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@ requires = [
88
"cffi>=1.15.1",
99
"typing-extensions>=4.7.0",
1010
"future>=0.18.3",
11-
"tensorrt-cu12==10.3.0",
11+
"tensorrt-cu12>=10.3.0,<=10.6.0",
12+
"tensorrt-cu12-bindings>=10.3.0,<=10.6.0",
13+
"tensorrt-cu12-libs>=10.3.0,<=10.6.0",
1214
"torch>=2.6.0.dev,<2.7.0",
1315
"pybind11==2.6.2",
1416
"numpy",
@@ -55,9 +57,9 @@ keywords = [
5557
]
5658
dependencies = [
5759
"torch>=2.6.0.dev,<2.7.0",
58-
"tensorrt-cu12==10.3.0",
59-
"tensorrt-cu12-bindings==10.3.0",
60-
"tensorrt-cu12-libs==10.3.0",
60+
"tensorrt-cu12>=10.3.0,<=10.6.0",
61+
"tensorrt-cu12-bindings>=10.3.0,<=10.6.0",
62+
"tensorrt-cu12-libs>=10.3.0,<=10.6.0",
6163
"packaging>=23",
6264
"numpy",
6365
"typing-extensions>=4.7.0",

toolchains/ci_workspaces/MODULE.bazel.tmpl

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -67,20 +67,20 @@ http_archive(
6767
http_archive(
6868
name = "tensorrt",
6969
build_file = "@//third_party/tensorrt/archive:BUILD",
70-
sha256 = "adff1cd5abe5d87013806172351e58fd024e5bf0fc61d49ef4b84cd38ed99081",
71-
strip_prefix = "TensorRT-10.3.0.26",
70+
sha256 = "33d3c2f3f4c84dc7991a4337a6fde9ed33f5c8e5c4f03ac2eb6b994a382b03a0",
71+
strip_prefix = "TensorRT-10.6.0.26",
7272
urls = [
73-
"https://developer.nvidia.com/downloads/compute/machine-learning/tensorrt/10.3.0/tars/TensorRT-10.3.0.26.Linux.x86_64-gnu.cuda-12.5.tar.gz",
73+
"https://developer.nvidia.com/downloads/compute/machine-learning/tensorrt/10.6.0/tars/TensorRT-10.6.0.26.Linux.x86_64-gnu.cuda-12.6.tar.gz",
7474
],
7575
)
7676

7777
http_archive(
7878
name = "tensorrt_win",
7979
build_file = "@//third_party/tensorrt/archive:BUILD",
80-
sha256 = "2bb4bcb79e8c33575816d874b0512ea28c302af1c06ee6d224da71aa182f75e0",
81-
strip_prefix = "TensorRT-10.3.0.26",
80+
sha256 = "6c6d92c108a1b3368423e8f69f08d31269830f1e4c9da43b37ba34a176797254",
81+
strip_prefix = "TensorRT-10.6.0.26",
8282
urls = [
83-
"https://developer.nvidia.com/downloads/compute/machine-learning/tensorrt/10.3.0/zip/TensorRT-10.3.0.26.Windows.win10.cuda-12.5.zip",
83+
"https://developer.nvidia.com/downloads/compute/machine-learning/tensorrt/10.6.0/zip/TensorRT-10.6.0.26.Windows.win10.cuda-12.6.zip",
8484
],
8585
)
8686

0 commit comments

Comments
 (0)