Skip to content

Commit 6018cb4

Browse files
committed
upgrade tensorrt dependency
1 parent 1f92a78 commit 6018cb4

File tree

11 files changed

+135
-198
lines changed

11 files changed

+135
-198
lines changed

.github/workflows/build-test-tensorrt-linux.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
name: Build and Test Torch-TensorRT on Linux with Future TensorRT Versions
22

33
on:
4+
pull_request:
45
workflow_dispatch:
56

67
permissions:

.github/workflows/release-linux.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
name: Release Linux wheels and tarball artifacts
22

33
on:
4+
pull_request:
45
push:
56
tags:
67
# NOTE: Binary build pipelines should only get triggered on release candidate builds

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: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,12 @@ choco install bazelisk -y
66

77
if [[ "${CU_VERSION::4}" < "cu12" ]]; then
88
# replace dependencies from tensorrt-cu12-bindings/libs to tensorrt-cu11-bindings/libs
9-
sed -i -e "s/tensorrt-cu12==/tensorrt-${CU_VERSION::4}==/g" \
10-
-e "s/tensorrt-cu12-bindings==/tensorrt-${CU_VERSION::4}-bindings==/g" \
11-
-e "s/tensorrt-cu12-libs==/tensorrt-${CU_VERSION::4}-libs==/g" \
9+
sed -i -e "s/tensorrt-cu12>=/tensorrt-${CU_VERSION::4}>=/g" \
10+
-e "s/tensorrt-cu12-bindings>=/tensorrt-${CU_VERSION::4}-bindings>=/g" \
11+
-e "s/tensorrt-cu12-libs>=/tensorrt-${CU_VERSION::4}-libs>=/g" \
1212
pyproject.toml
1313
fi
1414

15-
#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
16-
#unzip -o TensorRT.zip -d C:/
1715
TORCH_TORCHVISION=$(grep "^torch" py/requirements.txt)
1816
INDEX_URL=https://download.pytorch.org/whl/${CHANNEL}/${CU_VERSION}
1917

pyproject.toml

Lines changed: 4 additions & 4 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-cu12==10.3.0",
11+
"tensorrt-cu12>=10.3.0,<=10.6.0",
1212
"torch>=2.6.0.dev,<2.7.0",
1313
"pybind11==2.6.2",
1414
"numpy",
@@ -55,9 +55,9 @@ keywords = [
5555
]
5656
dependencies = [
5757
"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",
58+
"tensorrt-cu12>=10.3.0,<=10.6.0",
59+
"tensorrt-cu12-bindings>=10.3.0,<=10.6.0",
60+
"tensorrt-cu12-libs>=10.3.0,<=10.6.0",
6161
"packaging>=23",
6262
"numpy",
6363
"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)