Skip to content

Commit 04c4d94

Browse files
committed
fix TRT version mismatch issue
1 parent 644d253 commit 04c4d94

File tree

3 files changed

+11
-10
lines changed

3 files changed

+11
-10
lines changed

.github/workflows/linux-test.yml

-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,6 @@ jobs:
6868
SCRIPT: ${{ inputs.script }}
6969
RUNNER_TEST_RESULTS_DIR: /tmp/test_results
7070
ARCH: ${{ inputs.architecture }}
71-
TENSORRT_VERSION: ${{ matrix.tensorrt.version }}
7271
DOWNLOAD_ARTIFACT_NAME: pytorch_tensorrt_${{ matrix.tensorrt.version }}_${{ matrix.python_version }}_${{ matrix.desired_cuda }}_${{ inputs.architecture }}
7372
name: ${{ inputs.job-name }}-${{ matrix.tensorrt.version }}-${{ matrix.python_version }}-${{ matrix.desired_cuda }}
7473
runs-on: ${{ matrix.validation_runner }}

packaging/pre_build_script.sh

+3-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,9 @@ export TORCH_BUILD_NUMBER=$(python -c "import torch, urllib.parse as ul; print(u
2222
export TORCH_INSTALL_PATH=$(python -c "import torch, os; print(os.path.dirname(torch.__file__))")
2323

2424
if [[ ${TENSORRT_VERSION} != "" ]]; then
25-
# Replace both in dependencies and build-system.requires
25+
# Replace dependencies in the original pyproject.toml with the current TensorRT version. It is used for CI tests of different TensorRT versions.
26+
# For example, if the current testing TensorRT version is 10.7.0, but the pyproject.toml tensorrt>=10.8.0,<10.9.0, then the following sed command
27+
# will replace tensorrt>=10.8.0,<10.9.0 with tensorrt==10.7.0
2628
sed -i -e "s/tensorrt>=.*,<.*\"/tensorrt>=${TENSORRT_VERSION},<$(echo "${TENSORRT_VERSION}" | awk -F. '{print $1"."$2+1".0"}')\"/g" \
2729
-e "s/tensorrt-cu12>=.*,<.*\"/tensorrt-cu12>=${TENSORRT_VERSION},<$(echo "${TENSORRT_VERSION}" | awk -F. '{print $1"."$2+1".0"}')\"/g" \
2830
-e "s/tensorrt-cu12-bindings>=.*,<.*\"/tensorrt-cu12-bindings>=${TENSORRT_VERSION},<$(echo "${TENSORRT_VERSION}" | awk -F. '{print $1"."$2+1".0"}')\"/g" \

packaging/pre_build_script_windows.sh

+8-8
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,14 @@ choco install bazelisk -y
77
echo TENSORRT_VERSION=${TENSORRT_VERSION}
88

99
if [[ ${TENSORRT_VERSION} != "" ]]; then
10-
# 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.8.0
13-
current_version=$(cat dev_dep_versions.yml | grep __tensorrt_version__ | sed 's/__tensorrt_version__: //g' | sed 's/"//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" \
17-
pyproject.toml
10+
# Replace dependencies in the original pyproject.toml with the current TensorRT version. It is used for CI tests of different TensorRT versions.
11+
# For example, if the current testing TensorRT version is 10.7.0, but the pyproject.toml tensorrt>=10.8.0,<10.9.0, then the following sed command
12+
# will replace tensorrt>=10.8.0,<10.9.0 with tensorrt==10.7.0
13+
sed -i -e "s/tensorrt>=.*,<.*\"/tensorrt>=${TENSORRT_VERSION},<$(echo "${TENSORRT_VERSION}" | awk -F. '{print $1"."$2+1".0"}')\"/g" \
14+
-e "s/tensorrt-cu12>=.*,<.*\"/tensorrt-cu12>=${TENSORRT_VERSION},<$(echo "${TENSORRT_VERSION}" | awk -F. '{print $1"."$2+1".0"}')\"/g" \
15+
-e "s/tensorrt-cu12-bindings>=.*,<.*\"/tensorrt-cu12-bindings>=${TENSORRT_VERSION},<$(echo "${TENSORRT_VERSION}" | awk -F. '{print $1"."$2+1".0"}')\"/g" \
16+
-e "s/tensorrt-cu12-libs>=.*,<.*\"/tensorrt-cu12-libs>=${TENSORRT_VERSION},<$(echo "${TENSORRT_VERSION}" | awk -F. '{print $1"."$2+1".0"}')\"/g" \
17+
pyproject.toml
1818
fi
1919

2020
if [[ "${CU_VERSION::4}" < "cu12" ]]; then

0 commit comments

Comments
 (0)