1- name : RTX - Python-only build and test Windows wheels
1+ name : _test-windows
22
3- on :
4- pull_request :
5- push :
6- branches :
7- - main
8- - nightly
9- - release/*
10- tags :
11- # NOTE: Binary build pipelines should only get triggered on release candidate builds
12- # Release candidate tags look like: v1.11.0-rc1
13- - v[0-9]+.[0-9]+.[0-9]+-rc[0-9]+
14- workflow_dispatch :
3+ # Manifest-driven build + test for the Windows channel. Mirrors _test-linux.yml
4+ # but uses build_windows.yml + windows-test.yml, and wraps the suite run in
5+ # vc_env_helper.bat (the MSVC env). Suite SELECTION is identical to Linux — the
6+ # manifest is platform-agnostic (`ci matrix --platform windows`); only the build
7+ # reusable and the execution wrapper differ.
158
16- permissions :
17- contents : read
9+ on :
10+ workflow_call :
11+ inputs :
12+ lane :
13+ description : " fast | full | nightly"
14+ required : true
15+ type : string
16+ use-rtx :
17+ description : " Test against TensorRT-RTX"
18+ type : boolean
19+ default : false
20+ name-prefix :
21+ description : " Display-name prefix (e.g. 'RTX - ')"
22+ type : string
23+ default : " "
1824
1925jobs :
2026 generate-matrix :
@@ -44,10 +50,12 @@ jobs:
4450 run : |
4551 set -eou pipefail
4652 MATRIX_BLOB=${{ toJSON(needs.generate-matrix.outputs.matrix) }}
47- MATRIX_BLOB="$(python3 .github/scripts/filter-matrix.py --use-rtx true --matrix "${MATRIX_BLOB}")"
53+ LIMIT_PR=${{ inputs.lane == 'fast' && 'true' || 'false' }}
54+ MATRIX_BLOB="$(python3 .github/scripts/filter-matrix.py --use-rtx ${{ inputs.use-rtx }} --limit-pr-builds "${LIMIT_PR}" --matrix "${MATRIX_BLOB}")"
4855 echo "${MATRIX_BLOB}"
4956 echo "matrix=${MATRIX_BLOB}" >> "${GITHUB_OUTPUT}"
5057
58+ # Swap the build runner label for a GPU test runner (same as the legacy windows flow).
5159 substitute-runner :
5260 needs : filter-matrix
5361 outputs :
5765 - name : Substitute runner
5866 id : substitute
5967 run : |
60- echo matrix="$(echo '${{ needs.filter-matrix.outputs.matrix }}' | sed -e 's/windows.g4dn.xlarge/windows.g5.4xlarge.nvidia.gpu/g')" >> ${GITHUB_OUTPUT}
68+ echo matrix="$(echo '${{ needs.filter-matrix.outputs.matrix }}' | sed -e 's/windows.g4dn.xlarge/windows.g5.4xlarge.nvidia.gpu/g')" >> " ${GITHUB_OUTPUT}"
6169
6270 build :
6371 needs : substitute-runner
7381 env-script : packaging/vc_env_helper.bat
7482 smoke-test-script : packaging/smoke_test_windows.py
7583 package-name : torch_tensorrt
76- display-name : RTX - Python-only build Windows torch-tensorrt-rtx whl package
84+ display-name : ${{ inputs.name-prefix }}Build Windows torch-tensorrt whl package
7785 name : ${{ matrix.display-name }}
7886 uses : ./.github/workflows/build_windows.yml
7987 with :
@@ -84,41 +92,45 @@ jobs:
8492 build-matrix : ${{ needs.substitute-runner.outputs.matrix }}
8593 pre-script : ${{ matrix.pre-script }}
8694 env-script : ${{ matrix.env-script }}
87- wheel-build-params : " --py-only --use-rtx"
8895 smoke-test-script : ${{ matrix.smoke-test-script }}
8996 package-name : ${{ matrix.package-name }}
9097 trigger-event : ${{ github.event_name }}
9198 timeout : 120
92- use-rtx : true
9399
94- dynamo-runtime-tests :
95- name : ${{ matrix.display-name }}
96- needs : [substitute-runner, build]
97- if : ${{ (github.ref_name == 'main' || github.ref_name == 'nightly' || startsWith(github.ref_name, 'release/') || (startsWith(github.ref, 'refs/tags/v') && contains(github.ref_name, '-rc')) || contains(github.event.pull_request.labels.*.name, 'Force All Tests[L0+L1+L2]')) && always() || success() }}
100+ suite-matrix :
101+ runs-on : ubuntu-latest
102+ outputs :
103+ matrix : ${{ steps.gen.outputs.matrix }}
104+ steps :
105+ - uses : actions/checkout@v6
106+ - uses : actions/setup-python@v6
107+ with :
108+ python-version : " 3.11"
109+ - id : gen
110+ run : |
111+ set -euo pipefail
112+ variant=${{ inputs.use-rtx && 'rtx' || 'standard' }}
113+ json="$(python -m tests.ci matrix --platform windows --lane '${{ inputs.lane }}' --variant "${variant}")"
114+ echo "matrix=${json}" >> "$GITHUB_OUTPUT"
115+ echo "Lane '${{ inputs.lane }}' (${variant}) windows suites:"; echo "${json}" | python -m json.tool
116+
117+ test :
118+ needs : [substitute-runner, build, suite-matrix]
98119 strategy :
99120 fail-fast : false
100- matrix :
101- include :
102- - repository : pytorch/tensorrt
103- package-name : torch_tensorrt
104- display-name : RTX - Python-only dynamo runtime tests
121+ matrix : ${{ fromJson(needs.suite-matrix.outputs.matrix) }}
105122 uses : ./.github/workflows/windows-test.yml
106123 with :
107- job-name : rtx-python-only-dynamo-runtime-tests
108- repository : ${{ matrix.repository }}
124+ job-name : ${{ matrix.suite }}-${{ matrix.variant }}
125+ repository : " pytorch/tensorrt "
109126 ref : " "
110127 test-infra-repository : pytorch/test-infra
111128 test-infra-ref : main
112129 build-matrix : ${{ needs.substitute-runner.outputs.matrix }}
113130 pre-script : packaging/driver_upgrade.bat
114- use-rtx : true
131+ use-rtx : ${{ inputs.use-rtx }}
132+ # vc_env_helper.bat sets the MSVC env, then runs the manifest runner; the
133+ # inner `python -m pytest` it spawns inherits that env.
115134 script : |
116135 set -euo pipefail
117- pushd .
118- cd tests/py/dynamo/runtime
119- ../../../../packaging/vc_env_helper.bat python -m pytest -ra -n 8 --junitxml=${RUNNER_TEST_RESULTS_DIR}/python_only_dynamo_runtime_tests_results.xml .
120- popd
121-
122- concurrency :
123- group : ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref_name }}-tensorrt-rtx-python-only-${{ github.event_name == 'workflow_dispatch' }}
124- cancel-in-progress : true
136+ packaging/vc_env_helper.bat python -m tests.ci run "${{ matrix.suite }}" --variant "${{ matrix.variant }}"
0 commit comments