From 6eebf8e853569669c09b4b4fb89cefadbe18b0fd Mon Sep 17 00:00:00 2001 From: lanluo-nvidia Date: Thu, 28 Aug 2025 11:35:54 -0700 Subject: [PATCH 01/15] simplify the release linux workflow --- .github/scripts/generate-release-matrix.py | 8 +-- .github/workflows/build_wheels_linux.yml | 55 ++++++++++++++++--- ...ase-linux.yml => release-linux-x86_64.yml} | 15 ++--- 3 files changed, 59 insertions(+), 19 deletions(-) rename .github/workflows/{release-linux.yml => release-linux-x86_64.yml} (93%) diff --git a/.github/scripts/generate-release-matrix.py b/.github/scripts/generate-release-matrix.py index 4b232026de..7b9e0263dd 100644 --- a/.github/scripts/generate-release-matrix.py +++ b/.github/scripts/generate-release-matrix.py @@ -5,16 +5,16 @@ import sys RELEASE_CUDA_VERSION = { - "wheel": ["cu128"], - "tarball": ["cu128"], + "wheel": ["cu129"], + "tarball": ["cu129"], } RELEASE_PYTHON_VERSION = { - "wheel": ["3.9", "3.10", "3.11", "3.12", "3.13"], + "wheel": ["3.10", "3.11", "3.12", "3.13"], "tarball": ["3.11"], } CXX11_TARBALL_CONTAINER_IMAGE = { - "cu128": "pytorch/libtorch-cxx11-builder:cuda12.8-main", + "cu129": "pytorch/libtorch-cxx11-builder:cuda12.9-main", } diff --git a/.github/workflows/build_wheels_linux.yml b/.github/workflows/build_wheels_linux.yml index 4b95a90e86..0e63881512 100644 --- a/.github/workflows/build_wheels_linux.yml +++ b/.github/workflows/build_wheels_linux.yml @@ -117,6 +117,16 @@ on: required: false default: false type: boolean + is-release-wheel: + description: Set to true if the build is for release wheel + required: false + default: false + type: boolean + is-release-tarball: + description: Set to true if the build is for release tarball + required: false + default: false + type: boolean secrets: PYPI_API_TOKEN: description: An optional token to upload to pypi @@ -265,22 +275,41 @@ jobs: export PYTORCH_VERSION="$(${CONDA_RUN} pip show torch | grep ^Version: | sed 's/Version: *//' | sed 's/+.\+//')" ${CONDA_RUN} python setup.py clean echo "Successfully ran `python setup.py clean`" - if [[ "$BUILD_VERSION" != *"+"${CU_VERSION} ]]; then - BUILD_VERSION="${BUILD_VERSION}+${CU_VERSION}" + if [[ ${{ inputs.is-release-wheel }} == true || ${{ inputs.is-release-tarball }} == true ]]; then + # release version for upload to pypi + # BUILD_VERSION example: 2.4.0+cu121, we don't want the +cu121 part, so remove +cu121 + BUILD_VERSION=${BUILD_VERSION%+*} + if [[ ${{ inputs.is-release-tarball }} == true ]]; then + mkdir -p release/tarball + TRT_VERSION=$(cat dev_dep_versions.yml | grep __tensorrt_version__ | sed 's/__tensorrt_version__: //g' | sed 's/"//g') + bazel build //:libtorchtrt --compilation_mode opt --config=linux + cp bazel-bin/libtorchtrt.tar.gz \ + release/tarball/libtorchtrt-${BUILD_VERSION}-tensorrt${TRT_VERSION}-cuda${CU_VERSION:2}-libtorch${PYTORCH_VERSION}-x86_64-linux.tar.gz + else + if [[ ${{ inputs.is-release-wheel }} == true ]]; then + param="--release" + fi + fi + else + # release version for upload to pytorch index + if [[ "$BUILD_VERSION" != *"+"${CU_VERSION} ]]; then + BUILD_VERSION="${BUILD_VERSION}+${CU_VERSION}" + fi fi + echo "BUILD_VERSION=$BUILD_VERSION" echo "USE_TRT_RTX=$USE_TRT_RTX" echo "LD_LIBRARY_PATH=$LD_LIBRARY_PATH" if [[ ${{ inputs.use-rtx }} == true ]]; then echo "Building tensorrt-rtx wheel" - ${CONDA_RUN} python setup.py bdist_wheel --use-rtx + ${CONDA_RUN} python setup.py bdist_wheel ${param} --use-rtx else if [[ ${{ inputs.is-jetpack }} == true ]]; then echo "Building tensorrt wheel for jetpack" - ${CONDA_RUN} python setup.py bdist_wheel --jetpack + ${CONDA_RUN} python setup.py bdist_wheel ${param} --jetpack else echo "Building standard tensorrt wheel" - ${CONDA_RUN} python setup.py bdist_wheel + ${CONDA_RUN} python setup.py bdist_wheel ${param} fi fi - name: Repair Manylinux_2_28 Wheel @@ -289,7 +318,7 @@ jobs: PACKAGE_NAME: ${{ inputs.package-name }} SMOKE_TEST_SCRIPT: ${{ inputs.smoke-test-script }} # TODO: lan to verify whether manylinux repair is needed for jetpack - #if: ${{ inputs.is-jetpack == true }} + if: ${{ inputs.is-release-tarball == false }} run: | set -euxo pipefail source "${BUILD_ENV_FILE}" @@ -312,6 +341,7 @@ jobs: env: PACKAGE_NAME: ${{ inputs.package-name }} SMOKE_TEST_SCRIPT: ${{ inputs.smoke-test-script }} + if: ${{ inputs.is-release-tarball == false }} run: | set -euxo pipefail source "${BUILD_ENV_FILE}" @@ -348,18 +378,27 @@ jobs: # NB: Only upload to GitHub after passing smoke tests - name: Upload wheel to GitHub + if: ${{ inputs.is-release-wheel == false }} continue-on-error: true uses: actions/upload-artifact@v4 with: name: ${{ env.ARTIFACT_NAME }} path: ${{ inputs.repository }}/dist/ + - name: Upload tarball to GitHub + if: ${{ inputs.is-release-tarball == true }} + continue-on-error: true + uses: actions/upload-artifact@v4 + with: + name: ${{ env.ARTIFACT_NAME }} + path: ${{ inputs.repository }}/release/tarball/ upload: needs: build name: upload-wheel-${{ matrix.python_version }}-${{ matrix.desired_cuda }}-${{ matrix.gpu_arch_type }}-${{ inputs.is-jetpack }} uses: pytorch/test-infra/.github/workflows/_binary_upload.yml@main # if it is not jetpack nor rtx, then upload to pytorch index - if: ${{ inputs.is-jetpack == false && inputs.use-rtx == false }} + # if it is the release wheel or tarball, then skip upload to pytorch index + if: ${{ inputs.is-jetpack == false && inputs.use-rtx == false && inputs.is-release-wheel == false && inputs.is-release-tarball == false }} with: repository: ${{ inputs.repository }} ref: ${{ inputs.ref }} @@ -373,5 +412,5 @@ jobs: PYPI_API_TOKEN: ${{ secrets.PYPI_API_TOKEN }} concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}-${{inputs.use-rtx}}-${{inputs.architecture}}-${{inputs.is-jetpack}}-${{ inputs.repository }}-${{ github.event_name == 'workflow_dispatch' }} + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}-${{inputs.is-release-wheel}}-${{inputs.is-release-tarball}}-${{inputs.use-rtx}}-${{inputs.architecture}}-${{inputs.is-jetpack}}-${{ inputs.repository }}-${{ github.event_name == 'workflow_dispatch' }} cancel-in-progress: true diff --git a/.github/workflows/release-linux.yml b/.github/workflows/release-linux-x86_64.yml similarity index 93% rename from .github/workflows/release-linux.yml rename to .github/workflows/release-linux-x86_64.yml index 2c4be0ec1d..da5e1bd06a 100644 --- a/.github/workflows/release-linux.yml +++ b/.github/workflows/release-linux-x86_64.yml @@ -1,6 +1,7 @@ -name: Release Linux wheels and tarball artifacts +name: Release x86_64 Linux wheels and tarball artifacts on: + pull_request: push: tags: # NOTE: Binary build pipelines should only get triggered on release candidate builds @@ -59,8 +60,8 @@ jobs: env-var-script: packaging/env_vars.txt post-script: packaging/post_build_script.sh smoke-test-script: packaging/smoke_test_script.sh - cxx11-tarball-release: "true" - uses: ./.github/workflows/release-wheel-linux.yml + is-release-tarball: "true" + uses: ./.github/workflows/build_wheels_linux.yml with: repository: ${{ matrix.repository }} ref: "" @@ -73,7 +74,7 @@ jobs: package-name: ${{ matrix.package-name }} smoke-test-script: ${{ matrix.smoke-test-script }} trigger-event: ${{ github.event_name }} - cxx11-tarball-release: "true" + is-release-tarball: "true" generate-release-wheel-matrix: needs: [generate-matrix] @@ -109,8 +110,8 @@ jobs: env-var-script: packaging/env_vars.txt post-script: packaging/post_build_script.sh smoke-test-script: packaging/smoke_test_script.sh - cxx11-tarball-release: "true" - uses: ./.github/workflows/release-wheel-linux.yml + is-release-wheel: "true" + uses: ./.github/workflows/build_wheels_linux.yml with: repository: ${{ matrix.repository }} ref: "" @@ -123,7 +124,7 @@ jobs: package-name: ${{ matrix.package-name }} smoke-test-script: ${{ matrix.smoke-test-script }} trigger-event: ${{ github.event_name }} - cxx11-tarball-release: "false" + is-release-wheel: "true" concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref_name }}-${{ inputs.repository }}-${{ github.event_name == 'workflow_dispatch' }}-${{ inputs.job-name }} From 2fb253a69867b39613804335e47403a7e6d30df8 Mon Sep 17 00:00:00 2001 From: lanluo-nvidia Date: Thu, 28 Aug 2025 13:00:09 -0700 Subject: [PATCH 02/15] test --- .github/workflows/build_wheels_linux.yml | 3 +- .github/workflows/build_wheels_windows.yml | 34 ++- .github/workflows/release-linux-aarch64.yml | 131 ++++++++++ .github/workflows/release-linux-x86_64.yml | 6 +- .github/workflows/release-wheel-linux.yml | 249 -------------------- .github/workflows/release-wheel-windows.yml | 213 ----------------- .github/workflows/release-windows.yml | 81 ++++++- 7 files changed, 237 insertions(+), 480 deletions(-) create mode 100644 .github/workflows/release-linux-aarch64.yml delete mode 100644 .github/workflows/release-wheel-linux.yml delete mode 100644 .github/workflows/release-wheel-windows.yml diff --git a/.github/workflows/build_wheels_linux.yml b/.github/workflows/build_wheels_linux.yml index 0e63881512..bdcff46256 100644 --- a/.github/workflows/build_wheels_linux.yml +++ b/.github/workflows/build_wheels_linux.yml @@ -285,6 +285,7 @@ jobs: bazel build //:libtorchtrt --compilation_mode opt --config=linux cp bazel-bin/libtorchtrt.tar.gz \ release/tarball/libtorchtrt-${BUILD_VERSION}-tensorrt${TRT_VERSION}-cuda${CU_VERSION:2}-libtorch${PYTORCH_VERSION}-x86_64-linux.tar.gz + return 0 else if [[ ${{ inputs.is-release-wheel }} == true ]]; then param="--release" @@ -378,7 +379,7 @@ jobs: # NB: Only upload to GitHub after passing smoke tests - name: Upload wheel to GitHub - if: ${{ inputs.is-release-wheel == false }} + if: ${{ inputs.is-release-tarball == false }} continue-on-error: true uses: actions/upload-artifact@v4 with: diff --git a/.github/workflows/build_wheels_windows.yml b/.github/workflows/build_wheels_windows.yml index 5c9e391cd6..8eab386033 100644 --- a/.github/workflows/build_wheels_windows.yml +++ b/.github/workflows/build_wheels_windows.yml @@ -89,6 +89,16 @@ on: description: 'CPU architecture to build for' default: "x64" type: string + is-release-tarball: + description: Set to true if the build is for release tarball + required: false + default: false + type: boolean + is-release-wheel: + description: Set to true if the build is for release wheel + required: false + default: false + type: boolean permissions: id-token: write @@ -277,6 +287,19 @@ jobs: BUILD_PARAMS: ${{ inputs.wheel-build-params }} run: | source "${BUILD_ENV_FILE}" + if [[ ${{ inputs.is-release-wheel }} == true || ${{ inputs.is-release-tarball }} == true ]]; then + # release version for upload to pypi + # BUILD_VERSION example: 2.4.0+cu121, we don't want the +cu121 part, so remove +cu121 + BUILD_VERSION=${BUILD_VERSION%+*} + if [[ ${{ inputs.is-release-tarball }} == true ]]; then + mkdir -p release/tarball + TRT_VERSION=$(cat dev_dep_versions.yml | grep __tensorrt_version__ | sed 's/__tensorrt_version__: //g' | sed 's/"//g') + bazel build //:libtorchtrt --compilation_mode opt --config=windows + cp bazel-bin/libtorchtrt.tar.gz \ + release/tarball/libtorchtrt-${BUILD_VERSION}-tensorrt${TRT_VERSION}-cuda${CU_VERSION:2}-libtorch${PYTORCH_VERSION}-x86_64-windows.tar.gz + return 0 + fi + fi if [[ -z "${ENV_SCRIPT}" ]]; then ${CONDA_RUN} python setup.py bdist_wheel else @@ -365,11 +388,19 @@ jobs: run: | echo "ARTIFACT_NAME=${REPOSITORY//\//_}_${REF//\//_}_${PYTHON_VERSION}_${CU_VERSION}_${ARCH}" >> "${GITHUB_ENV}" - name: Upload wheel to GitHub + if: ${{ inputs.is-release-tarball == false }} continue-on-error: true uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 with: name: ${{ env.ARTIFACT_NAME }} path: ${{ inputs.repository }}/dist/ + - name: Upload tarball to GitHub + if: ${{ inputs.is-release-tarball == true }} + continue-on-error: true + uses: actions/upload-artifact@v4 + with: + name: ${{ env.ARTIFACT_NAME }} + path: ${{ inputs.repository }}/release/tarball/ - uses: ./test-infra/.github/actions/teardown-windows if: inputs.architecture == 'x64' name: Teardown Windows @@ -378,7 +409,8 @@ jobs: needs: build uses: pytorch/test-infra/.github/workflows/_binary_upload.yml@main # for tensorrt-rtx build, do not upload to pytorch indexat at all - if: ${{ inputs.use-rtx == false }} + # if it is the release wheel or tarball, then skip upload to pytorch index(release wheel are uploaded to pypi) + if: ${{ inputs.use-rtx == false && inputs.is-release-wheel == false && inputs.is-release-tarball == false }} with: repository: ${{ inputs.repository }} ref: ${{ inputs.ref }} diff --git a/.github/workflows/release-linux-aarch64.yml b/.github/workflows/release-linux-aarch64.yml new file mode 100644 index 0000000000..85ab3672a9 --- /dev/null +++ b/.github/workflows/release-linux-aarch64.yml @@ -0,0 +1,131 @@ +name: Release aarch64 Linux wheels and tarball artifacts + +on: + pull_request: + push: + tags: + # NOTE: Binary build pipelines should only get triggered on release candidate builds + # Release candidate tags look like: v1.11.0-rc1 + - v[0-9]+.[0-9]+.[0-9]+-rc[0-9]+ + workflow_dispatch: + +permissions: + id-token: write + contents: read + packages: write + +jobs: + generate-matrix: + uses: pytorch/test-infra/.github/workflows/generate_binary_build_matrix.yml@main + if: ${{ contains(github.event.pull_request.labels.*.name, 'build-release-artifacts') || startsWith(github.event.ref, 'refs/tags/v') }} + with: + package-type: wheel + os: linux + test-infra-repository: pytorch/test-infra + test-infra-ref: main + with-rocm: false + with-cpu: false + + generate-release-tarball-matrix: + needs: [generate-matrix] + outputs: + matrix: ${{ steps.generate.outputs.matrix }} + runs-on: ubuntu-latest + steps: + - uses: actions/setup-python@v5 + with: + python-version: '3.11' + - uses: actions/checkout@v4 + with: + repository: pytorch/tensorrt + - name: Generate release matrix + id: generate + run: | + set -eou pipefail + MATRIX_BLOB=${{ toJSON(needs.generate-matrix.outputs.matrix) }} + MATRIX_BLOB="$(python3 .github/scripts/generate-release-matrix.py --tarball_matrix "${MATRIX_BLOB}")" + echo "${MATRIX_BLOB}" + echo "matrix=${MATRIX_BLOB}" >> "${GITHUB_OUTPUT}" + + release-cxx11-tarball-artifacts: + needs: [generate-release-tarball-matrix] + name: Release torch-tensorrt cxx11 tarball artifacts + strategy: + fail-fast: false + matrix: + include: + - repository: pytorch/tensorrt + package-name: torch_tensorrt + pre-script: packaging/pre_build_script.sh + env-var-script: packaging/env_vars.txt + post-script: packaging/post_build_script.sh + smoke-test-script: packaging/smoke_test_script.sh + is-release-tarball: "true" + uses: ./.github/workflows/build_wheels_linux.yml + with: + repository: ${{ matrix.repository }} + ref: "" + test-infra-repository: pytorch/test-infra + test-infra-ref: main + build-matrix: ${{ needs.generate-release-tarball-matrix.outputs.matrix }} + pre-script: ${{ matrix.pre-script }} + env-var-script: ${{ matrix.env-var-script }} + post-script: ${{ matrix.post-script }} + package-name: ${{ matrix.package-name }} + smoke-test-script: ${{ matrix.smoke-test-script }} + trigger-event: ${{ github.event_name }} + is-release-tarball: true + + generate-release-wheel-matrix: + needs: [generate-matrix] + outputs: + matrix: ${{ steps.generate.outputs.matrix }} + runs-on: ubuntu-latest + steps: + - uses: actions/setup-python@v5 + with: + python-version: '3.11' + - uses: actions/checkout@v4 + with: + repository: pytorch/tensorrt + - name: Generate release matrix + id: generate + run: | + set -eou pipefail + MATRIX_BLOB=${{ toJSON(needs.generate-matrix.outputs.matrix) }} + MATRIX_BLOB="$(python3 .github/scripts/generate-release-matrix.py --wheel_matrix "${MATRIX_BLOB}")" + echo "${MATRIX_BLOB}" + echo "matrix=${MATRIX_BLOB}" >> "${GITHUB_OUTPUT}" + + release-wheel-artifacts: + name: Release torch-tensorrt wheel artifacts + needs: [generate-release-wheel-matrix] + strategy: + fail-fast: false + matrix: + include: + - repository: pytorch/tensorrt + package-name: torch_tensorrt + pre-script: packaging/pre_build_script.sh + env-var-script: packaging/env_vars.txt + post-script: packaging/post_build_script.sh + smoke-test-script: packaging/smoke_test_script.sh + is-release-wheel: true + uses: ./.github/workflows/build_wheels_linux.yml + with: + repository: ${{ matrix.repository }} + ref: "" + test-infra-repository: pytorch/test-infra + test-infra-ref: main + build-matrix: ${{ needs.generate-release-wheel-matrix.outputs.matrix }} + pre-script: ${{ matrix.pre-script }} + env-var-script: ${{ matrix.env-var-script }} + post-script: ${{ matrix.post-script }} + package-name: ${{ matrix.package-name }} + smoke-test-script: ${{ matrix.smoke-test-script }} + trigger-event: ${{ github.event_name }} + is-release-wheel: true + +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref_name }}-${{ inputs.repository }}-${{ github.event_name == 'workflow_dispatch' }}-${{ inputs.job-name }} + cancel-in-progress: true \ No newline at end of file diff --git a/.github/workflows/release-linux-x86_64.yml b/.github/workflows/release-linux-x86_64.yml index da5e1bd06a..e0190c2a72 100644 --- a/.github/workflows/release-linux-x86_64.yml +++ b/.github/workflows/release-linux-x86_64.yml @@ -74,7 +74,7 @@ jobs: package-name: ${{ matrix.package-name }} smoke-test-script: ${{ matrix.smoke-test-script }} trigger-event: ${{ github.event_name }} - is-release-tarball: "true" + is-release-tarball: true generate-release-wheel-matrix: needs: [generate-matrix] @@ -110,7 +110,7 @@ jobs: env-var-script: packaging/env_vars.txt post-script: packaging/post_build_script.sh smoke-test-script: packaging/smoke_test_script.sh - is-release-wheel: "true" + is-release-wheel: true uses: ./.github/workflows/build_wheels_linux.yml with: repository: ${{ matrix.repository }} @@ -124,7 +124,7 @@ jobs: package-name: ${{ matrix.package-name }} smoke-test-script: ${{ matrix.smoke-test-script }} trigger-event: ${{ github.event_name }} - is-release-wheel: "true" + is-release-wheel: true concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref_name }}-${{ inputs.repository }}-${{ github.event_name == 'workflow_dispatch' }}-${{ inputs.job-name }} diff --git a/.github/workflows/release-wheel-linux.yml b/.github/workflows/release-wheel-linux.yml deleted file mode 100644 index efd73f490f..0000000000 --- a/.github/workflows/release-wheel-linux.yml +++ /dev/null @@ -1,249 +0,0 @@ -name: Build Release Wheel Artifacts on Linux - -on: - workflow_call: - inputs: - repository: - description: 'Repository to checkout, defaults to ""' - default: "" - type: string - ref: - description: 'Reference to checkout, defaults to "nightly"' - default: "nightly" - type: string - test-infra-repository: - description: "Test infra repository to use" - default: "pytorch/test-infra" - type: string - test-infra-ref: - description: "Test infra reference to use" - default: "" - type: string - build-matrix: - description: "Build matrix to utilize" - default: "" - type: string - pre-script: - description: "Pre script to run prior to build" - default: "" - type: string - post-script: - description: "Post script to run prior to build" - default: "" - type: string - smoke-test-script: - description: "Script for Smoke Test for a specific domain" - default: "" - type: string - env-var-script: - description: "Script that sets Domain-Specific Environment Variables" - default: "" - type: string - package-name: - description: "Name of the actual python package that is imported" - default: "" - type: string - trigger-event: - description: "Trigger Event in caller that determines whether or not to upload" - default: "" - type: string - cache-path: - description: "The path(s) on the runner to cache or restore. The path is relative to repository." - default: "" - type: string - cache-key: - description: "The key created when saving a cache and the key used to search for a cache." - default: "" - type: string - architecture: - description: Architecture to build for x86_64 for default Linux, or aarch64 for Linux aarch64 builds - required: false - type: string - default: x86_64 - submodules: - description: Works as stated in actions/checkout, but the default value is recursive - required: false - type: string - default: recursive - setup-miniconda: - description: Set to true if setup-miniconda is needed - required: false - type: boolean - default: true - cxx11-tarball-release: - description: "Flag whether this is the cxx11 tarball release" - required: true - type: string - default: "false" - -permissions: - id-token: write - contents: read - -jobs: - release: - strategy: - fail-fast: false - matrix: ${{ fromJSON(inputs.build-matrix) }} - env: - PYTHON_VERSION: ${{ matrix.python_version }} - PACKAGE_TYPE: wheel - REPOSITORY: ${{ inputs.repository }} - REF: ${{ inputs.ref }} - CU_VERSION: ${{ matrix.desired_cuda }} - UPLOAD_TO_BASE_BUCKET: ${{ matrix.upload_to_base_bucket }} - ARCH: ${{ inputs.architecture }} - name: release_${{ matrix.build_name }} - runs-on: ${{ matrix.validation_runner }} - container: - image: ${{ matrix.container_image }} - options: ${{ matrix.gpu_arch_type == 'cuda' && '--gpus all' || ' ' }} - # If a build is taking longer than 120 minutes on these runners we need - # to have a conversation - timeout-minutes: 120 - - steps: - - name: Clean workspace - shell: bash -l {0} - run: | - set -x - echo "::group::Cleanup debug output" - rm -rf "${GITHUB_WORKSPACE}" - mkdir -p "${GITHUB_WORKSPACE}" - if [[ "${{ inputs.architecture }}" = "aarch64" ]]; then - rm -rf "${RUNNER_TEMP}/*" - fi - echo "::endgroup::" - - uses: actions/checkout@v4 - with: - # Support the use case where we need to checkout someone's fork - repository: ${{ inputs.test-infra-repository }} - ref: ${{ inputs.test-infra-ref }} - path: test-infra - - uses: actions/checkout@v4 - if: ${{ env.ARCH == 'aarch64' }} - with: - # Support the use case where we need to checkout someone's fork - repository: "pytorch/builder" - ref: "main" - path: builder - - name: Set linux aarch64 CI - if: ${{ inputs.architecture == 'aarch64' }} - shell: bash -l {0} - env: - DESIRED_PYTHON: ${{ matrix.python_version }} - run: | - set +e - # TODO: This is temporary aarch64 setup script, this should be integrated into aarch64 docker. - ${GITHUB_WORKSPACE}/builder/aarch64_linux/aarch64_ci_setup.sh - echo "/opt/conda/bin" >> $GITHUB_PATH - set -e - - uses: ./test-infra/.github/actions/set-channel - - name: Set PYTORCH_VERSION - if: ${{ env.CHANNEL == 'test' }} - run: | - # When building RC, set the version to be the current candidate version, - # otherwise, leave it alone so nightly will pick up the latest - echo "PYTORCH_VERSION=${{ matrix.stable_version }}" >> "${GITHUB_ENV}" - - uses: ./test-infra/.github/actions/setup-binary-builds - env: - PLATFORM: ${{ inputs.architecture == 'aarch64' && 'linux-aarch64' || ''}} - with: - repository: ${{ inputs.repository }} - ref: ${{ inputs.ref }} - submodules: ${{ inputs.submodules }} - setup-miniconda: ${{ inputs.setup-miniconda }} - python-version: ${{ env.PYTHON_VERSION }} - cuda-version: ${{ env.CU_VERSION }} - arch: ${{ env.ARCH }} - - name: Combine Env Var and Build Env Files - if: ${{ inputs.env-var-script != '' }} - working-directory: ${{ inputs.repository }} - shell: bash -l {0} - run: | - cat "${{ inputs.env-var-script }}" >> "${BUILD_ENV_FILE}" - - name: Install torch dependency - shell: bash -l {0} - run: | - set -x - # shellcheck disable=SC1090 - source "${BUILD_ENV_FILE}" - # shellcheck disable=SC2086 - ${CONDA_RUN} ${PIP_INSTALL_TORCH} - - name: Run Pre-Script with Caching - if: ${{ inputs.pre-script != '' }} - uses: ./test-infra/.github/actions/run-script-with-cache - with: - cache-path: ${{ inputs.cache-path }} - cache-key: ${{ inputs.cache-key }} - repository: ${{ inputs.repository }} - script: ${{ inputs.pre-script }} - - name: Build clean - working-directory: ${{ inputs.repository }} - shell: bash -l {0} - run: | - set -x - source "${BUILD_ENV_FILE}" - ${CONDA_RUN} python setup.py clean - - name: Build the wheel (bdist_wheel) - working-directory: ${{ inputs.repository }} - shell: bash -l {0} - run: | - set -x - source "${BUILD_ENV_FILE}" - - # BUILD_VERSION example: 2.4.0+cu121, we don't want the +cu121 part, so remove +cu121 - BUILD_VERSION=${BUILD_VERSION%+*} - TRT_VERSION=$(cat dev_dep_versions.yml | grep __tensorrt_version__ | sed 's/__tensorrt_version__: //g' | sed 's/"//g') - mkdir release - mkdir release/tarball - mkdir release/wheel - if [[ "${{ inputs.cxx11-tarball-release }}" == "true" ]]; then - bazel build //:libtorchtrt --compilation_mode opt --config=linux - cp bazel-bin/libtorchtrt.tar.gz \ - release/tarball/libtorchtrt-${BUILD_VERSION}-tensorrt${TRT_VERSION}-cuda${CU_VERSION:2}-libtorch${PYTORCH_VERSION}-x86_64-linux.tar.gz - else - ${CONDA_RUN} python setup.py bdist_wheel --release - ${CONDA_RUN} python -m pip install auditwheel - ${CONDA_RUN} python -m auditwheel repair \ - $(cat py/ci/soname_excludes.params) \ - --plat manylinux_2_34_x86_64 \ - dist/torch_tensorrt-*-linux_x86_64.whl - ${CONDA_RUN} python -m zipfile --list wheelhouse/torch_tensorrt-*_x86_64.whl - cp wheelhouse/torch_tensorrt-*_x86_64.whl release/wheel/ - fi - - name: Run Post-Script - if: ${{ inputs.post-script != '' }} - uses: ./test-infra/.github/actions/run-script-with-cache - with: - repository: ${{ inputs.repository }} - script: ${{ inputs.post-script }} - - name: Smoke Test - shell: bash -l {0} - env: - PACKAGE_NAME: ${{ inputs.package-name }} - SMOKE_TEST_SCRIPT: ${{ inputs.smoke-test-script }} - run: | - set -x - source "${BUILD_ENV_FILE}" - # TODO: add smoke test for the auditwheel tarball built - - # NB: Only upload to GitHub after passing smoke tests - - name: Upload wheel to GitHub - if: ${{ inputs.cxx11-tarball-release != 'true' }} - continue-on-error: true - uses: actions/upload-artifact@v4 - with: - name: ${{ env.ARTIFACT_NAME }} - path: ${{ inputs.repository }}/release/wheel/ - - name: Upload cxx11 tarball to GitHub - if: ${{ inputs.cxx11-tarball-release == 'true' }} - continue-on-error: true - uses: actions/upload-artifact@v4 - with: - name: cxx11-tarball-${{ env.PYTHON_VERSION }}-${{ env.CU_VERSION }} - path: ${{ inputs.repository }}/release/tarball/ - -concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref_name }}-${{ inputs.repository }}-${{ github.event_name == 'workflow_dispatch' }}-${{ inputs.job-name }}-${{ inputs.cxx11-tarball-release }} - cancel-in-progress: true \ No newline at end of file diff --git a/.github/workflows/release-wheel-windows.yml b/.github/workflows/release-wheel-windows.yml deleted file mode 100644 index 2ea88bce9e..0000000000 --- a/.github/workflows/release-wheel-windows.yml +++ /dev/null @@ -1,213 +0,0 @@ -name: Build Release Wheel Artifacts on Windows - -on: - workflow_call: - inputs: - repository: - description: 'Repository to checkout, defaults to ""' - default: "" - type: string - ref: - description: 'Reference to checkout, defaults to "nightly"' - default: "nightly" - type: string - test-infra-repository: - description: "Test infra repository to use" - default: "pytorch/test-infra" - type: string - test-infra-ref: - description: "Test infra reference to use" - default: "" - type: string - build-matrix: - description: "Build matrix to utilize" - default: "" - type: string - pre-script: - description: "Pre script to run prior to build" - default: "" - type: string - env-script: - description: "Script to setup environment variables for the build" - default: "" - type: string - wheel-build-params: - description: "Additional parameters for bdist_wheel" - default: "" - type: string - post-script: - description: "Post script to run prior to build" - default: "" - type: string - smoke-test-script: - description: "Script for Smoke Test for a specific domain" - default: "" - type: string - package-name: - description: "Name of the actual python package that is imported" - default: "" - type: string - trigger-event: - description: "Trigger Event in caller that determines whether or not to upload" - default: "" - type: string - cache-path: - description: "The path(s) on the runner to cache or restore. The path is relative to repository." - default: "" - type: string - cache-key: - description: "The key created when saving a cache and the key used to search for a cache." - default: "" - type: string - submodules: - description: "Works as stated in actions/checkout, but the default value is recursive" - required: false - type: string - default: recursive - -permissions: - id-token: write - contents: read - -jobs: - build-release-wheel: - strategy: - fail-fast: false - matrix: ${{ fromJSON(inputs.build-matrix) }} - env: - PYTHON_VERSION: ${{ matrix.python_version }} - PACKAGE_TYPE: wheel - REPOSITORY: ${{ inputs.repository }} - REF: ${{ inputs.ref }} - CU_VERSION: ${{ matrix.desired_cuda }} - UPLOAD_TO_BASE_BUCKET: ${{ matrix.upload_to_base_bucket }} - name: ${{ matrix.build_name }} - runs-on: ${{ matrix.validation_runner }} - defaults: - run: - shell: bash -l {0} - # If a build is taking longer than 120 minutes on these runners we need - # to have a conversation - timeout-minutes: 120 - steps: - - uses: actions/checkout@v4 - with: - # Support the use case where we need to checkout someone's fork - repository: ${{ inputs.test-infra-repository }} - ref: ${{ inputs.test-infra-ref }} - path: test-infra - - uses: ./test-infra/.github/actions/setup-ssh - name: Setup SSH - with: - github-secret: ${{ secrets.GITHUB_TOKEN }} - activate-with-label: false - instructions: "SSH with rdesktop using ssh -L 3389:localhost:3389 %%username%%@%%hostname%%" - - name: Add Conda scripts to GitHub path - run: | - echo "C:/Jenkins/Miniconda3/Scripts" >> $GITHUB_PATH - - uses: ./test-infra/.github/actions/set-channel - - name: Set PYTORCH_VERSION - if: ${{ env.CHANNEL == 'test' }} - run: | - # When building RC, set the version to be the current candidate version, - # otherwise, leave it alone so nightly will pick up the latest - echo "PYTORCH_VERSION=${{ matrix.stable_version }}" >> "${GITHUB_ENV}" - - uses: ./test-infra/.github/actions/setup-binary-builds - with: - repository: ${{ inputs.repository }} - ref: ${{ inputs.ref }} - submodules: ${{ inputs.submodules }} - setup-miniconda: false - python-version: ${{ env.PYTHON_VERSION }} - cuda-version: ${{ env.CU_VERSION }} - arch: ${{ env.ARCH }} - - name: Install torch dependency - run: | - source "${BUILD_ENV_FILE}" - # shellcheck disable=SC2086 - ${CONDA_RUN} ${PIP_INSTALL_TORCH} - - name: Run Pre-Script with Caching - if: ${{ inputs.pre-script != '' }} - uses: ./test-infra/.github/actions/run-script-with-cache - with: - cache-path: ${{ inputs.cache-path }} - cache-key: ${{ inputs.cache-key }} - repository: ${{ inputs.repository }} - script: ${{ inputs.pre-script }} - is_windows: 'enabled' - - name: Build clean - working-directory: ${{ inputs.repository }} - run: | - source "${BUILD_ENV_FILE}" - ${CONDA_RUN} python setup.py clean - - name: Build the wheel (bdist_wheel) - working-directory: ${{ inputs.repository }} - env: - ENV_SCRIPT: ${{ inputs.env-script }} - BUILD_PARAMS: ${{ inputs.wheel-build-params }} - run: | - set -x - source "${BUILD_ENV_FILE}" - - if [[ "$CU_VERSION" == "cpu" ]]; then - # CUDA and CPU are ABI compatible on the CPU-only parts, so strip - # in this case - export PYTORCH_VERSION="$(${CONDA_RUN} pip show torch | grep ^Version: | sed 's/Version: *//' | sed 's/+.\+//')" - else - export PYTORCH_VERSION="$(${CONDA_RUN} pip show torch | grep ^Version: | sed 's/Version: *//')" - fi - - # BUILD_VERSION example: 2.4.0+cu121, we don't want the +cu121 part, so remove +cu121 - BUILD_VERSION=${BUILD_VERSION%+*} - - if [[ -z "${ENV_SCRIPT}" ]]; then - ${CONDA_RUN} python setup.py bdist_wheel - else - if [[ ! -f ${ENV_SCRIPT} ]]; then - echo "::error::Specified env-script file (${ENV_SCRIPT}) not found" - exit 1 - else - ${CONDA_RUN} ${ENV_SCRIPT} python setup.py bdist_wheel ${BUILD_PARAMS} - fi - fi - - name: Run post-script - working-directory: ${{ inputs.repository }} - env: - POST_SCRIPT: ${{ inputs.post-script }} - ENV_SCRIPT: ${{ inputs.env-script }} - if: ${{ inputs.post-script != '' }} - run: | - set -euxo pipefail - source "${BUILD_ENV_FILE}" - ${CONDA_RUN} ${ENV_SCRIPT} ${POST_SCRIPT} - - name: Smoke Test - env: - PACKAGE_NAME: ${{ inputs.package-name }} - SMOKE_TEST_SCRIPT: ${{ inputs.smoke-test-script }} - run: | - source "${BUILD_ENV_FILE}" - WHEEL_NAME=$(ls "${{ inputs.repository }}/dist/") - echo "$WHEEL_NAME" - ${CONDA_RUN} pip install "${{ inputs.repository }}/dist/$WHEEL_NAME" - if [[ ! -f "${{ inputs.repository }}"/${SMOKE_TEST_SCRIPT} ]]; then - echo "${{ inputs.repository }}/${SMOKE_TEST_SCRIPT} not found" - ${CONDA_RUN} python -c "import ${PACKAGE_NAME}; print('package version is ', ${PACKAGE_NAME}.__version__)" - else - echo "${{ inputs.repository }}/${SMOKE_TEST_SCRIPT} found" - ${CONDA_RUN} python "${{ inputs.repository }}/${SMOKE_TEST_SCRIPT}" - fi - # NB: Only upload to GitHub after passing smoke tests - - name: Upload wheel to GitHub - continue-on-error: true - uses: actions/upload-artifact@v4 - with: - name: ${{ env.ARTIFACT_NAME }} - path: ${{ inputs.repository }}/dist/ - - uses: ./test-infra/.github/actions/teardown-windows - if: always() - name: Teardown Windows - - -concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref_name }}-${{ inputs.repository }}-${{ github.event_name == 'workflow_dispatch' }}-${{ inputs.job-name }} - cancel-in-progress: true diff --git a/.github/workflows/release-windows.yml b/.github/workflows/release-windows.yml index 1a20eb7a71..bee7fc8721 100644 --- a/.github/workflows/release-windows.yml +++ b/.github/workflows/release-windows.yml @@ -1,6 +1,7 @@ name: Release Windows wheels artifacts on: + pull_request: push: tags: # NOTE: Binary build pipelines should only get triggered on release candidate builds @@ -25,8 +26,20 @@ jobs: with-rocm: false with-cpu: false - generate-release-matrix: - needs: [generate-matrix] + substitute-runner: + needs: generate-matrix + outputs: + matrix: ${{ steps.substitute.outputs.matrix }} + runs-on: ubuntu-latest + steps: + - name: Substitute runner + id: substitute + run: | + echo matrix="$(echo '${{ needs.generate-release-matrix.outputs.matrix }}' | sed -e 's/windows.g4dn.xlarge/windows.g5.4xlarge.nvidia.gpu/g')" >> ${GITHUB_OUTPUT} + + + generate-release-tarball-matrix: + needs: [substitute-runner] outputs: matrix: ${{ steps.generate.outputs.matrix }} runs-on: ubuntu-latest @@ -37,28 +50,68 @@ jobs: - uses: actions/checkout@v4 with: repository: pytorch/tensorrt - - name: Generate release matrix + - name: Generate release tarball matrix id: generate run: | set -eou pipefail - MATRIX_BLOB=${{ toJSON(needs.generate-matrix.outputs.matrix) }} - MATRIX_BLOB="$(python3 .github/scripts/generate-release-matrix.py --wheel_matrix "${MATRIX_BLOB}")" + MATRIX_BLOB=${{ toJSON(needs.substitute-runner.outputs.matrix) }} + MATRIX_BLOB="$(python3 .github/scripts/generate-release-matrix.py --tarball_matrix "${MATRIX_BLOB}")" echo "${MATRIX_BLOB}" echo "matrix=${MATRIX_BLOB}" >> "${GITHUB_OUTPUT}" - substitute-runner: - needs: generate-release-matrix + generate-release-wheel-matrix: + needs: [substitute-runner] outputs: - matrix: ${{ steps.substitute.outputs.matrix }} + matrix: ${{ steps.generate.outputs.matrix }} runs-on: ubuntu-latest steps: - - name: Substitute runner - id: substitute + - uses: actions/setup-python@v5 + with: + python-version: '3.11' + - uses: actions/checkout@v4 + with: + repository: pytorch/tensorrt + - name: Generate release wheel matrix + id: generate run: | - echo matrix="$(echo '${{ needs.generate-release-matrix.outputs.matrix }}' | sed -e 's/windows.g4dn.xlarge/windows.g5.4xlarge.nvidia.gpu/g')" >> ${GITHUB_OUTPUT} + set -eou pipefail + MATRIX_BLOB=${{ toJSON(needs.substitute-runner.outputs.matrix) }} + MATRIX_BLOB="$(python3 .github/scripts/generate-release-matrix.py --wheel_matrix "${MATRIX_BLOB}")" + echo "${MATRIX_BLOB}" + echo "matrix=${MATRIX_BLOB}" >> "${GITHUB_OUTPUT}" + + + release-cxx11-tarball-artifacts: + needs: [generate-release-tarball-matrix] + name: Release torch-tensorrt cxx11 tarball artifacts + strategy: + fail-fast: false + matrix: + include: + - repository: pytorch/tensorrt + package-name: torch_tensorrt + pre-script: packaging/pre_build_script.sh + env-var-script: packaging/env_vars.txt + post-script: packaging/post_build_script.sh + smoke-test-script: packaging/smoke_test_script.sh + is-release-tarball: true + uses: ./.github/workflows/build_wheels_linux.yml + with: + repository: ${{ matrix.repository }} + ref: "" + test-infra-repository: pytorch/test-infra + test-infra-ref: main + build-matrix: ${{ needs.generate-release-tarball-matrix.outputs.matrix }} + pre-script: ${{ matrix.pre-script }} + env-var-script: ${{ matrix.env-var-script }} + post-script: ${{ matrix.post-script }} + package-name: ${{ matrix.package-name }} + smoke-test-script: ${{ matrix.smoke-test-script }} + trigger-event: ${{ github.event_name }} + is-release-tarball: true release-wheel-artifacts: - needs: substitute-runner + needs: [generate-release-wheel-matrix] name: Release torch-tensorrt wheel artifacts strategy: fail-fast: false @@ -69,17 +122,19 @@ jobs: env-script: packaging/vc_env_helper.bat smoke-test-script: packaging/smoke_test_windows.py package-name: torch_tensorrt + is-release-wheel: true uses: ./.github/workflows/release-wheel-windows.yml with: repository: ${{ matrix.repository }} ref: "" test-infra-repository: pytorch/test-infra test-infra-ref: main - build-matrix: ${{ needs.substitute-runner.outputs.matrix }} + build-matrix: ${{ needs.generate-release-wheel-matrix.outputs.matrix }} pre-script: ${{ matrix.pre-script }} env-script: ${{ matrix.env-script }} smoke-test-script: ${{ matrix.smoke-test-script }} package-name: ${{ matrix.package-name }} + is-release-wheel: true concurrency: From e3fc3ea8790e18292474e758b0a9e53dd5837090 Mon Sep 17 00:00:00 2001 From: lanluo-nvidia Date: Thu, 28 Aug 2025 17:52:23 -0700 Subject: [PATCH 03/15] test CI --- .github/workflows/build-test-linux-aarch64-jetpack.yml | 2 +- .github/workflows/build-test-linux-aarch64.yml | 2 +- .github/workflows/build-test-linux-x86_64.yml | 2 +- .github/workflows/build-test-linux-x86_64_rtx.yml | 2 +- .github/workflows/build-test-windows.yml | 2 +- .github/workflows/build-test-windows_rtx.yml | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build-test-linux-aarch64-jetpack.yml b/.github/workflows/build-test-linux-aarch64-jetpack.yml index 9523872acf..3d4bcf50db 100644 --- a/.github/workflows/build-test-linux-aarch64-jetpack.yml +++ b/.github/workflows/build-test-linux-aarch64-jetpack.yml @@ -1,7 +1,7 @@ name: Build and test Linux aarch64 wheels for Jetpack on: - pull_request: + #pull_request: push: branches: - main diff --git a/.github/workflows/build-test-linux-aarch64.yml b/.github/workflows/build-test-linux-aarch64.yml index a2b2a78db9..3a353c3a1c 100644 --- a/.github/workflows/build-test-linux-aarch64.yml +++ b/.github/workflows/build-test-linux-aarch64.yml @@ -1,7 +1,7 @@ name: Build and test Linux aarch64 wheels on: - pull_request: + #pull_request: push: branches: - main diff --git a/.github/workflows/build-test-linux-x86_64.yml b/.github/workflows/build-test-linux-x86_64.yml index 3998eab0e7..5662810818 100644 --- a/.github/workflows/build-test-linux-x86_64.yml +++ b/.github/workflows/build-test-linux-x86_64.yml @@ -1,7 +1,7 @@ name: Build and test Linux x86_64 wheels on: - pull_request: + #pull_request: push: branches: - main diff --git a/.github/workflows/build-test-linux-x86_64_rtx.yml b/.github/workflows/build-test-linux-x86_64_rtx.yml index 1f9b605584..d278069b2d 100644 --- a/.github/workflows/build-test-linux-x86_64_rtx.yml +++ b/.github/workflows/build-test-linux-x86_64_rtx.yml @@ -1,7 +1,7 @@ name: RTX - Build and test Linux x86_64 wheels on: - pull_request: + #pull_request: push: branches: - main diff --git a/.github/workflows/build-test-windows.yml b/.github/workflows/build-test-windows.yml index ca39f8cb5f..647364e70e 100644 --- a/.github/workflows/build-test-windows.yml +++ b/.github/workflows/build-test-windows.yml @@ -1,7 +1,7 @@ name: Build and test Windows wheels on: - pull_request: + #pull_request: push: branches: - main diff --git a/.github/workflows/build-test-windows_rtx.yml b/.github/workflows/build-test-windows_rtx.yml index 137adb252c..3c401d1b21 100644 --- a/.github/workflows/build-test-windows_rtx.yml +++ b/.github/workflows/build-test-windows_rtx.yml @@ -1,7 +1,7 @@ name: RTX - Build and test Windows wheels on: - pull_request: + #pull_request: push: branches: - main From 98f6a7d9c83efcbbdd4d479d0109c058bf9e59fe Mon Sep 17 00:00:00 2001 From: lanluo-nvidia Date: Fri, 29 Aug 2025 09:37:51 -0700 Subject: [PATCH 04/15] test --- .github/workflows/release-linux-aarch64.yml | 2 +- .github/workflows/release-linux-x86_64.yml | 2 +- setup.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release-linux-aarch64.yml b/.github/workflows/release-linux-aarch64.yml index 85ab3672a9..46962d785f 100644 --- a/.github/workflows/release-linux-aarch64.yml +++ b/.github/workflows/release-linux-aarch64.yml @@ -127,5 +127,5 @@ jobs: is-release-wheel: true concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref_name }}-${{ inputs.repository }}-${{ github.event_name == 'workflow_dispatch' }}-${{ inputs.job-name }} + group: ${{ github.workflow }}-aarch64-${{ github.event.pull_request.number || github.ref_name }}-${{ inputs.repository }}-${{ github.event_name == 'workflow_dispatch' }}-${{ inputs.job-name }} cancel-in-progress: true \ No newline at end of file diff --git a/.github/workflows/release-linux-x86_64.yml b/.github/workflows/release-linux-x86_64.yml index e0190c2a72..f38ad88d80 100644 --- a/.github/workflows/release-linux-x86_64.yml +++ b/.github/workflows/release-linux-x86_64.yml @@ -127,5 +127,5 @@ jobs: is-release-wheel: true concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref_name }}-${{ inputs.repository }}-${{ github.event_name == 'workflow_dispatch' }}-${{ inputs.job-name }} + group: ${{ github.workflow }}-x86_64-${{ github.event.pull_request.number || github.ref_name }}-${{ inputs.repository }}-${{ github.event_name == 'workflow_dispatch' }}-${{ inputs.job-name }} cancel-in-progress: true \ No newline at end of file diff --git a/setup.py b/setup.py index b26a34f371..3ba8352f0b 100644 --- a/setup.py +++ b/setup.py @@ -631,7 +631,7 @@ def run(self): ), extra_compile_args=( [ - f'/DPYBIND11_BUILD_ABI=\\"{torch._C._PYBIND11_BUILD_ABI}\\"', + f'/DPYBIND11_BUILD_ABI=\\"{getattr(torch._C, "_PYBIND11_BUILD_ABI", "_cxxabi1018")}\\"', "/GS-", "/permissive-", "/utf-8", From f65e66a1bff64f0d8864f2daee60c5d583f6939a Mon Sep 17 00:00:00 2001 From: lanluo-nvidia Date: Fri, 29 Aug 2025 09:42:04 -0700 Subject: [PATCH 05/15] test --- .github/workflows/release-linux-aarch64.yml | 2 ++ .github/workflows/release-windows.yml | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release-linux-aarch64.yml b/.github/workflows/release-linux-aarch64.yml index 46962d785f..d3f329da3a 100644 --- a/.github/workflows/release-linux-aarch64.yml +++ b/.github/workflows/release-linux-aarch64.yml @@ -75,6 +75,7 @@ jobs: smoke-test-script: ${{ matrix.smoke-test-script }} trigger-event: ${{ github.event_name }} is-release-tarball: true + architecture: "aarch64" generate-release-wheel-matrix: needs: [generate-matrix] @@ -125,6 +126,7 @@ jobs: smoke-test-script: ${{ matrix.smoke-test-script }} trigger-event: ${{ github.event_name }} is-release-wheel: true + architecture: "aarch64" concurrency: group: ${{ github.workflow }}-aarch64-${{ github.event.pull_request.number || github.ref_name }}-${{ inputs.repository }}-${{ github.event_name == 'workflow_dispatch' }}-${{ inputs.job-name }} diff --git a/.github/workflows/release-windows.yml b/.github/workflows/release-windows.yml index bee7fc8721..a47b045ce5 100644 --- a/.github/workflows/release-windows.yml +++ b/.github/workflows/release-windows.yml @@ -95,7 +95,7 @@ jobs: post-script: packaging/post_build_script.sh smoke-test-script: packaging/smoke_test_script.sh is-release-tarball: true - uses: ./.github/workflows/build_wheels_linux.yml + uses: ./.github/workflows/build_wheels_windows.yml with: repository: ${{ matrix.repository }} ref: "" @@ -123,7 +123,7 @@ jobs: smoke-test-script: packaging/smoke_test_windows.py package-name: torch_tensorrt is-release-wheel: true - uses: ./.github/workflows/release-wheel-windows.yml + uses: ./.github/workflows/build_wheels_windows.yml with: repository: ${{ matrix.repository }} ref: "" From 1ccf39b315f53e921ece73ac6e3866f5d86278a8 Mon Sep 17 00:00:00 2001 From: lanluo-nvidia Date: Fri, 29 Aug 2025 10:00:29 -0700 Subject: [PATCH 06/15] add pkg_zip for windows zip release --- .github/workflows/release-linux-aarch64.yml | 1 - .github/workflows/release-linux-x86_64.yml | 1 - .github/workflows/release-windows.yml | 12 ++-- BUILD.bazel | 62 ++++++++++++++++++--- 4 files changed, 59 insertions(+), 17 deletions(-) diff --git a/.github/workflows/release-linux-aarch64.yml b/.github/workflows/release-linux-aarch64.yml index d3f329da3a..d619f618a2 100644 --- a/.github/workflows/release-linux-aarch64.yml +++ b/.github/workflows/release-linux-aarch64.yml @@ -1,7 +1,6 @@ name: Release aarch64 Linux wheels and tarball artifacts on: - pull_request: push: tags: # NOTE: Binary build pipelines should only get triggered on release candidate builds diff --git a/.github/workflows/release-linux-x86_64.yml b/.github/workflows/release-linux-x86_64.yml index f38ad88d80..320bd78a4a 100644 --- a/.github/workflows/release-linux-x86_64.yml +++ b/.github/workflows/release-linux-x86_64.yml @@ -1,7 +1,6 @@ name: Release x86_64 Linux wheels and tarball artifacts on: - pull_request: push: tags: # NOTE: Binary build pipelines should only get triggered on release candidate builds diff --git a/.github/workflows/release-windows.yml b/.github/workflows/release-windows.yml index a47b045ce5..49dad0bcd8 100644 --- a/.github/workflows/release-windows.yml +++ b/.github/workflows/release-windows.yml @@ -1,7 +1,6 @@ name: Release Windows wheels artifacts on: - pull_request: push: tags: # NOTE: Binary build pipelines should only get triggered on release candidate builds @@ -90,10 +89,9 @@ jobs: include: - repository: pytorch/tensorrt package-name: torch_tensorrt - pre-script: packaging/pre_build_script.sh - env-var-script: packaging/env_vars.txt - post-script: packaging/post_build_script.sh - smoke-test-script: packaging/smoke_test_script.sh + pre-script: packaging/pre_build_script_windows.sh + env-script: packaging/vc_env_helper.bat + smoke-test-script: packaging/smoke_test_windows.py is-release-tarball: true uses: ./.github/workflows/build_wheels_windows.yml with: @@ -103,11 +101,9 @@ jobs: test-infra-ref: main build-matrix: ${{ needs.generate-release-tarball-matrix.outputs.matrix }} pre-script: ${{ matrix.pre-script }} - env-var-script: ${{ matrix.env-var-script }} - post-script: ${{ matrix.post-script }} + env-script: ${{ matrix.env-var-script }} package-name: ${{ matrix.package-name }} smoke-test-script: ${{ matrix.smoke-test-script }} - trigger-event: ${{ github.event_name }} is-release-tarball: true release-wheel-artifacts: diff --git a/BUILD.bazel b/BUILD.bazel index 7a49d116b6..b70ec268bb 100644 --- a/BUILD.bazel +++ b/BUILD.bazel @@ -1,4 +1,4 @@ -load("@rules_pkg//:pkg.bzl", "pkg_tar") +load("@rules_pkg//:pkg.bzl", "pkg_tar", "pkg_zip") config_setting( name = "windows", @@ -96,8 +96,24 @@ pkg_tar( package_dir = "bin/", ) +# Windows-specific zip target +pkg_zip( + name = "libtorchtrt_zip", + srcs = [ + "//:LICENSE", + "//third_party/torch_tensorrt:BUILD", + ], + package_dir = "torch_tensorrt", + deps = [ + ":include", + ":include_core", + ":lib", + ], +) + +# Non-Windows tar target pkg_tar( - name = "libtorchtrt", + name = "libtorchtrt_tar", srcs = [ "//:LICENSE", "//third_party/torch_tensorrt:BUILD", @@ -105,18 +121,40 @@ pkg_tar( extension = "tar.gz", package_dir = "torch_tensorrt", deps = [ + ":bin", ":include", ":include_core", ":lib", - ] + select({ - ":rtx_win": [], - ":windows": [], - "//conditions:default": [":bin"], + ], +) + +# Main target that selects between zip and tar based on platform +alias( + name = "libtorchtrt", + actual = select({ + ":rtx_win": ":libtorchtrt_zip", + ":windows": ":libtorchtrt_zip", + "//conditions:default": ":libtorchtrt_tar", }), ) +# Windows-specific zip target for runtime +pkg_zip( + name = "libtorchtrt_runtime_zip", + srcs = [ + "//:LICENSE", + "//third_party/torch_tensorrt:BUILD", + ], + package_dir = "torch_tensorrt_runtime", + deps = [ + ":include_rt", + ":lib_rt", + ], +) + +# Non-Windows tar target for runtime pkg_tar( - name = "libtorchtrt_runtime", + name = "libtorchtrt_runtime_tar", srcs = [ "//:LICENSE", "//third_party/torch_tensorrt:BUILD", @@ -128,3 +166,13 @@ pkg_tar( ":lib_rt", ], ) + +# Main runtime target that selects between zip and tar based on platform +alias( + name = "libtorchtrt_runtime", + actual = select({ + ":rtx_win": ":libtorchtrt_runtime_zip", + ":windows": ":libtorchtrt_runtime_zip", + "//conditions:default": ":libtorchtrt_runtime_tar", + }), +) From a827667db27874a047e7435c82195481301425fa Mon Sep 17 00:00:00 2001 From: lanluo-nvidia Date: Fri, 29 Aug 2025 11:07:59 -0700 Subject: [PATCH 07/15] add alias --- BUILD.bazel | 94 +++++++++++++++++++++++++++++------------ core/BUILD | 11 ++++- core/plugins/BUILD | 19 ++++++++- core/runtime/BUILD | 15 ++++++- core/util/BUILD | 16 ++++++- core/util/logging/BUILD | 9 +++- 6 files changed, 133 insertions(+), 31 deletions(-) diff --git a/BUILD.bazel b/BUILD.bazel index b70ec268bb..5350ce5ac4 100644 --- a/BUILD.bazel +++ b/BUILD.bazel @@ -43,6 +43,20 @@ pkg_tar( ], ) +pkg_zip( + name = "include_core_zip", + srcs = [ + "//core:include_zip", + "//core/plugins:impl_include_zip", + "//core/plugins:include_zip", + "//core/runtime:include_zip", + "//core/util:include_zip", + "//core/util/logging:include_zip", + ], + out = "include_core.zip", + package_dir = "include/torch_tensorrt", +) + pkg_tar( name = "include_rt", package_dir = "include/torch_tensorrt", @@ -51,6 +65,15 @@ pkg_tar( ], ) +pkg_zip( + name = "include_rt_zip", + srcs = [ + "//core/runtime:include", + ], + out = "include_rt.zip", + package_dir = "include/torch_tensorrt", +) + pkg_tar( name = "include", srcs = [ @@ -59,30 +82,49 @@ pkg_tar( package_dir = "include/torch_tensorrt/", ) +pkg_zip( + name = "include_zip", + srcs = [ + "//cpp:api_headers", + ], + out = "include.zip", + package_dir = "include/torch_tensorrt/", +) + +# Non-Windows tar target for lib pkg_tar( name = "lib", - srcs = select({ - ":rtx_win": ["//cpp/lib:torchtrt.dll"], - ":windows": ["//cpp/lib:torchtrt.dll"], - "//conditions:default": [ - "//cpp/lib:libtorchtrt.so", - "//cpp/lib:libtorchtrt_plugins.so", - "//cpp/lib:libtorchtrt_runtime.so", - ], - }), + srcs = [ + "//cpp/lib:libtorchtrt.so", + "//cpp/lib:libtorchtrt_plugins.so", + "//cpp/lib:libtorchtrt_runtime.so", + ], + mode = "0755", + package_dir = "lib/", +) + +# Windows-specific zip target for lib +pkg_zip( + name = "lib_zip", + srcs = ["//cpp/lib:torchtrt.dll"], + out = "lib.zip", mode = "0755", package_dir = "lib/", ) +# Non-Windows tar target for lib_rt pkg_tar( name = "lib_rt", - srcs = select({ - ":rtx_win": ["//cpp/lib:torchtrt_runtime.dll"], - ":windows": ["//cpp/lib:torchtrt_runtime.dll"], - "//conditions:default": [ - "//cpp/lib:libtorchtrt_runtime.so", - ], - }), + srcs = ["//cpp/lib:libtorchtrt_runtime.so"], + mode = "0755", + package_dir = "lib/", +) + +# Windows-specific zip target for lib_rt +pkg_zip( + name = "lib_rt_zip", + srcs = ["//cpp/lib:torchtrt_runtime.dll"], + out = "lib_rt.zip", mode = "0755", package_dir = "lib/", ) @@ -100,15 +142,14 @@ pkg_tar( pkg_zip( name = "libtorchtrt_zip", srcs = [ + ":include_core_zip", + ":include_zip", + ":lib_zip", "//:LICENSE", "//third_party/torch_tensorrt:BUILD", ], + out = "libtorchtrt.zip", package_dir = "torch_tensorrt", - deps = [ - ":include", - ":include_core", - ":lib", - ], ) # Non-Windows tar target @@ -118,6 +159,7 @@ pkg_tar( "//:LICENSE", "//third_party/torch_tensorrt:BUILD", ], + out = "libtorchtrt.tar.gz", extension = "tar.gz", package_dir = "torch_tensorrt", deps = [ @@ -142,14 +184,13 @@ alias( pkg_zip( name = "libtorchtrt_runtime_zip", srcs = [ + ":include_rt_zip", + ":lib_rt_zip", "//:LICENSE", "//third_party/torch_tensorrt:BUILD", ], + out = "libtorchtrt_runtime.zip", package_dir = "torch_tensorrt_runtime", - deps = [ - ":include_rt", - ":lib_rt", - ], ) # Non-Windows tar target for runtime @@ -159,6 +200,7 @@ pkg_tar( "//:LICENSE", "//third_party/torch_tensorrt:BUILD", ], + out = "libtorchtrt_runtime.tar.gz", extension = "tar.gz", package_dir = "torch_tensorrt_runtime", deps = [ @@ -167,7 +209,7 @@ pkg_tar( ], ) -# Main runtime target that selects between zip and tar based on platform +# Main target that selects between zip and tar based on platform alias( name = "libtorchtrt_runtime", actual = select({ diff --git a/core/BUILD b/core/BUILD index c6744c66c1..2cd415f881 100644 --- a/core/BUILD +++ b/core/BUILD @@ -1,5 +1,5 @@ load("@rules_cc//cc:defs.bzl", "cc_library") -load("@rules_pkg//:pkg.bzl", "pkg_tar") +load("@rules_pkg//:pkg.bzl", "pkg_tar", "pkg_zip") package(default_visibility = ["//visibility:public"]) @@ -103,3 +103,12 @@ pkg_tar( ], package_dir = "core/", ) + +pkg_zip( + name = "include_zip", + srcs = [ + "compiler.h", + ], + out = "include.zip", + package_dir = "core/", +) diff --git a/core/plugins/BUILD b/core/plugins/BUILD index 00503552f2..ec32cc2ed5 100644 --- a/core/plugins/BUILD +++ b/core/plugins/BUILD @@ -1,5 +1,5 @@ load("@rules_cc//cc:defs.bzl", "cc_library") -load("@rules_pkg//:pkg.bzl", "pkg_tar") +load("@rules_pkg//:pkg.bzl", "pkg_tar", "pkg_zip") package(default_visibility = ["//visibility:public"]) @@ -129,3 +129,20 @@ pkg_tar( ], package_dir = "core/plugins/impl", ) + +pkg_zip( + name = "include_zip", + srcs = ["plugins.h"], + out = "include.zip", + package_dir = "core/plugins/", +) + +pkg_zip( + name = "impl_include_zip", + srcs = [ + "impl/interpolate_plugin.h", + "impl/normalize_plugin.h", + ], + out = "impl_include.zip", + package_dir = "core/plugins/impl", +) diff --git a/core/runtime/BUILD b/core/runtime/BUILD index a573cfed78..18ab76f7c1 100644 --- a/core/runtime/BUILD +++ b/core/runtime/BUILD @@ -1,5 +1,5 @@ load("@rules_cc//cc:defs.bzl", "cc_library") -load("@rules_pkg//:pkg.bzl", "pkg_tar") +load("@rules_pkg//:pkg.bzl", "pkg_tar", "pkg_zip") package(default_visibility = ["//visibility:public"]) @@ -111,3 +111,16 @@ pkg_tar( ], package_dir = "core/runtime/", ) + +pkg_zip( + name = "include_zip", + srcs = [ + "Platform.h", + "RTDevice.h", + "TRTEngine.h", + "TRTEngineProfiler.h", + "runtime.h", + ], + out = "include.zip", + package_dir = "core/runtime/", +) diff --git a/core/util/BUILD b/core/util/BUILD index 0ed97a5eda..527bed4c04 100644 --- a/core/util/BUILD +++ b/core/util/BUILD @@ -1,5 +1,5 @@ load("@rules_cc//cc:defs.bzl", "cc_library") -load("@rules_pkg//:pkg.bzl", "pkg_tar") +load("@rules_pkg//:pkg.bzl", "pkg_tar", "pkg_zip") package(default_visibility = ["//visibility:public"]) @@ -165,3 +165,17 @@ pkg_tar( ], package_dir = "core/util/", ) + +pkg_zip( + name = "include_zip", + srcs = [ + "//core/util:Exception.h", + "//core/util:build_info.h", + "//core/util:jit_util.h", + "//core/util:macros.h", + "//core/util:prelude.h", + "//core/util:trt_util.h", + ], + out = "include.zip", + package_dir = "core/util/", +) diff --git a/core/util/logging/BUILD b/core/util/logging/BUILD index 1ac834b021..0d409df172 100644 --- a/core/util/logging/BUILD +++ b/core/util/logging/BUILD @@ -1,5 +1,5 @@ load("@rules_cc//cc:defs.bzl", "cc_library") -load("@rules_pkg//:pkg.bzl", "pkg_tar") +load("@rules_pkg//:pkg.bzl", "pkg_tar", "pkg_zip") package(default_visibility = ["//visibility:public"]) @@ -85,3 +85,10 @@ pkg_tar( srcs = ["TorchTRTLogger.h"], package_dir = "core/util/logging", ) + +pkg_zip( + name = "include_zip", + srcs = ["TorchTRTLogger.h"], + out = "include.zip", + package_dir = "core/util/logging", +) From c14654a137d5e655b2f3657a1da4a8490ec3a15f Mon Sep 17 00:00:00 2001 From: lanluo-nvidia Date: Fri, 29 Aug 2025 11:26:48 -0700 Subject: [PATCH 08/15] test --- .github/workflows/release-linux-aarch64.yml | 1 + .github/workflows/release-linux-x86_64.yml | 1 + .github/workflows/release-windows.yml | 1 + 3 files changed, 3 insertions(+) diff --git a/.github/workflows/release-linux-aarch64.yml b/.github/workflows/release-linux-aarch64.yml index d619f618a2..d3f329da3a 100644 --- a/.github/workflows/release-linux-aarch64.yml +++ b/.github/workflows/release-linux-aarch64.yml @@ -1,6 +1,7 @@ name: Release aarch64 Linux wheels and tarball artifacts on: + pull_request: push: tags: # NOTE: Binary build pipelines should only get triggered on release candidate builds diff --git a/.github/workflows/release-linux-x86_64.yml b/.github/workflows/release-linux-x86_64.yml index 320bd78a4a..f38ad88d80 100644 --- a/.github/workflows/release-linux-x86_64.yml +++ b/.github/workflows/release-linux-x86_64.yml @@ -1,6 +1,7 @@ name: Release x86_64 Linux wheels and tarball artifacts on: + pull_request: push: tags: # NOTE: Binary build pipelines should only get triggered on release candidate builds diff --git a/.github/workflows/release-windows.yml b/.github/workflows/release-windows.yml index 49dad0bcd8..5273b9990e 100644 --- a/.github/workflows/release-windows.yml +++ b/.github/workflows/release-windows.yml @@ -1,6 +1,7 @@ name: Release Windows wheels artifacts on: + pull_request: push: tags: # NOTE: Binary build pipelines should only get triggered on release candidate builds From 1a0f8cc124642ee1ae648a399a4ffef9cb77fafb Mon Sep 17 00:00:00 2001 From: lanluo-nvidia Date: Fri, 29 Aug 2025 12:46:55 -0700 Subject: [PATCH 09/15] test --- .github/workflows/build_wheels_windows.yml | 9 +++--- .github/workflows/release-linux-aarch64.yml | 2 +- .github/workflows/release-windows.yml | 32 +++++++++------------ 3 files changed, 20 insertions(+), 23 deletions(-) diff --git a/.github/workflows/build_wheels_windows.yml b/.github/workflows/build_wheels_windows.yml index 8eab386033..12735bed0e 100644 --- a/.github/workflows/build_wheels_windows.yml +++ b/.github/workflows/build_wheels_windows.yml @@ -295,8 +295,9 @@ jobs: mkdir -p release/tarball TRT_VERSION=$(cat dev_dep_versions.yml | grep __tensorrt_version__ | sed 's/__tensorrt_version__: //g' | sed 's/"//g') bazel build //:libtorchtrt --compilation_mode opt --config=windows - cp bazel-bin/libtorchtrt.tar.gz \ - release/tarball/libtorchtrt-${BUILD_VERSION}-tensorrt${TRT_VERSION}-cuda${CU_VERSION:2}-libtorch${PYTORCH_VERSION}-x86_64-windows.tar.gz + ls -lart bazel-bin/ + cp bazel-bin/libtorchtrt.zip\ + release/tarball/libtorchtrt-${BUILD_VERSION}-tensorrt${TRT_VERSION}-cuda${CU_VERSION:2}-libtorch${PYTORCH_VERSION}-x86_64-windows.zip return 0 fi fi @@ -334,7 +335,7 @@ jobs: source "${BUILD_ENV_FILE}" ${CONDA_RUN} ${ENV_SCRIPT} ${POST_SCRIPT} - name: Smoke Test X64 - if: inputs.architecture == 'x64' + if: ${{ inputs.architecture == 'x64' && inputs.is-release-tarball == false }} env: ENV_SCRIPT: ${{ inputs.env-script }} PACKAGE_NAME: ${{ inputs.package-name }} @@ -421,5 +422,5 @@ jobs: architecture: ${{ inputs.architecture }} concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}-${{ inputs.repository }}-${{ github.event_name == 'workflow_dispatch' }} + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}-${{ inputs.repository }}-${{ inputs.is-release-wheel }}-${{ inputs.is-release-tarball }}-${{ github.event_name == 'workflow_dispatch' }} cancel-in-progress: true \ No newline at end of file diff --git a/.github/workflows/release-linux-aarch64.yml b/.github/workflows/release-linux-aarch64.yml index d3f329da3a..333a3208cd 100644 --- a/.github/workflows/release-linux-aarch64.yml +++ b/.github/workflows/release-linux-aarch64.yml @@ -20,7 +20,7 @@ jobs: if: ${{ contains(github.event.pull_request.labels.*.name, 'build-release-artifacts') || startsWith(github.event.ref, 'refs/tags/v') }} with: package-type: wheel - os: linux + os: linux-aarch64 test-infra-repository: pytorch/test-infra test-infra-ref: main with-rocm: false diff --git a/.github/workflows/release-windows.yml b/.github/workflows/release-windows.yml index 5273b9990e..7116610983 100644 --- a/.github/workflows/release-windows.yml +++ b/.github/workflows/release-windows.yml @@ -26,20 +26,8 @@ jobs: with-rocm: false with-cpu: false - substitute-runner: - needs: generate-matrix - outputs: - matrix: ${{ steps.substitute.outputs.matrix }} - runs-on: ubuntu-latest - steps: - - name: Substitute runner - id: substitute - run: | - echo matrix="$(echo '${{ needs.generate-release-matrix.outputs.matrix }}' | sed -e 's/windows.g4dn.xlarge/windows.g5.4xlarge.nvidia.gpu/g')" >> ${GITHUB_OUTPUT} - - generate-release-tarball-matrix: - needs: [substitute-runner] + needs: [generate-matrix] outputs: matrix: ${{ steps.generate.outputs.matrix }} runs-on: ubuntu-latest @@ -54,13 +42,16 @@ jobs: id: generate run: | set -eou pipefail - MATRIX_BLOB=${{ toJSON(needs.substitute-runner.outputs.matrix) }} + MATRIX_BLOB=${{ toJSON(needs.generate-matrix.outputs.matrix) }} MATRIX_BLOB="$(python3 .github/scripts/generate-release-matrix.py --tarball_matrix "${MATRIX_BLOB}")" echo "${MATRIX_BLOB}" - echo "matrix=${MATRIX_BLOB}" >> "${GITHUB_OUTPUT}" + substitute_matrix="$(echo "${MATRIX_BLOB}" | sed -e 's/windows.g4dn.xlarge/windows.g5.4xlarge.nvidia.gpu/g')" + + echo matrix="$(echo "${substitute_matrix}")" >> ${GITHUB_OUTPUT} + generate-release-wheel-matrix: - needs: [substitute-runner] + needs: [generate-matrix] outputs: matrix: ${{ steps.generate.outputs.matrix }} runs-on: ubuntu-latest @@ -75,10 +66,15 @@ jobs: id: generate run: | set -eou pipefail - MATRIX_BLOB=${{ toJSON(needs.substitute-runner.outputs.matrix) }} + MATRIX_BLOB=${{ toJSON(needs.generate-matrix.outputs.matrix) }} MATRIX_BLOB="$(python3 .github/scripts/generate-release-matrix.py --wheel_matrix "${MATRIX_BLOB}")" + echo "****MATRIX_BLOB****" echo "${MATRIX_BLOB}" - echo "matrix=${MATRIX_BLOB}" >> "${GITHUB_OUTPUT}" + + substitute_matrix="$(echo "${MATRIX_BLOB}" | sed -e 's/windows.g4dn.xlarge/windows.g5.4xlarge.nvidia.gpu/g')" + echo "****substitute_matrix****" + echo "${substitute_matrix}" + echo "matrix=${substitute_matrix}" >> "${GITHUB_OUTPUT}" release-cxx11-tarball-artifacts: From e6f26570f6a01534c1f596d1a4e774b2939477eb Mon Sep 17 00:00:00 2001 From: lanluo-nvidia Date: Fri, 29 Aug 2025 13:19:46 -0700 Subject: [PATCH 10/15] sbsa use sbsa container image for release build --- .github/scripts/generate-release-matrix.py | 11 +++++++---- third_party/libtorch/BUILD | 1 + 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/scripts/generate-release-matrix.py b/.github/scripts/generate-release-matrix.py index 7b9e0263dd..9f740c2f4f 100644 --- a/.github/scripts/generate-release-matrix.py +++ b/.github/scripts/generate-release-matrix.py @@ -12,6 +12,7 @@ "wheel": ["3.10", "3.11", "3.12", "3.13"], "tarball": ["3.11"], } +sbsa_container_image: str = "quay.io/pypa/manylinux_2_34_aarch64" CXX11_TARBALL_CONTAINER_IMAGE = { "cu129": "pytorch/libtorch-cxx11-builder:cuda12.9-main", @@ -56,10 +57,12 @@ def main(args: list[str]) -> None: item["desired_cuda"] in cuda_versions and item["python_version"] in python_versions ): - if options.tarball_matrix != "": - item["container_image"] = CXX11_TARBALL_CONTAINER_IMAGE[ - item["desired_cuda"] - ] + if item["gpu_arch_type"] == "cuda-aarch64": + item["container_image"] = sbsa_container_image + # if options.tarball_matrix != "": + # item["container_image"] = CXX11_TARBALL_CONTAINER_IMAGE[ + # item["desired_cuda"] + # ] filtered_includes.append(item) filtered_matrix_dict = {} filtered_matrix_dict["include"] = filtered_includes diff --git a/third_party/libtorch/BUILD b/third_party/libtorch/BUILD index 46de7dd8d0..37309f7209 100644 --- a/third_party/libtorch/BUILD +++ b/third_party/libtorch/BUILD @@ -35,6 +35,7 @@ cc_library( [ "include/torch/**/*.h", ], + allow_empty = True, exclude = [ "include/torch/csrc/api/include/**/*.h", ], From 260ca74e6d7cd5f60ba56469fa59dab3bb180058 Mon Sep 17 00:00:00 2001 From: lanluo-nvidia Date: Fri, 29 Aug 2025 13:51:01 -0700 Subject: [PATCH 11/15] rename zip tarball name --- .github/workflows/build_wheels_linux.yml | 4 ++-- .github/workflows/build_wheels_windows.yml | 4 ++-- .github/workflows/release-linux-aarch64.yml | 4 ++-- .github/workflows/release-linux-x86_64.yml | 4 ++-- .github/workflows/release-windows.yml | 12 ++++++------ 5 files changed, 14 insertions(+), 14 deletions(-) diff --git a/.github/workflows/build_wheels_linux.yml b/.github/workflows/build_wheels_linux.yml index bdcff46256..32dd21de82 100644 --- a/.github/workflows/build_wheels_linux.yml +++ b/.github/workflows/build_wheels_linux.yml @@ -385,12 +385,12 @@ jobs: with: name: ${{ env.ARTIFACT_NAME }} path: ${{ inputs.repository }}/dist/ - - name: Upload tarball to GitHub + - name: Upload cxx11 tarball to GitHub if: ${{ inputs.is-release-tarball == true }} continue-on-error: true uses: actions/upload-artifact@v4 with: - name: ${{ env.ARTIFACT_NAME }} + name: cxx11-tarball-${{ env.PYTHON_VERSION }}-${{ env.CU_VERSION }} path: ${{ inputs.repository }}/release/tarball/ upload: diff --git a/.github/workflows/build_wheels_windows.yml b/.github/workflows/build_wheels_windows.yml index 12735bed0e..6fbd343fdb 100644 --- a/.github/workflows/build_wheels_windows.yml +++ b/.github/workflows/build_wheels_windows.yml @@ -395,12 +395,12 @@ jobs: with: name: ${{ env.ARTIFACT_NAME }} path: ${{ inputs.repository }}/dist/ - - name: Upload tarball to GitHub + - name: Upload zip artifact to GitHub if: ${{ inputs.is-release-tarball == true }} continue-on-error: true uses: actions/upload-artifact@v4 with: - name: ${{ env.ARTIFACT_NAME }} + name: cxx11-zip-${{ env.PYTHON_VERSION }}-${{ env.CU_VERSION }} path: ${{ inputs.repository }}/release/tarball/ - uses: ./test-infra/.github/actions/teardown-windows if: inputs.architecture == 'x64' diff --git a/.github/workflows/release-linux-aarch64.yml b/.github/workflows/release-linux-aarch64.yml index 333a3208cd..8a80050fba 100644 --- a/.github/workflows/release-linux-aarch64.yml +++ b/.github/workflows/release-linux-aarch64.yml @@ -49,7 +49,7 @@ jobs: release-cxx11-tarball-artifacts: needs: [generate-release-tarball-matrix] - name: Release torch-tensorrt cxx11 tarball artifacts + name: Release aarch64 torch-tensorrt cxx11 tarball artifacts strategy: fail-fast: false matrix: @@ -99,7 +99,7 @@ jobs: echo "matrix=${MATRIX_BLOB}" >> "${GITHUB_OUTPUT}" release-wheel-artifacts: - name: Release torch-tensorrt wheel artifacts + name: Release aarch64 torch-tensorrt wheel artifacts needs: [generate-release-wheel-matrix] strategy: fail-fast: false diff --git a/.github/workflows/release-linux-x86_64.yml b/.github/workflows/release-linux-x86_64.yml index f38ad88d80..e98ecdb848 100644 --- a/.github/workflows/release-linux-x86_64.yml +++ b/.github/workflows/release-linux-x86_64.yml @@ -49,7 +49,7 @@ jobs: release-cxx11-tarball-artifacts: needs: [generate-release-tarball-matrix] - name: Release torch-tensorrt cxx11 tarball artifacts + name: Release x86_64 torch-tensorrt cxx11 tarball artifacts strategy: fail-fast: false matrix: @@ -98,7 +98,7 @@ jobs: echo "matrix=${MATRIX_BLOB}" >> "${GITHUB_OUTPUT}" release-wheel-artifacts: - name: Release torch-tensorrt wheel artifacts + name: Release x86_64 torch-tensorrt wheel artifacts needs: [generate-release-wheel-matrix] strategy: fail-fast: false diff --git a/.github/workflows/release-windows.yml b/.github/workflows/release-windows.yml index 7116610983..a12e437712 100644 --- a/.github/workflows/release-windows.yml +++ b/.github/workflows/release-windows.yml @@ -26,7 +26,7 @@ jobs: with-rocm: false with-cpu: false - generate-release-tarball-matrix: + generate-release-zip-matrix: needs: [generate-matrix] outputs: matrix: ${{ steps.generate.outputs.matrix }} @@ -77,9 +77,9 @@ jobs: echo "matrix=${substitute_matrix}" >> "${GITHUB_OUTPUT}" - release-cxx11-tarball-artifacts: - needs: [generate-release-tarball-matrix] - name: Release torch-tensorrt cxx11 tarball artifacts + release-cxx11-zip-artifacts: + needs: [generate-release-zip-matrix] + name: Release Windows torch-tensorrt cxx11 zip artifacts strategy: fail-fast: false matrix: @@ -96,7 +96,7 @@ jobs: ref: "" test-infra-repository: pytorch/test-infra test-infra-ref: main - build-matrix: ${{ needs.generate-release-tarball-matrix.outputs.matrix }} + build-matrix: ${{ needs.generate-release-zip-matrix.outputs.matrix }} pre-script: ${{ matrix.pre-script }} env-script: ${{ matrix.env-var-script }} package-name: ${{ matrix.package-name }} @@ -105,7 +105,7 @@ jobs: release-wheel-artifacts: needs: [generate-release-wheel-matrix] - name: Release torch-tensorrt wheel artifacts + name: Release Windows torch-tensorrt wheel artifacts strategy: fail-fast: false matrix: From 4c2f4efbbe183d968415d2a6d49086e06171d3e2 Mon Sep 17 00:00:00 2001 From: lanluo-nvidia Date: Fri, 29 Aug 2025 16:28:09 -0700 Subject: [PATCH 12/15] test --- BUILD.bazel | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/BUILD.bazel b/BUILD.bazel index 5350ce5ac4..3d42625deb 100644 --- a/BUILD.bazel +++ b/BUILD.bazel @@ -152,7 +152,7 @@ pkg_zip( package_dir = "torch_tensorrt", ) -# Non-Windows tar target +# tar target pkg_tar( name = "libtorchtrt_tar", srcs = [ @@ -163,11 +163,14 @@ pkg_tar( extension = "tar.gz", package_dir = "torch_tensorrt", deps = [ - ":bin", ":include", ":include_core", ":lib", - ], + ] + select({ + ":rtx_win": [], + ":windows": [], + "//conditions:default": [":bin"], + }), ) # Main target that selects between zip and tar based on platform From 6238fb569026e67874c4572072722b90607e3cfd Mon Sep 17 00:00:00 2001 From: lanluo-nvidia Date: Tue, 2 Sep 2025 08:32:32 -0700 Subject: [PATCH 13/15] test --- .github/workflows/build-test-linux-aarch64-jetpack.yml | 2 +- .github/workflows/build-test-linux-aarch64.yml | 2 +- .github/workflows/build-test-linux-x86_64.yml | 2 +- .github/workflows/build-test-linux-x86_64_rtx.yml | 2 +- .github/workflows/build-test-windows.yml | 2 +- .github/workflows/build-test-windows_rtx.yml | 2 +- .github/workflows/release-linux-aarch64.yml | 1 - .github/workflows/release-linux-x86_64.yml | 1 - .github/workflows/release-windows.yml | 1 - 9 files changed, 6 insertions(+), 9 deletions(-) diff --git a/.github/workflows/build-test-linux-aarch64-jetpack.yml b/.github/workflows/build-test-linux-aarch64-jetpack.yml index 3d4bcf50db..9523872acf 100644 --- a/.github/workflows/build-test-linux-aarch64-jetpack.yml +++ b/.github/workflows/build-test-linux-aarch64-jetpack.yml @@ -1,7 +1,7 @@ name: Build and test Linux aarch64 wheels for Jetpack on: - #pull_request: + pull_request: push: branches: - main diff --git a/.github/workflows/build-test-linux-aarch64.yml b/.github/workflows/build-test-linux-aarch64.yml index 3a353c3a1c..a2b2a78db9 100644 --- a/.github/workflows/build-test-linux-aarch64.yml +++ b/.github/workflows/build-test-linux-aarch64.yml @@ -1,7 +1,7 @@ name: Build and test Linux aarch64 wheels on: - #pull_request: + pull_request: push: branches: - main diff --git a/.github/workflows/build-test-linux-x86_64.yml b/.github/workflows/build-test-linux-x86_64.yml index 5662810818..3998eab0e7 100644 --- a/.github/workflows/build-test-linux-x86_64.yml +++ b/.github/workflows/build-test-linux-x86_64.yml @@ -1,7 +1,7 @@ name: Build and test Linux x86_64 wheels on: - #pull_request: + pull_request: push: branches: - main diff --git a/.github/workflows/build-test-linux-x86_64_rtx.yml b/.github/workflows/build-test-linux-x86_64_rtx.yml index d278069b2d..1f9b605584 100644 --- a/.github/workflows/build-test-linux-x86_64_rtx.yml +++ b/.github/workflows/build-test-linux-x86_64_rtx.yml @@ -1,7 +1,7 @@ name: RTX - Build and test Linux x86_64 wheels on: - #pull_request: + pull_request: push: branches: - main diff --git a/.github/workflows/build-test-windows.yml b/.github/workflows/build-test-windows.yml index 647364e70e..ca39f8cb5f 100644 --- a/.github/workflows/build-test-windows.yml +++ b/.github/workflows/build-test-windows.yml @@ -1,7 +1,7 @@ name: Build and test Windows wheels on: - #pull_request: + pull_request: push: branches: - main diff --git a/.github/workflows/build-test-windows_rtx.yml b/.github/workflows/build-test-windows_rtx.yml index 3c401d1b21..137adb252c 100644 --- a/.github/workflows/build-test-windows_rtx.yml +++ b/.github/workflows/build-test-windows_rtx.yml @@ -1,7 +1,7 @@ name: RTX - Build and test Windows wheels on: - #pull_request: + pull_request: push: branches: - main diff --git a/.github/workflows/release-linux-aarch64.yml b/.github/workflows/release-linux-aarch64.yml index 8a80050fba..8b3190124b 100644 --- a/.github/workflows/release-linux-aarch64.yml +++ b/.github/workflows/release-linux-aarch64.yml @@ -1,7 +1,6 @@ name: Release aarch64 Linux wheels and tarball artifacts on: - pull_request: push: tags: # NOTE: Binary build pipelines should only get triggered on release candidate builds diff --git a/.github/workflows/release-linux-x86_64.yml b/.github/workflows/release-linux-x86_64.yml index e98ecdb848..cbffc520ad 100644 --- a/.github/workflows/release-linux-x86_64.yml +++ b/.github/workflows/release-linux-x86_64.yml @@ -1,7 +1,6 @@ name: Release x86_64 Linux wheels and tarball artifacts on: - pull_request: push: tags: # NOTE: Binary build pipelines should only get triggered on release candidate builds diff --git a/.github/workflows/release-windows.yml b/.github/workflows/release-windows.yml index a12e437712..590fd00fe9 100644 --- a/.github/workflows/release-windows.yml +++ b/.github/workflows/release-windows.yml @@ -1,7 +1,6 @@ name: Release Windows wheels artifacts on: - pull_request: push: tags: # NOTE: Binary build pipelines should only get triggered on release candidate builds From b7ca962b93ceb58c1fb5f3d1203179c1076bc157 Mon Sep 17 00:00:00 2001 From: lanluo-nvidia Date: Wed, 3 Sep 2025 08:57:08 -0700 Subject: [PATCH 14/15] add filegroup to remove duplicated file lists in pkg_tar and pkg_zip --- core/plugins/BUILD | 31 ++++++++++++++++++++----------- core/runtime/BUILD | 18 +++++++++--------- core/util/BUILD | 31 +++++++++++++++---------------- 3 files changed, 44 insertions(+), 36 deletions(-) diff --git a/core/plugins/BUILD b/core/plugins/BUILD index ec32cc2ed5..37a9a47003 100644 --- a/core/plugins/BUILD +++ b/core/plugins/BUILD @@ -115,19 +115,16 @@ cc_library( alwayslink = True, ) -pkg_tar( - name = "include", +filegroup( + name = "include_files", srcs = ["plugins.h"], - package_dir = "core/plugins/", + visibility = ["//visibility:public"], ) pkg_tar( - name = "impl_include", - srcs = [ - "impl/interpolate_plugin.h", - "impl/normalize_plugin.h", - ], - package_dir = "core/plugins/impl", + name = "include", + srcs = [":include_files"], + package_dir = "core/plugins/", ) pkg_zip( @@ -137,12 +134,24 @@ pkg_zip( package_dir = "core/plugins/", ) -pkg_zip( - name = "impl_include_zip", +filegroup( + name = "impl_include_files", srcs = [ "impl/interpolate_plugin.h", "impl/normalize_plugin.h", ], + visibility = ["//visibility:public"], +) + +pkg_tar( + name = "impl_include", + srcs = [":impl_include_files"], + package_dir = "core/plugins/impl", +) + +pkg_zip( + name = "impl_include_zip", + srcs = [":impl_include_files"], out = "impl_include.zip", package_dir = "core/plugins/impl", ) diff --git a/core/runtime/BUILD b/core/runtime/BUILD index 18ab76f7c1..95576aa18b 100644 --- a/core/runtime/BUILD +++ b/core/runtime/BUILD @@ -100,8 +100,8 @@ cc_library( alwayslink = True, ) -pkg_tar( - name = "include", +filegroup( + name = "include_files", srcs = [ "Platform.h", "RTDevice.h", @@ -109,18 +109,18 @@ pkg_tar( "TRTEngineProfiler.h", "runtime.h", ], + visibility = ["//visibility:public"], +) + +pkg_tar( + name = "include", + srcs = [":include_files"], package_dir = "core/runtime/", ) pkg_zip( name = "include_zip", - srcs = [ - "Platform.h", - "RTDevice.h", - "TRTEngine.h", - "TRTEngineProfiler.h", - "runtime.h", - ], + srcs = [":include_files"], out = "include.zip", package_dir = "core/runtime/", ) diff --git a/core/util/BUILD b/core/util/BUILD index 527bed4c04..8245e1c14a 100644 --- a/core/util/BUILD +++ b/core/util/BUILD @@ -153,29 +153,28 @@ cc_library( alwayslink = True, ) -pkg_tar( - name = "include", +filegroup( + name = "include_files", srcs = [ - "//core/util:Exception.h", - "//core/util:build_info.h", - "//core/util:jit_util.h", - "//core/util:macros.h", - "//core/util:prelude.h", - "//core/util:trt_util.h", + "Exception.h", + "build_info.h", + "jit_util.h", + "macros.h", + "prelude.h", + "trt_util.h", ], + visibility = ["//visibility:public"], +) + +pkg_tar( + name = "include", + srcs = ["//core/util:include_files"], package_dir = "core/util/", ) pkg_zip( name = "include_zip", - srcs = [ - "//core/util:Exception.h", - "//core/util:build_info.h", - "//core/util:jit_util.h", - "//core/util:macros.h", - "//core/util:prelude.h", - "//core/util:trt_util.h", - ], + srcs = ["//core/util:include_files"], out = "include.zip", package_dir = "core/util/", ) From 51f0682cb1e308c4bdbe10b2b0fa10d719c7e7f1 Mon Sep 17 00:00:00 2001 From: lanluo-nvidia Date: Wed, 3 Sep 2025 17:44:25 -0700 Subject: [PATCH 15/15] rename build_wheels_linux|windows.yml to build_linux|windows.yml --- .github/workflows/build-test-linux-aarch64-jetpack.yml | 2 +- .github/workflows/build-test-linux-aarch64.yml | 2 +- .github/workflows/build-test-linux-x86_64.yml | 2 +- .github/workflows/build-test-linux-x86_64_rtx.yml | 2 +- .github/workflows/build-test-windows.yml | 2 +- .github/workflows/build-test-windows_rtx.yml | 2 +- .github/workflows/{build_wheels_linux.yml => build_linux.yml} | 0 .../workflows/{build_wheels_windows.yml => build_windows.yml} | 0 .github/workflows/release-linux-aarch64.yml | 4 ++-- .github/workflows/release-linux-x86_64.yml | 4 ++-- .github/workflows/release-windows.yml | 4 ++-- 11 files changed, 12 insertions(+), 12 deletions(-) rename .github/workflows/{build_wheels_linux.yml => build_linux.yml} (100%) rename .github/workflows/{build_wheels_windows.yml => build_windows.yml} (100%) diff --git a/.github/workflows/build-test-linux-aarch64-jetpack.yml b/.github/workflows/build-test-linux-aarch64-jetpack.yml index 9523872acf..ff827ad3f6 100644 --- a/.github/workflows/build-test-linux-aarch64-jetpack.yml +++ b/.github/workflows/build-test-linux-aarch64-jetpack.yml @@ -66,7 +66,7 @@ jobs: smoke-test-script: packaging/smoke_test_script.sh package-name: torch_tensorrt name: Build torch-tensorrt whl package for jetpack - uses: ./.github/workflows/build_wheels_linux.yml + uses: ./.github/workflows/build_linux.yml with: repository: ${{ matrix.repository }} ref: "" diff --git a/.github/workflows/build-test-linux-aarch64.yml b/.github/workflows/build-test-linux-aarch64.yml index a2b2a78db9..2604d18f92 100644 --- a/.github/workflows/build-test-linux-aarch64.yml +++ b/.github/workflows/build-test-linux-aarch64.yml @@ -63,7 +63,7 @@ jobs: smoke-test-script: packaging/smoke_test_script.sh package-name: torch_tensorrt name: Build torch-tensorrt whl package for SBSA - uses: ./.github/workflows/build_wheels_linux.yml + uses: ./.github/workflows/build_linux.yml with: repository: ${{ matrix.repository }} ref: "" diff --git a/.github/workflows/build-test-linux-x86_64.yml b/.github/workflows/build-test-linux-x86_64.yml index 3998eab0e7..b1630c03be 100644 --- a/.github/workflows/build-test-linux-x86_64.yml +++ b/.github/workflows/build-test-linux-x86_64.yml @@ -62,7 +62,7 @@ jobs: smoke-test-script: packaging/smoke_test_script.sh package-name: torch_tensorrt name: Build torch-tensorrt whl package for Linux x86_64 - uses: ./.github/workflows/build_wheels_linux.yml + uses: ./.github/workflows/build_linux.yml with: repository: ${{ matrix.repository }} ref: "" diff --git a/.github/workflows/build-test-linux-x86_64_rtx.yml b/.github/workflows/build-test-linux-x86_64_rtx.yml index 1f9b605584..67eecef0e9 100644 --- a/.github/workflows/build-test-linux-x86_64_rtx.yml +++ b/.github/workflows/build-test-linux-x86_64_rtx.yml @@ -61,7 +61,7 @@ jobs: smoke-test-script: packaging/smoke_test_script.sh package-name: torch_tensorrt name: RTX - Build torch-tensorrt-rtx whl package for Linux x86_64 - uses: ./.github/workflows/build_wheels_linux.yml + uses: ./.github/workflows/build_linux.yml with: repository: ${{ matrix.repository }} ref: "" diff --git a/.github/workflows/build-test-windows.yml b/.github/workflows/build-test-windows.yml index ca39f8cb5f..39c3d20571 100644 --- a/.github/workflows/build-test-windows.yml +++ b/.github/workflows/build-test-windows.yml @@ -71,7 +71,7 @@ jobs: smoke-test-script: packaging/smoke_test_windows.py package-name: torch_tensorrt name: Build torch-tensorrt whl package for Windows - uses: ./.github/workflows/build_wheels_windows.yml + uses: ./.github/workflows/build_windows.yml with: repository: ${{ matrix.repository }} ref: "" diff --git a/.github/workflows/build-test-windows_rtx.yml b/.github/workflows/build-test-windows_rtx.yml index 137adb252c..88d347501d 100644 --- a/.github/workflows/build-test-windows_rtx.yml +++ b/.github/workflows/build-test-windows_rtx.yml @@ -71,7 +71,7 @@ jobs: smoke-test-script: packaging/smoke_test_windows.py package-name: torch_tensorrt name: RTX - Build torch-tensorrt-rtx whl package for Windows - uses: ./.github/workflows/build_wheels_windows.yml + uses: ./.github/workflows/build_windows.yml with: repository: ${{ matrix.repository }} ref: "" diff --git a/.github/workflows/build_wheels_linux.yml b/.github/workflows/build_linux.yml similarity index 100% rename from .github/workflows/build_wheels_linux.yml rename to .github/workflows/build_linux.yml diff --git a/.github/workflows/build_wheels_windows.yml b/.github/workflows/build_windows.yml similarity index 100% rename from .github/workflows/build_wheels_windows.yml rename to .github/workflows/build_windows.yml diff --git a/.github/workflows/release-linux-aarch64.yml b/.github/workflows/release-linux-aarch64.yml index 8b3190124b..065962ab3a 100644 --- a/.github/workflows/release-linux-aarch64.yml +++ b/.github/workflows/release-linux-aarch64.yml @@ -60,7 +60,7 @@ jobs: post-script: packaging/post_build_script.sh smoke-test-script: packaging/smoke_test_script.sh is-release-tarball: "true" - uses: ./.github/workflows/build_wheels_linux.yml + uses: ./.github/workflows/build_linux.yml with: repository: ${{ matrix.repository }} ref: "" @@ -111,7 +111,7 @@ jobs: post-script: packaging/post_build_script.sh smoke-test-script: packaging/smoke_test_script.sh is-release-wheel: true - uses: ./.github/workflows/build_wheels_linux.yml + uses: ./.github/workflows/build_linux.yml with: repository: ${{ matrix.repository }} ref: "" diff --git a/.github/workflows/release-linux-x86_64.yml b/.github/workflows/release-linux-x86_64.yml index cbffc520ad..fae96128c9 100644 --- a/.github/workflows/release-linux-x86_64.yml +++ b/.github/workflows/release-linux-x86_64.yml @@ -60,7 +60,7 @@ jobs: post-script: packaging/post_build_script.sh smoke-test-script: packaging/smoke_test_script.sh is-release-tarball: "true" - uses: ./.github/workflows/build_wheels_linux.yml + uses: ./.github/workflows/build_linux.yml with: repository: ${{ matrix.repository }} ref: "" @@ -110,7 +110,7 @@ jobs: post-script: packaging/post_build_script.sh smoke-test-script: packaging/smoke_test_script.sh is-release-wheel: true - uses: ./.github/workflows/build_wheels_linux.yml + uses: ./.github/workflows/build_linux.yml with: repository: ${{ matrix.repository }} ref: "" diff --git a/.github/workflows/release-windows.yml b/.github/workflows/release-windows.yml index 590fd00fe9..fc70b83f96 100644 --- a/.github/workflows/release-windows.yml +++ b/.github/workflows/release-windows.yml @@ -89,7 +89,7 @@ jobs: env-script: packaging/vc_env_helper.bat smoke-test-script: packaging/smoke_test_windows.py is-release-tarball: true - uses: ./.github/workflows/build_wheels_windows.yml + uses: ./.github/workflows/build_windows.yml with: repository: ${{ matrix.repository }} ref: "" @@ -115,7 +115,7 @@ jobs: smoke-test-script: packaging/smoke_test_windows.py package-name: torch_tensorrt is-release-wheel: true - uses: ./.github/workflows/build_wheels_windows.yml + uses: ./.github/workflows/build_windows.yml with: repository: ${{ matrix.repository }} ref: ""