cherrypick: TS bug fixes #4354, #4353 (#4394) #326
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: RTX - Python-only build and test Linux x86_64 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: | |
| permissions: | |
| contents: read | |
| jobs: | |
| generate-matrix: | |
| uses: pytorch/test-infra/.github/workflows/generate_binary_build_matrix.yml@main | |
| with: | |
| package-type: wheel | |
| os: linux | |
| 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@v6 | |
| with: | |
| python-version: "3.11" | |
| - uses: actions/checkout@v6 | |
| 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 --use-rtx true --matrix "${MATRIX_BLOB}")" | |
| echo "${MATRIX_BLOB}" | |
| echo "matrix=${MATRIX_BLOB}" >> "${GITHUB_OUTPUT}" | |
| build: | |
| needs: filter-matrix | |
| permissions: | |
| id-token: write | |
| contents: read | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - repository: pytorch/tensorrt | |
| pre-script: packaging/pre_build_script.sh | |
| env-var-script: packaging/env_vars_python_only.txt | |
| post-script: packaging/post_build_script.sh | |
| smoke-test-script: packaging/smoke_test_script.sh | |
| package-name: torch_tensorrt | |
| display-name: RTX - Python-only build Linux x86_64 torch-tensorrt-rtx whl package | |
| name: ${{ matrix.display-name }} | |
| uses: ./.github/workflows/build_linux.yml | |
| with: | |
| repository: ${{ matrix.repository }} | |
| ref: "" | |
| test-infra-repository: pytorch/test-infra | |
| test-infra-ref: main | |
| build-matrix: ${{ needs.filter-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 }} | |
| architecture: "x86_64" | |
| use-rtx: true | |
| pip-install-torch-extra-args: "--extra-index-url https://pypi.org/simple" | |
| dynamo-runtime-tests: | |
| name: ${{ matrix.display-name }} | |
| needs: [filter-matrix, build] | |
| 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() }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - repository: pytorch/tensorrt | |
| package-name: torch_tensorrt | |
| pre-script: packaging/pre_build_script.sh | |
| post-script: packaging/post_build_script.sh | |
| smoke-test-script: packaging/smoke_test_script.sh | |
| display-name: RTX - Python-only dynamo runtime tests | |
| uses: ./.github/workflows/linux-test.yml | |
| with: | |
| job-name: rtx-python-only-dynamo-runtime-tests | |
| repository: "pytorch/tensorrt" | |
| ref: "" | |
| test-infra-repository: pytorch/test-infra | |
| test-infra-ref: main | |
| build-matrix: ${{ needs.filter-matrix.outputs.matrix }} | |
| pre-script: ${{ matrix.pre-script }} | |
| use-rtx: true | |
| script: | | |
| set -euo pipefail | |
| pushd . | |
| cd tests/py/dynamo/runtime | |
| python -m pytest -ra -n 8 --junitxml=${RUNNER_TEST_RESULTS_DIR}/python_only_dynamo_runtime_tests_results.xml . | |
| popd | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref_name }}-tensorrt-rtx-python-only-${{ github.event_name == 'workflow_dispatch' }} | |
| cancel-in-progress: true |