2025-10-04 nightly release (45e56e9444c3ad37b7f7148281ba18e5dc7f9db3) #5148
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and test Windows wheels | |
on: | |
pull_request: | |
push: | |
branches: | |
- main | |
- nightly | |
- release/* | |
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: | |
jobs: | |
generate-matrix: | |
uses: pytorch/test-infra/.github/workflows/generate_binary_build_matrix.yml@main | |
with: | |
package-type: wheel | |
os: windows | |
test-infra-repository: pytorch/test-infra | |
test-infra-ref: main | |
with-rocm: false | |
with-cpu: false | |
filter-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 matrix | |
id: generate | |
run: | | |
set -eou pipefail | |
MATRIX_BLOB=${{ toJSON(needs.generate-matrix.outputs.matrix) }} | |
MATRIX_BLOB="$(python3 .github/scripts/filter-matrix.py --matrix "${MATRIX_BLOB}")" | |
echo "${MATRIX_BLOB}" | |
echo "matrix=${MATRIX_BLOB}" >> "${GITHUB_OUTPUT}" | |
substitute-runner: | |
needs: filter-matrix | |
outputs: | |
matrix: ${{ steps.substitute.outputs.matrix }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Substitute runner | |
id: substitute | |
run: | | |
echo matrix="$(echo '${{ needs.filter-matrix.outputs.matrix }}' | sed -e 's/windows.g4dn.xlarge/windows.g5.4xlarge.nvidia.gpu/g')" >> ${GITHUB_OUTPUT} | |
build: | |
needs: substitute-runner | |
permissions: | |
id-token: write | |
contents: read | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- repository: pytorch/tensorrt | |
pre-script: packaging/pre_build_script_windows.sh | |
env-script: packaging/vc_env_helper.bat | |
smoke-test-script: packaging/smoke_test_windows.py | |
package-name: torch_tensorrt | |
name: Build Windows torch-tensorrt whl package | |
uses: ./.github/workflows/build_windows.yml | |
with: | |
repository: ${{ matrix.repository }} | |
ref: "" | |
test-infra-repository: pytorch/test-infra | |
test-infra-ref: main | |
build-matrix: ${{ needs.substitute-runner.outputs.matrix }} | |
pre-script: ${{ matrix.pre-script }} | |
env-script: ${{ matrix.env-script }} | |
smoke-test-script: ${{ matrix.smoke-test-script }} | |
package-name: ${{ matrix.package-name }} | |
trigger-event: ${{ github.event_name }} | |
timeout: 120 | |
L0-dynamo-converter-tests: | |
name: L0 dynamo converter tests | |
needs: [substitute-runner, build] | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- repository: pytorch/tensorrt | |
package-name: torch_tensorrt | |
uses: ./.github/workflows/windows-test.yml | |
with: | |
job-name: L0-dynamo-converter-tests | |
repository: ${{ matrix.repository }} | |
ref: "" | |
test-infra-repository: pytorch/test-infra | |
test-infra-ref: main | |
build-matrix: ${{ needs.substitute-runner.outputs.matrix }} | |
pre-script: packaging/driver_upgrade.bat | |
script: | | |
set -euo pipefail | |
pushd . | |
cd tests/py/dynamo | |
../../../packaging/vc_env_helper.bat python -m pytest -ra --junitxml=${RUNNER_TEST_RESULTS_DIR}/l0_dynamo_converter_tests_results.xml -n auto --dist=loadscope --maxfail=20 conversion/ | |
popd | |
L0-dynamo-core-tests: | |
name: L0 dynamo core tests | |
needs: [substitute-runner, build] | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- repository: pytorch/tensorrt | |
package-name: torch_tensorrt | |
uses: ./.github/workflows/windows-test.yml | |
with: | |
job-name: L0-dynamo-core-tests | |
repository: ${{ matrix.repository }} | |
ref: "" | |
test-infra-repository: pytorch/test-infra | |
test-infra-ref: main | |
build-matrix: ${{ needs.substitute-runner.outputs.matrix }} | |
pre-script: packaging/driver_upgrade.bat | |
script: | | |
set -euo pipefail | |
pushd . | |
cd tests/py/dynamo | |
../../../packaging/vc_env_helper.bat python -m pytest -ra -n auto --junitxml=${RUNNER_TEST_RESULTS_DIR}/l0_dynamo_core_runtime_tests_results.xml runtime/test_000_* | |
../../../packaging/vc_env_helper.bat python -m pytest -ra -n auto --junitxml=${RUNNER_TEST_RESULTS_DIR}/l0_dynamo_core_partitioning_tests_results.xml partitioning/ | |
../../../packaging/vc_env_helper.bat python -m pytest -ra -n auto --junitxml=${RUNNER_TEST_RESULTS_DIR}/l0_dynamo_core_lowering_tests_results.xml lowering/ | |
popd | |
L0-py-core-tests: | |
name: L0 core python tests | |
needs: [substitute-runner, build] | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- repository: pytorch/tensorrt | |
package-name: torch_tensorrt | |
uses: ./.github/workflows/windows-test.yml | |
with: | |
job-name: L0-core-python-tests | |
repository: ${{ matrix.repository }} | |
ref: "" | |
test-infra-repository: pytorch/test-infra | |
test-infra-ref: main | |
build-matrix: ${{ needs.substitute-runner.outputs.matrix }} | |
pre-script: packaging/driver_upgrade.bat | |
script: | | |
set -euo pipefail | |
pushd . | |
cd tests/py/core | |
../../../packaging/vc_env_helper.bat python -m pytest -ra --junitxml=${RUNNER_TEST_RESULTS_DIR}/l0_py_core_tests_results.xml -n auto . | |
popd | |
L0-torchscript-tests: | |
name: L0 torchscript tests | |
needs: [substitute-runner, build] | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- repository: pytorch/tensorrt | |
package-name: torch_tensorrt | |
uses: ./.github/workflows/windows-test.yml | |
with: | |
job-name: L0-torchscript-tests | |
repository: ${{ matrix.repository }} | |
ref: "" | |
test-infra-repository: pytorch/test-infra | |
test-infra-ref: main | |
build-matrix: ${{ needs.substitute-runner.outputs.matrix }} | |
pre-script: packaging/driver_upgrade.bat | |
script: | | |
set -euo pipefail | |
pushd . | |
cd tests/modules | |
python hub.py | |
popd | |
pushd . | |
cd tests/py/ts | |
../../../packaging/vc_env_helper.bat python -m pytest -ra --junitxml=${RUNNER_TEST_RESULTS_DIR}/l0_ts_api_tests_results.xml -n auto api/ | |
popd | |
L1-dynamo-core-tests: | |
name: L1 dynamo core tests | |
needs: [substitute-runner, build, L0-dynamo-converter-tests, L0-dynamo-core-tests, L0-py-core-tests, L0-torchscript-tests] | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- repository: pytorch/tensorrt | |
package-name: torch_tensorrt | |
uses: ./.github/workflows/windows-test.yml | |
with: | |
job-name: L1-dynamo-core-tests | |
repository: ${{ matrix.repository }} | |
ref: "" | |
test-infra-repository: pytorch/test-infra | |
test-infra-ref: main | |
build-matrix: ${{ needs.substitute-runner.outputs.matrix }} | |
pre-script: packaging/driver_upgrade.bat | |
script: | | |
set -euo pipefail | |
pushd . | |
cd tests/py/dynamo | |
../../../packaging/vc_env_helper.bat python -m pytest -ra -n auto --junitxml=${RUNNER_TEST_RESULTS_DIR}/l1_dynamo_core_tests_results.xml runtime/test_001_* | |
popd | |
L1-dynamo-compile-tests: | |
name: L1 dynamo compile tests | |
needs: [substitute-runner, build, L0-dynamo-converter-tests, L0-dynamo-core-tests, L0-py-core-tests, L0-torchscript-tests] | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- repository: pytorch/tensorrt | |
package-name: torch_tensorrt | |
uses: ./.github/workflows/windows-test.yml | |
with: | |
job-name: L1-dynamo-compile-tests | |
repository: ${{ matrix.repository }} | |
ref: "" | |
test-infra-repository: pytorch/test-infra | |
test-infra-ref: main | |
build-matrix: ${{ needs.substitute-runner.outputs.matrix }} | |
pre-script: packaging/driver_upgrade.bat | |
script: | | |
set -euo pipefail | |
pushd . | |
cd tests/py/dynamo/ | |
../../../packaging/vc_env_helper.bat python -m pytest -m critical -ra -n auto --junitxml=${RUNNER_TEST_RESULTS_DIR}/l1_dynamo_compile_tests_results.xml models/ | |
popd | |
L1-torch-compile-tests: | |
name: L1 torch compile tests | |
needs: [substitute-runner, build, L0-dynamo-converter-tests, L0-dynamo-core-tests, L0-py-core-tests, L0-torchscript-tests] | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- repository: pytorch/tensorrt | |
package-name: torch_tensorrt | |
uses: ./.github/workflows/windows-test.yml | |
with: | |
job-name: L1-torch-compile-tests | |
repository: ${{ matrix.repository }} | |
ref: "" | |
test-infra-repository: pytorch/test-infra | |
test-infra-ref: main | |
build-matrix: ${{ needs.substitute-runner.outputs.matrix }} | |
pre-script: packaging/driver_upgrade.bat | |
script: | | |
set -euo pipefail | |
pushd . | |
cd tests/py/dynamo/ | |
../../../packaging/vc_env_helper.bat python -m pytest -ra --junitxml=${RUNNER_TEST_RESULTS_DIR}/l1_torch_compile_be_tests_results.xml -n auto backend/ | |
../../../packaging/vc_env_helper.bat python -m pytest -m critical -ra -n auto --junitxml=${RUNNER_TEST_RESULTS_DIR}/l1_torch_compile_models_tests_results.xml --ir torch_compile models/test_models.py | |
../../../packaging/vc_env_helper.bat python -m pytest -m critical -ra -n auto --junitxml=${RUNNER_TEST_RESULTS_DIR}/l1_torch_compile_dyn_models_tests_results.xml --ir torch_compile models/test_dyn_models.py | |
popd | |
L1-torchscript-tests: | |
name: L1 torchscript tests | |
needs: [substitute-runner, build, L0-dynamo-converter-tests, L0-dynamo-core-tests, L0-py-core-tests, L0-torchscript-tests] | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- repository: pytorch/tensorrt | |
package-name: torch_tensorrt | |
uses: ./.github/workflows/windows-test.yml | |
with: | |
job-name: L1-torchscript-tests | |
repository: ${{ matrix.repository }} | |
ref: "" | |
test-infra-repository: pytorch/test-infra | |
test-infra-ref: main | |
build-matrix: ${{ needs.substitute-runner.outputs.matrix }} | |
pre-script: packaging/driver_upgrade.bat | |
script: | | |
set -euo pipefail | |
pushd . | |
cd tests/modules | |
python hub.py | |
popd | |
pushd . | |
cd tests/py/ts | |
../../../packaging/vc_env_helper.bat python -m pytest -ra --junitxml=${RUNNER_TEST_RESULTS_DIR}/l1_ts_models_tests_results.xml -n auto models/ | |
popd | |
L2-torch-compile-tests: | |
name: L2 torch compile tests | |
needs: [substitute-runner, build, L1-torch-compile-tests, L1-dynamo-compile-tests, L1-dynamo-core-tests, L1-torchscript-tests] | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- repository: pytorch/tensorrt | |
package-name: torch_tensorrt | |
uses: ./.github/workflows/windows-test.yml | |
with: | |
job-name: L2-torch-compile-tests | |
repository: ${{ matrix.repository }} | |
ref: "" | |
test-infra-repository: pytorch/test-infra | |
test-infra-ref: main | |
build-matrix: ${{ needs.substitute-runner.outputs.matrix }} | |
pre-script: packaging/driver_upgrade.bat | |
script: | | |
set -euo pipefail | |
pushd . | |
cd tests/py/dynamo/ | |
../../../packaging/vc_env_helper.bat python -m pytest -m "not critical" -ra -n auto --junitxml=${RUNNER_TEST_RESULTS_DIR}/l2_torch_compile_models_tests_results.xml --ir torch_compile models/test_models.py | |
../../../packaging/vc_env_helper.bat python -m pytest -m "not critical" -ra -n auto --junitxml=${RUNNER_TEST_RESULTS_DIR}/l2_torch_compile_dyn_models_tests_results.xml --ir torch_compile models/test_dyn_models.py | |
popd | |
L2-dynamo-compile-tests: | |
name: L2 dynamo compile tests | |
needs: [substitute-runner, build, L1-torch-compile-tests, L1-dynamo-compile-tests, L1-dynamo-core-tests, L1-torchscript-tests] | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- repository: pytorch/tensorrt | |
package-name: torch_tensorrt | |
uses: ./.github/workflows/windows-test.yml | |
with: | |
job-name: L2-dynamo-compile-tests | |
repository: ${{ matrix.repository }} | |
ref: "" | |
test-infra-repository: pytorch/test-infra | |
test-infra-ref: main | |
build-matrix: ${{ needs.substitute-runner.outputs.matrix }} | |
pre-script: packaging/driver_upgrade.bat | |
script: | | |
set -euo pipefail | |
pushd . | |
cd tests/py/dynamo/ | |
../../../packaging/vc_env_helper.bat python -m pytest -m "not critical" -ra -n auto --junitxml=${RUNNER_TEST_RESULTS_DIR}/l2_dynamo_compile_tests_results.xml models/ | |
../../../packaging/vc_env_helper.bat python -m pytest -ra --junitxml=${RUNNER_TEST_RESULTS_DIR}/l2_dynamo_compile_llm_tests_results.xml llm/ | |
popd | |
L2-dynamo-core-tests: | |
name: L2 dynamo core tests | |
needs: [substitute-runner, build, L1-torch-compile-tests, L1-dynamo-compile-tests, L1-dynamo-core-tests, L1-torchscript-tests] | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- repository: pytorch/tensorrt | |
package-name: torch_tensorrt | |
uses: ./.github/workflows/windows-test.yml | |
with: | |
job-name: L2-dynamo-core-tests | |
repository: ${{ matrix.repository }} | |
ref: "" | |
test-infra-repository: pytorch/test-infra | |
test-infra-ref: main | |
build-matrix: ${{ needs.substitute-runner.outputs.matrix }} | |
pre-script: packaging/driver_upgrade.bat | |
script: | | |
set -euo pipefail | |
pushd . | |
cd tests/py/dynamo | |
../../../packaging/vc_env_helper.bat python -m pytest -ra --junitxml=${RUNNER_TEST_RESULTS_DIR}/l2_dynamo_core_tests_results.xml -n auto --ignore runtime/test_001_* --ignore runtime/test_000_* runtime/* | |
popd | |
L2-dynamo-plugin-tests: | |
name: L2 dynamo plugin tests | |
needs: [substitute-runner, build, L1-torch-compile-tests, L1-dynamo-compile-tests, L1-dynamo-core-tests, L1-torchscript-tests] | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- repository: pytorch/tensorrt | |
package-name: torch_tensorrt | |
uses: ./.github/workflows/windows-test.yml | |
with: | |
job-name: L2-dynamo-plugin-tests | |
repository: ${{ matrix.repository }} | |
ref: "" | |
test-infra-repository: pytorch/test-infra | |
test-infra-ref: main | |
build-matrix: ${{ needs.substitute-runner.outputs.matrix }} | |
pre-script: packaging/driver_upgrade.bat | |
script: | | |
set -euo pipefail | |
pushd . | |
cd tests/py/dynamo | |
../../../packaging/vc_env_helper.bat python -m pytest -ra --junitxml=${RUNNER_TEST_RESULTS_DIR}/l2_dynamo_plugins_tests_results.xml -n auto --ignore automatic_plugin/ | |
popd | |
L2-torchscript-tests: | |
name: L2 torchscript tests | |
needs: [substitute-runner, build, L1-torch-compile-tests, L1-dynamo-compile-tests, L1-dynamo-core-tests, L1-torchscript-tests] | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- repository: pytorch/tensorrt | |
package-name: torch_tensorrt | |
uses: ./.github/workflows/windows-test.yml | |
with: | |
job-name: L2-torchscript-tests | |
repository: ${{ matrix.repository }} | |
ref: "" | |
test-infra-repository: pytorch/test-infra | |
test-infra-ref: main | |
build-matrix: ${{ needs.substitute-runner.outputs.matrix }} | |
pre-script: packaging/driver_upgrade.bat | |
script: | | |
set -euo pipefail | |
pushd . | |
cd tests/modules | |
python hub.py | |
popd | |
pushd . | |
cd tests/py/ts | |
../../../packaging/vc_env_helper.bat python -m pytest -ra --junitxml=${RUNNER_TEST_RESULTS_DIR}/l2_ts_integrations_tests_results.xml -n auto integrations/ | |
popd | |
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 |