From fab1635daaed9de8be58d66a1adbab0b3133a167 Mon Sep 17 00:00:00 2001 From: Evan Li Date: Tue, 11 Mar 2025 16:00:22 -0700 Subject: [PATCH 1/5] attempt 1 --- .github/workflows/linux-test.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/linux-test.yml b/.github/workflows/linux-test.yml index 5d47e51d04..90cccf97bc 100644 --- a/.github/workflows/linux-test.yml +++ b/.github/workflows/linux-test.yml @@ -68,6 +68,7 @@ jobs: SCRIPT: ${{ inputs.script }} RUNNER_TEST_RESULTS_DIR: /tmp/test_results ARCH: ${{ inputs.architecture }} + TENSORRT_VERSION: ${{ matrix.tensorrt.version }} DOWNLOAD_ARTIFACT_NAME: pytorch_tensorrt_${{ matrix.tensorrt.version }}_${{ matrix.python_version }}_${{ matrix.desired_cuda }}_${{ inputs.architecture }} name: ${{ inputs.job-name }}-${{ matrix.tensorrt.version }}-${{ matrix.python_version }}-${{ matrix.desired_cuda }} runs-on: ${{ matrix.validation_runner }} From 0e5936d0a904a4be978107633d5af11ff90f8004 Mon Sep 17 00:00:00 2001 From: Evan Li Date: Tue, 11 Mar 2025 22:46:59 -0700 Subject: [PATCH 2/5] attempt 4 --- packaging/pre_build_script.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packaging/pre_build_script.sh b/packaging/pre_build_script.sh index 84a8650d6d..6516df8f7a 100755 --- a/packaging/pre_build_script.sh +++ b/packaging/pre_build_script.sh @@ -26,9 +26,9 @@ if [[ ${TENSORRT_VERSION} != "" ]]; then # example: __tensorrt_version__: ">=10.3.0,<=10.6.0" # replace: tensorrt-cu12>=10.3.0,<=10.6.0 to tensorrt-cu12==10.8.0 current_version=$(cat dev_dep_versions.yml | grep __tensorrt_version__ | sed 's/__tensorrt_version__: //g' | sed 's/"//g') - sed -i -e "s/tensorrt-cu12${current_version}/tensorrt-cu12==${TENSORRT_VERSION}/g" \ - -e "s/tensorrt-cu12-bindings${current_version}/tensorrt-cu12-bindings==${TENSORRT_VERSION}/g" \ - -e "s/tensorrt-cu12-libs${current_version}/tensorrt-cu12-libs==${TENSORRT_VERSION}/g" \ + sed -i -e "s/tensorrt-cu12==${current_version}/tensorrt-cu12==${TENSORRT_VERSION}/g" \ + -e "s/tensorrt-cu12-bindings==${current_version}/tensorrt-cu12-bindings==${TENSORRT_VERSION}/g" \ + -e "s/tensorrt-cu12-libs==${current_version}/tensorrt-cu12-libs==${TENSORRT_VERSION}/g" \ pyproject.toml fi From 644d25396112c9ba85c09de4140d817cfe8af79b Mon Sep 17 00:00:00 2001 From: Evan Li Date: Wed, 12 Mar 2025 11:08:15 -0700 Subject: [PATCH 3/5] attempt 5 --- packaging/pre_build_script.sh | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/packaging/pre_build_script.sh b/packaging/pre_build_script.sh index 6516df8f7a..fa351573a6 100755 --- a/packaging/pre_build_script.sh +++ b/packaging/pre_build_script.sh @@ -22,14 +22,12 @@ export TORCH_BUILD_NUMBER=$(python -c "import torch, urllib.parse as ul; print(u export TORCH_INSTALL_PATH=$(python -c "import torch, os; print(os.path.dirname(torch.__file__))") if [[ ${TENSORRT_VERSION} != "" ]]; then - # this is the upgraded TensorRT version, replace current tensorrt version to the upgrade tensorRT version in the pyproject.toml - # example: __tensorrt_version__: ">=10.3.0,<=10.6.0" - # replace: tensorrt-cu12>=10.3.0,<=10.6.0 to tensorrt-cu12==10.8.0 - current_version=$(cat dev_dep_versions.yml | grep __tensorrt_version__ | sed 's/__tensorrt_version__: //g' | sed 's/"//g') - sed -i -e "s/tensorrt-cu12==${current_version}/tensorrt-cu12==${TENSORRT_VERSION}/g" \ - -e "s/tensorrt-cu12-bindings==${current_version}/tensorrt-cu12-bindings==${TENSORRT_VERSION}/g" \ - -e "s/tensorrt-cu12-libs==${current_version}/tensorrt-cu12-libs==${TENSORRT_VERSION}/g" \ - pyproject.toml + # Replace both in dependencies and build-system.requires + sed -i -e "s/tensorrt>=.*,<.*\"/tensorrt>=${TENSORRT_VERSION},<$(echo "${TENSORRT_VERSION}" | awk -F. '{print $1"."$2+1".0"}')\"/g" \ + -e "s/tensorrt-cu12>=.*,<.*\"/tensorrt-cu12>=${TENSORRT_VERSION},<$(echo "${TENSORRT_VERSION}" | awk -F. '{print $1"."$2+1".0"}')\"/g" \ + -e "s/tensorrt-cu12-bindings>=.*,<.*\"/tensorrt-cu12-bindings>=${TENSORRT_VERSION},<$(echo "${TENSORRT_VERSION}" | awk -F. '{print $1"."$2+1".0"}')\"/g" \ + -e "s/tensorrt-cu12-libs>=.*,<.*\"/tensorrt-cu12-libs>=${TENSORRT_VERSION},<$(echo "${TENSORRT_VERSION}" | awk -F. '{print $1"."$2+1".0"}')\"/g" \ + pyproject.toml fi if [[ "${CU_VERSION::4}" < "cu12" ]]; then From 04c4d947a05509d277b29e2250bdb3199d1cbb4e Mon Sep 17 00:00:00 2001 From: Evan Li Date: Wed, 12 Mar 2025 12:30:09 -0700 Subject: [PATCH 4/5] fix TRT version mismatch issue --- .github/workflows/linux-test.yml | 1 - packaging/pre_build_script.sh | 4 +++- packaging/pre_build_script_windows.sh | 16 ++++++++-------- 3 files changed, 11 insertions(+), 10 deletions(-) diff --git a/.github/workflows/linux-test.yml b/.github/workflows/linux-test.yml index 90cccf97bc..5d47e51d04 100644 --- a/.github/workflows/linux-test.yml +++ b/.github/workflows/linux-test.yml @@ -68,7 +68,6 @@ jobs: SCRIPT: ${{ inputs.script }} RUNNER_TEST_RESULTS_DIR: /tmp/test_results ARCH: ${{ inputs.architecture }} - TENSORRT_VERSION: ${{ matrix.tensorrt.version }} DOWNLOAD_ARTIFACT_NAME: pytorch_tensorrt_${{ matrix.tensorrt.version }}_${{ matrix.python_version }}_${{ matrix.desired_cuda }}_${{ inputs.architecture }} name: ${{ inputs.job-name }}-${{ matrix.tensorrt.version }}-${{ matrix.python_version }}-${{ matrix.desired_cuda }} runs-on: ${{ matrix.validation_runner }} diff --git a/packaging/pre_build_script.sh b/packaging/pre_build_script.sh index fa351573a6..173498201f 100755 --- a/packaging/pre_build_script.sh +++ b/packaging/pre_build_script.sh @@ -22,7 +22,9 @@ export TORCH_BUILD_NUMBER=$(python -c "import torch, urllib.parse as ul; print(u export TORCH_INSTALL_PATH=$(python -c "import torch, os; print(os.path.dirname(torch.__file__))") if [[ ${TENSORRT_VERSION} != "" ]]; then - # Replace both in dependencies and build-system.requires + # Replace dependencies in the original pyproject.toml with the current TensorRT version. It is used for CI tests of different TensorRT versions. + # 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 + # will replace tensorrt>=10.8.0,<10.9.0 with tensorrt==10.7.0 sed -i -e "s/tensorrt>=.*,<.*\"/tensorrt>=${TENSORRT_VERSION},<$(echo "${TENSORRT_VERSION}" | awk -F. '{print $1"."$2+1".0"}')\"/g" \ -e "s/tensorrt-cu12>=.*,<.*\"/tensorrt-cu12>=${TENSORRT_VERSION},<$(echo "${TENSORRT_VERSION}" | awk -F. '{print $1"."$2+1".0"}')\"/g" \ -e "s/tensorrt-cu12-bindings>=.*,<.*\"/tensorrt-cu12-bindings>=${TENSORRT_VERSION},<$(echo "${TENSORRT_VERSION}" | awk -F. '{print $1"."$2+1".0"}')\"/g" \ diff --git a/packaging/pre_build_script_windows.sh b/packaging/pre_build_script_windows.sh index 719e97d6c1..726d71970e 100644 --- a/packaging/pre_build_script_windows.sh +++ b/packaging/pre_build_script_windows.sh @@ -7,14 +7,14 @@ choco install bazelisk -y echo TENSORRT_VERSION=${TENSORRT_VERSION} if [[ ${TENSORRT_VERSION} != "" ]]; then - # this is the upgraded TensorRT version, replace current tensorrt version to the upgrade tensorRT version in the pyproject.toml - # example: __tensorrt_version__: ">=10.3.0,<=10.6.0" - # replace: tensorrt-cu12>=10.3.0,<=10.6.0 to tensorrt-cu12==10.8.0 - current_version=$(cat dev_dep_versions.yml | grep __tensorrt_version__ | sed 's/__tensorrt_version__: //g' | sed 's/"//g') - sed -i -e "s/tensorrt-cu12${current_version}/tensorrt-cu12==${TENSORRT_VERSION}/g" \ - -e "s/tensorrt-cu12-bindings${current_version}/tensorrt-cu12-bindings==${TENSORRT_VERSION}/g" \ - -e "s/tensorrt-cu12-libs${current_version}/tensorrt-cu12-libs==${TENSORRT_VERSION}/g" \ - pyproject.toml + # Replace dependencies in the original pyproject.toml with the current TensorRT version. It is used for CI tests of different TensorRT versions. + # 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 + # will replace tensorrt>=10.8.0,<10.9.0 with tensorrt==10.7.0 + sed -i -e "s/tensorrt>=.*,<.*\"/tensorrt>=${TENSORRT_VERSION},<$(echo "${TENSORRT_VERSION}" | awk -F. '{print $1"."$2+1".0"}')\"/g" \ + -e "s/tensorrt-cu12>=.*,<.*\"/tensorrt-cu12>=${TENSORRT_VERSION},<$(echo "${TENSORRT_VERSION}" | awk -F. '{print $1"."$2+1".0"}')\"/g" \ + -e "s/tensorrt-cu12-bindings>=.*,<.*\"/tensorrt-cu12-bindings>=${TENSORRT_VERSION},<$(echo "${TENSORRT_VERSION}" | awk -F. '{print $1"."$2+1".0"}')\"/g" \ + -e "s/tensorrt-cu12-libs>=.*,<.*\"/tensorrt-cu12-libs>=${TENSORRT_VERSION},<$(echo "${TENSORRT_VERSION}" | awk -F. '{print $1"."$2+1".0"}')\"/g" \ + pyproject.toml fi if [[ "${CU_VERSION::4}" < "cu12" ]]; then From a6bcbd2bbe72137dd59458d2c840b95b238bc26a Mon Sep 17 00:00:00 2001 From: Evan Li Date: Wed, 12 Mar 2025 12:37:31 -0700 Subject: [PATCH 5/5] drop TRT 10.6 due to lack of support of Unsqueeze Layer --- .github/scripts/generate-tensorrt-test-matrix.py | 8 -------- 1 file changed, 8 deletions(-) diff --git a/.github/scripts/generate-tensorrt-test-matrix.py b/.github/scripts/generate-tensorrt-test-matrix.py index c6b83684c3..546116d7c2 100644 --- a/.github/scripts/generate-tensorrt-test-matrix.py +++ b/.github/scripts/generate-tensorrt-test-matrix.py @@ -28,10 +28,6 @@ # please update the future tensorRT version you want to test here TENSORRT_VERSIONS_DICT = { "windows": { - "10.6.0": { - "urls": "https://developer.nvidia.com/downloads/compute/machine-learning/tensorrt/10.6.0/zip/TensorRT-10.6.0.26.Windows.win10.cuda-12.6.zip", - "strip_prefix": "TensorRT-10.6.0.26", - }, "10.7.0": { "urls": "https://developer.nvidia.com/downloads/compute/machine-learning/tensorrt/10.7.0/zip/TensorRT-10.7.0.23.Windows.win10.cuda-12.6.zip", "strip_prefix": "TensorRT-10.7.0.23", @@ -46,10 +42,6 @@ }, }, "linux": { - "10.6.0": { - "urls": "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", - "strip_prefix": "TensorRT-10.6.0.26", - }, "10.7.0": { "urls": "https://developer.nvidia.com/downloads/compute/machine-learning/tensorrt/10.7.0/tars/TensorRT-10.7.0.23.Linux.x86_64-gnu.cuda-12.6.tar.gz", "strip_prefix": "TensorRT-10.7.0.23",