diff --git a/.github/workflows/build-test-linux-aarch64-jetpack.yml b/.github/workflows/build-test-linux-aarch64-jetpack.yml index ff827ad3f6..b64fe6c884 100644 --- a/.github/workflows/build-test-linux-aarch64-jetpack.yml +++ b/.github/workflows/build-test-linux-aarch64-jetpack.yml @@ -65,7 +65,7 @@ jobs: post-script: packaging/post_build_script.sh smoke-test-script: packaging/smoke_test_script.sh package-name: torch_tensorrt - name: Build torch-tensorrt whl package for jetpack + name: Build Jetpack torch-tensorrt whl package uses: ./.github/workflows/build_linux.yml with: repository: ${{ matrix.repository }} diff --git a/.github/workflows/build-test-linux-aarch64.yml b/.github/workflows/build-test-linux-aarch64.yml index 2604d18f92..63573c7093 100644 --- a/.github/workflows/build-test-linux-aarch64.yml +++ b/.github/workflows/build-test-linux-aarch64.yml @@ -62,7 +62,7 @@ jobs: post-script: packaging/post_build_script.sh smoke-test-script: packaging/smoke_test_script.sh package-name: torch_tensorrt - name: Build torch-tensorrt whl package for SBSA + name: Build SBSA torch-tensorrt whl package uses: ./.github/workflows/build_linux.yml with: repository: ${{ matrix.repository }} @@ -78,284 +78,6 @@ jobs: trigger-event: ${{ github.event_name }} architecture: "aarch64" - tests-py-torchscript-fe: - name: Test torchscript frontend [Python] - needs: [filter-matrix, build] - if: false - 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 - uses: ./.github/workflows/linux-test.yml - with: - job-name: tests-py-torchscript-fe - 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 }} - architecture: "aarch64" - script: | - set -euo pipefail - export USE_HOST_DEPS=1 - export CI_BUILD=1 - export LD_LIBRARY_PATH=/usr/lib64:$LD_LIBRARY_PATH - pushd . - cd tests/modules - python hub.py - popd - pushd . - cd tests/py/ts - python -m pytest -ra --junitxml=${RUNNER_TEST_RESULTS_DIR}/ts_api_test_results.xml api/ - python -m pytest -ra --junitxml=${RUNNER_TEST_RESULTS_DIR}/ts_models_test_results.xml models/ - python -m pytest -ra --junitxml=${RUNNER_TEST_RESULTS_DIR}/ts_integrations_test_results.xml integrations/ - popd - - tests-py-dynamo-converters: - name: Test dynamo converters [Python] - needs: [filter-matrix, build] - if: false - 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 - uses: ./.github/workflows/linux-test.yml - with: - job-name: tests-py-dynamo-converters - 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 }} - architecture: "aarch64" - script: | - set -euo pipefail - export USE_HOST_DEPS=1 - export CI_BUILD=1 - pushd . - cd tests/py - cd dynamo - python -m pytest -ra --junitxml=${RUNNER_TEST_RESULTS_DIR}/dynamo_converters_test_results.xml -n 4 conversion/ - python -m pytest -ra --junitxml=${RUNNER_TEST_RESULTS_DIR}/dynamo_converters_test_results.xml automatic_plugin/test_automatic_plugin.py - python -m pytest -ra --junitxml=${RUNNER_TEST_RESULTS_DIR}/dynamo_converters_test_results.xml automatic_plugin/test_automatic_plugin_with_attrs.py - popd - - tests-py-dynamo-fe: - name: Test dynamo frontend [Python] - needs: [filter-matrix, build] - if: false - 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 - uses: ./.github/workflows/linux-test.yml - with: - job-name: tests-py-dynamo-fe - 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 }} - architecture: "aarch64" - script: | - set -euo pipefail - export USE_HOST_DEPS=1 - export CI_BUILD=1 - pushd . - cd tests/py - cd dynamo - python -m pytest -ra --junitxml=${RUNNER_TEST_RESULTS_DIR}/dyn_models_export.xml --ir dynamo models/ - popd - - tests-py-dynamo-serde: - name: Test dynamo export serde [Python] - needs: [filter-matrix, build] - if: false - 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 - uses: ./.github/workflows/linux-test.yml - with: - job-name: tests-py-dynamo-serde - 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 }} - architecture: "aarch64" - script: | - set -euo pipefail - export USE_HOST_DEPS=1 - export CI_BUILD=1 - pushd . - cd tests/py - cd dynamo - python -m pytest -ra --junitxml=${RUNNER_TEST_RESULTS_DIR}/export_serde_test_results.xml --ir dynamo models/test_export_serde.py - python -m pytest -ra --junitxml=${RUNNER_TEST_RESULTS_DIR}/reexport_test_results.xml --ir dynamo models/test_reexport.py - popd - - tests-py-torch-compile-be: - name: Test torch compile backend [Python] - needs: [filter-matrix, build] - if: false - 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 - uses: ./.github/workflows/linux-test.yml - with: - job-name: tests-py-torch-compile-be - 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 }} - architecture: "aarch64" - script: | - set -euo pipefail - export USE_HOST_DEPS=1 - export CI_BUILD=1 - pushd . - cd tests/py - cd dynamo - python -m pytest -ra -n 10 --junitxml=${RUNNER_TEST_RESULTS_DIR}/torch_compile_be_test_results.xml backend/ - python -m pytest -ra -n 4 --junitxml=${RUNNER_TEST_RESULTS_DIR}/torch_complete_be_e2e_test_results.xml --ir torch_compile models/test_models.py - python -m pytest -ra --junitxml=${RUNNER_TEST_RESULTS_DIR}/torch_compile_dyn_models_export.xml --ir torch_compile models/test_dyn_models.py - popd - - tests-py-dynamo-core: - name: Test dynamo core [Python] - needs: [filter-matrix, build] - if: false - 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 - uses: ./.github/workflows/linux-test.yml - with: - job-name: tests-py-dynamo-core - 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 }} - architecture: "aarch64" - script: | - set -euo pipefail - export USE_HOST_DEPS=1 - export CI_BUILD=1 - pushd . - cd tests/py - cd dynamo - python -m pytest -ra -n 4 --junitxml=${RUNNER_TEST_RESULTS_DIR}/tests_py_dynamo_core_runtime_test_results.xml --ignore runtime/test_002_cudagraphs_py.py --ignore runtime/test_002_cudagraphs_cpp.py runtime/ - python -m pytest -ra -n 4 --junitxml=${RUNNER_TEST_RESULTS_DIR}/tests_py_dynamo_core_partitioning_test_results.xml partitioning/ - python -m pytest -ra -n 4 --junitxml=${RUNNER_TEST_RESULTS_DIR}/tests_py_dynamo_core_lowering_test_results.xml lowering/ - popd - - tests-py-dynamo-cudagraphs: - name: Test dynamo cudagraphs [Python] - needs: [filter-matrix, build] - if: false - 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 - uses: ./.github/workflows/linux-test.yml - with: - job-name: tests-py-dynamo-cudagraphs - 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 }} - architecture: "aarch64" - script: | - set -euo pipefail - export USE_HOST_DEPS=1 - export CI_BUILD=1 - pushd . - cd tests/py - cd dynamo - nvidia-smi - python -m pytest -ra --junitxml=${RUNNER_TEST_RESULTS_DIR}/tests_py_dynamo_core_runtime_cudagraphs_cpp_test_results.xml runtime/test_002_cudagraphs_cpp.py || true - python -m pytest -ra --junitxml=${RUNNER_TEST_RESULTS_DIR}/tests_py_dynamo_core_runtime_cudagraphs_py_test_results.xml runtime/test_002_cudagraphs_py.py || true - popd - - tests-py-core: - name: Test core [Python] - needs: [filter-matrix, build] - if: false - 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 - uses: ./.github/workflows/linux-test.yml - with: - job-name: tests-py-core - 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 }} - architecture: "aarch64" - script: | - set -euo pipefail - export USE_HOST_DEPS=1 - export CI_BUILD=1 - pushd . - cd tests/py/core - python -m pytest -ra -n 4 --junitxml=${RUNNER_TEST_RESULTS_DIR}/tests_py_core_test_results.xml . - 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 \ No newline at end of file diff --git a/.github/workflows/build-test-linux-x86_64.yml b/.github/workflows/build-test-linux-x86_64.yml index 6d94546177..a81bfcf039 100644 --- a/.github/workflows/build-test-linux-x86_64.yml +++ b/.github/workflows/build-test-linux-x86_64.yml @@ -61,7 +61,7 @@ jobs: post-script: packaging/post_build_script.sh smoke-test-script: packaging/smoke_test_script.sh package-name: torch_tensorrt - name: Build torch-tensorrt whl package for Linux x86_64 + name: Build Linux x86_64 torch-tensorrt whl package uses: ./.github/workflows/build_linux.yml with: repository: ${{ matrix.repository }} @@ -78,8 +78,8 @@ jobs: architecture: "x86_64" use-rtx: false - tests-py-torchscript-fe: - name: Test torchscript frontend [Python] + L0-dynamo-converter-tests: + name: L0 dynamo converter tests needs: [filter-matrix, build] strategy: fail-fast: false @@ -92,7 +92,94 @@ jobs: smoke-test-script: packaging/smoke_test_script.sh uses: ./.github/workflows/linux-test.yml with: - job-name: tests-py-torchscript-fe + job-name: L0-dynamo-converter-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 }} + script: | + set -euo pipefail + pushd . + cd tests/py/dynamo + 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: [filter-matrix, build] + 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 + uses: ./.github/workflows/linux-test.yml + with: + job-name: L0-dynamo-core-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 }} + script: | + set -euo pipefail + pushd . + cd tests/py + cd dynamo + python -m pytest -ra -n auto --junitxml=${RUNNER_TEST_RESULTS_DIR}/l0_dynamo_core_runtime_tests_results.xml runtime/test_000_* + python -m pytest -ra -n auto --junitxml=${RUNNER_TEST_RESULTS_DIR}/l0_dynamo_core_partitioning_tests_results.xml partitioning/ + 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: [filter-matrix, build] + 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 + uses: ./.github/workflows/linux-test.yml + with: + job-name: L0-py-core-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 }} + script: | + set -euo pipefail + pushd . + cd tests/py/core + 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: [filter-matrix, build] + 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 + uses: ./.github/workflows/linux-test.yml + with: + job-name: L0-torchscript-tests repository: "pytorch/tensorrt" ref: "" test-infra-repository: pytorch/test-infra @@ -101,23 +188,18 @@ jobs: pre-script: ${{ matrix.pre-script }} script: | set -euo pipefail - export USE_HOST_DEPS=1 - export CI_BUILD=1 - export LD_LIBRARY_PATH=/usr/lib64:$LD_LIBRARY_PATH pushd . cd tests/modules python hub.py popd pushd . cd tests/py/ts - python -m pytest -ra --junitxml=${RUNNER_TEST_RESULTS_DIR}/ts_api_test_results.xml api/ - python -m pytest -ra --junitxml=${RUNNER_TEST_RESULTS_DIR}/ts_models_test_results.xml models/ - python -m pytest -ra --junitxml=${RUNNER_TEST_RESULTS_DIR}/ts_integrations_test_results.xml integrations/ + python -m pytest -ra --junitxml=${RUNNER_TEST_RESULTS_DIR}/l0_ts_api_tests_results.xml -n auto api/ popd - tests-py-dynamo-converters: - name: Test dynamo converters [Python] - needs: [filter-matrix, build] + L1-dynamo-core-tests: + name: L1 dynamo core tests + needs: [filter-matrix, build, L0-dynamo-converter-tests, L0-dynamo-core-tests, L0-py-core-tests, L0-torchscript-tests] strategy: fail-fast: false matrix: @@ -129,7 +211,7 @@ jobs: smoke-test-script: packaging/smoke_test_script.sh uses: ./.github/workflows/linux-test.yml with: - job-name: tests-py-dynamo-converters + job-name: L1-dynamo-core-tests repository: "pytorch/tensorrt" ref: "" test-infra-repository: pytorch/test-infra @@ -138,19 +220,14 @@ jobs: pre-script: ${{ matrix.pre-script }} script: | set -euo pipefail - export USE_HOST_DEPS=1 - export CI_BUILD=1 pushd . cd tests/py/dynamo - python -m pytest -ra --junitxml=${RUNNER_TEST_RESULTS_DIR}/dynamo_converters_test_results.xml -n 4 conversion/ - python -m pytest -ra --junitxml=${RUNNER_TEST_RESULTS_DIR}/dynamo_converters_test_results.xml automatic_plugin/test_automatic_plugin.py - python -m pytest -ra --junitxml=${RUNNER_TEST_RESULTS_DIR}/dynamo_converters_test_results.xml automatic_plugin/test_automatic_plugin_with_attrs.py - python -m pytest -ra --junitxml=${RUNNER_TEST_RESULTS_DIR}/dynamo_converters_test_results.xml automatic_plugin/test_flashinfer_rmsnorm.py + python -m pytest -ra --junitxml=${RUNNER_TEST_RESULTS_DIR}/l1_dynamo_core_tests_results.xml -n auto runtime/test_001_* popd - tests-py-dynamo-fe: - name: Test dynamo frontend [Python] - needs: [filter-matrix, build] + L1-dynamo-compile-tests: + name: L1 dynamo compile tests + needs: [filter-matrix, build, L0-dynamo-converter-tests, L0-dynamo-core-tests, L0-py-core-tests, L0-torchscript-tests] strategy: fail-fast: false matrix: @@ -162,7 +239,7 @@ jobs: smoke-test-script: packaging/smoke_test_script.sh uses: ./.github/workflows/linux-test.yml with: - job-name: tests-py-dynamo-fe + job-name: L1-dynamo-compile-tests repository: "pytorch/tensorrt" ref: "" test-infra-repository: pytorch/test-infra @@ -171,18 +248,14 @@ jobs: pre-script: ${{ matrix.pre-script }} script: | set -euo pipefail - export USE_HOST_DEPS=1 - export CI_BUILD=1 pushd . - cd tests/py - cd dynamo - python -m pytest -ra --junitxml=${RUNNER_TEST_RESULTS_DIR}/dyn_models_export.xml --ir dynamo models/ - python -m pytest -ra --junitxml=${RUNNER_TEST_RESULTS_DIR}/dyn_models_llm.xml llm/ + cd tests/py/dynamo/ + python -m pytest -m critical -ra -n auto --junitxml=${RUNNER_TEST_RESULTS_DIR}/l1_dynamo_compile_tests_results.xml models/ popd - tests-py-dynamo-serde: - name: Test dynamo export serde [Python] - needs: [filter-matrix, build] + L1-torch-compile-tests: + name: L1 torch compile tests + needs: [filter-matrix, build, L0-dynamo-converter-tests, L0-dynamo-core-tests, L0-py-core-tests, L0-torchscript-tests] strategy: fail-fast: false matrix: @@ -194,7 +267,7 @@ jobs: smoke-test-script: packaging/smoke_test_script.sh uses: ./.github/workflows/linux-test.yml with: - job-name: tests-py-dynamo-serde + job-name: L1-torch-compile-tests repository: "pytorch/tensorrt" ref: "" test-infra-repository: pytorch/test-infra @@ -203,18 +276,16 @@ jobs: pre-script: ${{ matrix.pre-script }} script: | set -euo pipefail - export USE_HOST_DEPS=1 - export CI_BUILD=1 pushd . - cd tests/py - cd dynamo - python -m pytest -ra --junitxml=${RUNNER_TEST_RESULTS_DIR}/export_serde_test_results.xml --ir dynamo models/test_export_serde.py - python -m pytest -ra --junitxml=${RUNNER_TEST_RESULTS_DIR}/reexport_test_results.xml --ir dynamo models/test_reexport.py + cd tests/py/dynamo/ + python -m pytest -ra --junitxml=${RUNNER_TEST_RESULTS_DIR}/l1_torch_compile_be_tests_results.xml -n auto backend/ + 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 + 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 - tests-py-torch-compile-be: - name: Test torch compile backend [Python] - needs: [filter-matrix, build] + L1-torchscript-tests: + name: L1 torch script tests + needs: [filter-matrix, build, L0-dynamo-core-tests, L0-dynamo-converter-tests, L0-py-core-tests, L0-torchscript-tests] strategy: fail-fast: false matrix: @@ -226,7 +297,7 @@ jobs: smoke-test-script: packaging/smoke_test_script.sh uses: ./.github/workflows/linux-test.yml with: - job-name: tests-py-torch-compile-be + job-name: L1-torchscript-tests repository: "pytorch/tensorrt" ref: "" test-infra-repository: pytorch/test-infra @@ -235,19 +306,18 @@ jobs: pre-script: ${{ matrix.pre-script }} script: | set -euo pipefail - export USE_HOST_DEPS=1 - export CI_BUILD=1 pushd . - cd tests/py - cd dynamo - python -m pytest -ra -n 10 --junitxml=${RUNNER_TEST_RESULTS_DIR}/torch_compile_be_test_results.xml backend/ - python -m pytest -ra -n 4 --junitxml=${RUNNER_TEST_RESULTS_DIR}/torch_complete_be_e2e_test_results.xml --ir torch_compile models/test_models.py - python -m pytest -ra --junitxml=${RUNNER_TEST_RESULTS_DIR}/torch_compile_dyn_models_export.xml --ir torch_compile models/test_dyn_models.py + cd tests/modules + python hub.py + popd + pushd . + cd tests/py/ts + python -m pytest -ra --junitxml=${RUNNER_TEST_RESULTS_DIR}/l1_ts_models_tests_results.xml -n auto models/ popd - tests-py-dynamo-core: - name: Test dynamo core [Python] - needs: [filter-matrix, build] + L2-torch-compile-tests: + name: L2 torch compile tests + needs: [filter-matrix, build, L1-torch-compile-tests, L1-dynamo-compile-tests, L1-dynamo-core-tests, L1-torchscript-tests] strategy: fail-fast: false matrix: @@ -259,7 +329,7 @@ jobs: smoke-test-script: packaging/smoke_test_script.sh uses: ./.github/workflows/linux-test.yml with: - job-name: tests-py-dynamo-core + job-name: L2-torch-compile-tests repository: "pytorch/tensorrt" ref: "" test-infra-repository: pytorch/test-infra @@ -268,19 +338,15 @@ jobs: pre-script: ${{ matrix.pre-script }} script: | set -euo pipefail - export USE_HOST_DEPS=1 - export CI_BUILD=1 pushd . - cd tests/py - cd dynamo - python -m pytest -ra -n 4 --junitxml=${RUNNER_TEST_RESULTS_DIR}/tests_py_dynamo_core_runtime_test_results.xml --ignore runtime/test_002_cudagraphs_py.py --ignore runtime/test_002_cudagraphs_cpp.py runtime/ - python -m pytest -ra -n 4 --junitxml=${RUNNER_TEST_RESULTS_DIR}/tests_py_dynamo_core_partitioning_test_results.xml partitioning/ - python -m pytest -ra -n 4 --junitxml=${RUNNER_TEST_RESULTS_DIR}/tests_py_dynamo_core_lowering_test_results.xml lowering/ + cd tests/py/dynamo/ + 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 + 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 - tests-py-dynamo-cudagraphs: - name: Test dynamo cudagraphs [Python] - needs: [filter-matrix, build] + L2-dynamo-compile-tests: + name: L2 dynamo compile tests + needs: [filter-matrix, build, L1-dynamo-compile-tests, L1-dynamo-core-tests, L1-torch-compile-tests, L1-torchscript-tests] strategy: fail-fast: false matrix: @@ -292,7 +358,7 @@ jobs: smoke-test-script: packaging/smoke_test_script.sh uses: ./.github/workflows/linux-test.yml with: - job-name: tests-py-dynamo-cudagraphs + job-name: L2-dynamo-compile-tests repository: "pytorch/tensorrt" ref: "" test-infra-repository: pytorch/test-infra @@ -301,19 +367,15 @@ jobs: pre-script: ${{ matrix.pre-script }} script: | set -euo pipefail - export USE_HOST_DEPS=1 - export CI_BUILD=1 pushd . - cd tests/py - cd dynamo - nvidia-smi - python -m pytest -ra --junitxml=${RUNNER_TEST_RESULTS_DIR}/tests_py_dynamo_core_runtime_cudagraphs_cpp_test_results.xml runtime/test_002_cudagraphs_cpp.py || true - python -m pytest -ra --junitxml=${RUNNER_TEST_RESULTS_DIR}/tests_py_dynamo_core_runtime_cudagraphs_py_test_results.xml runtime/test_002_cudagraphs_py.py || true + cd tests/py/dynamo/ + python -m pytest -m "not critical" -ra -n auto --junitxml=${RUNNER_TEST_RESULTS_DIR}/l2_dynamo_compile_tests_results.xml models/ + python -m pytest -ra --junitxml=${RUNNER_TEST_RESULTS_DIR}/l2_dynamo_compile_llm_tests_results.xml llm/ popd - tests-py-core: - name: Test core [Python] - needs: [filter-matrix, build] + L2-dynamo-core-tests: + name: L2 dynamo core tests + needs: [filter-matrix, build, L1-dynamo-core-tests, L1-dynamo-compile-tests, L1-torch-compile-tests, L1-torchscript-tests] strategy: fail-fast: false matrix: @@ -325,7 +387,7 @@ jobs: smoke-test-script: packaging/smoke_test_script.sh uses: ./.github/workflows/linux-test.yml with: - job-name: tests-py-core + job-name: L2-dynamo-core-tests repository: "pytorch/tensorrt" ref: "" test-infra-repository: pytorch/test-infra @@ -334,11 +396,69 @@ jobs: pre-script: ${{ matrix.pre-script }} script: | set -euo pipefail - export USE_HOST_DEPS=1 - export CI_BUILD=1 pushd . - cd tests/py/core - python -m pytest -ra -n 4 --junitxml=${RUNNER_TEST_RESULTS_DIR}/tests_py_core_test_results.xml . + cd tests/py/dynamo + 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: [filter-matrix, build, L1-dynamo-core-tests, L1-dynamo-compile-tests, L1-torch-compile-tests, L1-torchscript-tests] + 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 + uses: ./.github/workflows/linux-test.yml + with: + job-name: L2-dynamo-plugin-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 }} + script: | + set -euo pipefail + pushd . + cd tests/py/dynamo + 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 torch script tests + needs: [filter-matrix, build, L1-dynamo-core-tests, L1-dynamo-compile-tests, L1-torch-compile-tests, L1-torchscript-tests] + 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 + uses: ./.github/workflows/linux-test.yml + with: + job-name: L2-torchscript-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 }} + script: | + set -euo pipefail + pushd . + cd tests/modules + python hub.py + popd + pushd . + cd tests/py/ts + python -m pytest -ra --junitxml=${RUNNER_TEST_RESULTS_DIR}/l2_ts_integrations_tests_results.xml -n auto integrations/ popd concurrency: diff --git a/.github/workflows/build-test-linux-x86_64_rtx.yml b/.github/workflows/build-test-linux-x86_64_rtx.yml index 34f9d00568..72d30fcaa3 100644 --- a/.github/workflows/build-test-linux-x86_64_rtx.yml +++ b/.github/workflows/build-test-linux-x86_64_rtx.yml @@ -60,7 +60,7 @@ jobs: post-script: packaging/post_build_script.sh smoke-test-script: packaging/smoke_test_script.sh package-name: torch_tensorrt - name: RTX - Build torch-tensorrt-rtx whl package for Linux x86_64 + name: RTX - Build Linux x86_64 torch-tensorrt whl package uses: ./.github/workflows/build_linux.yml with: repository: ${{ matrix.repository }} @@ -77,8 +77,8 @@ jobs: architecture: "x86_64" use-rtx: true - tests-py-dynamo-converters: - name: Test dynamo converters [Python] + L0-dynamo-converter-tests: + name: L0 dynamo converter tests needs: [filter-matrix, build] strategy: fail-fast: false @@ -91,7 +91,7 @@ jobs: smoke-test-script: packaging/smoke_test_script.sh uses: ./.github/workflows/linux-test.yml with: - job-name: tests-py-dynamo-converters + job-name: L0-dynamo-converter-tests repository: "pytorch/tensorrt" ref: "" test-infra-repository: pytorch/test-infra @@ -101,18 +101,13 @@ jobs: use-rtx: true script: | set -euo pipefail - export USE_HOST_DEPS=1 - export CI_BUILD=1 pushd . cd tests/py/dynamo - python -m pytest -ra --junitxml=${RUNNER_TEST_RESULTS_DIR}/dynamo_converters_test_results.xml -n 4 conversion/ - python -m pytest -ra --junitxml=${RUNNER_TEST_RESULTS_DIR}/dynamo_converters_test_results.xml automatic_plugin/test_automatic_plugin.py - python -m pytest -ra --junitxml=${RUNNER_TEST_RESULTS_DIR}/dynamo_converters_test_results.xml automatic_plugin/test_automatic_plugin_with_attrs.py - python -m pytest -ra --junitxml=${RUNNER_TEST_RESULTS_DIR}/dynamo_converters_test_results.xml automatic_plugin/test_flashinfer_rmsnorm.py + python -m pytest -ra --junitxml=${RUNNER_TEST_RESULTS_DIR}/l0_dynamo_converter_tests_results.xml -n auto --dist=loadscope --maxfail=20 conversion/ popd - tests-py-dynamo-fe: - name: Test dynamo frontend [Python] + L0-dynamo-core-tests: + name: L0 dynamo core tests needs: [filter-matrix, build] strategy: fail-fast: false @@ -125,7 +120,7 @@ jobs: smoke-test-script: packaging/smoke_test_script.sh uses: ./.github/workflows/linux-test.yml with: - job-name: tests-py-dynamo-fe + job-name: L0-dynamo-core-tests repository: "pytorch/tensorrt" ref: "" test-infra-repository: pytorch/test-infra @@ -135,17 +130,16 @@ jobs: use-rtx: true script: | set -euo pipefail - export USE_HOST_DEPS=1 - export CI_BUILD=1 pushd . cd tests/py cd dynamo - python -m pytest -ra --junitxml=${RUNNER_TEST_RESULTS_DIR}/dyn_models_export.xml --ir dynamo models/ - python -m pytest -ra --junitxml=${RUNNER_TEST_RESULTS_DIR}/dyn_models_llm.xml llm/ + python -m pytest -ra -n auto --junitxml=${RUNNER_TEST_RESULTS_DIR}/l0_dynamo_core_runtime_tests_results.xml runtime/test_000_* + python -m pytest -ra -n auto --junitxml=${RUNNER_TEST_RESULTS_DIR}/l0_dynamo_core_partitioning_tests_results.xml partitioning/ + python -m pytest -ra -n auto --junitxml=${RUNNER_TEST_RESULTS_DIR}/l0_dynamo_core_lowering_tests_results.xml lowering/ popd - tests-py-dynamo-serde: - name: Test dynamo export serde [Python] + L0-py-core-tests: + name: L0 core python tests needs: [filter-matrix, build] strategy: fail-fast: false @@ -158,7 +152,7 @@ jobs: smoke-test-script: packaging/smoke_test_script.sh uses: ./.github/workflows/linux-test.yml with: - job-name: tests-py-dynamo-serde + job-name: L0-py-core-tests repository: "pytorch/tensorrt" ref: "" test-infra-repository: pytorch/test-infra @@ -168,18 +162,14 @@ jobs: use-rtx: true script: | set -euo pipefail - export USE_HOST_DEPS=1 - export CI_BUILD=1 pushd . - cd tests/py - cd dynamo - python -m pytest -ra --junitxml=${RUNNER_TEST_RESULTS_DIR}/export_serde_test_results.xml --ir dynamo models/test_export_serde.py - python -m pytest -ra --junitxml=${RUNNER_TEST_RESULTS_DIR}/reexport_test_results.xml --ir dynamo models/test_reexport.py + cd tests/py/core + python -m pytest -ra --junitxml=${RUNNER_TEST_RESULTS_DIR}/l0_py_core_tests_results.xml -n auto . popd - tests-py-torch-compile-be: - name: Test torch compile backend [Python] - needs: [filter-matrix, build] + L1-dynamo-core-tests: + name: L1 dynamo core tests + needs: [filter-matrix, build, L0-dynamo-converter-tests, L0-dynamo-core-tests, L0-py-core-tests] strategy: fail-fast: false matrix: @@ -191,7 +181,7 @@ jobs: smoke-test-script: packaging/smoke_test_script.sh uses: ./.github/workflows/linux-test.yml with: - job-name: tests-py-torch-compile-be + job-name: L1-dynamo-core-tests repository: "pytorch/tensorrt" ref: "" test-infra-repository: pytorch/test-infra @@ -201,19 +191,14 @@ jobs: use-rtx: true script: | set -euo pipefail - export USE_HOST_DEPS=1 - export CI_BUILD=1 pushd . - cd tests/py - cd dynamo - python -m pytest -ra -n 10 --junitxml=${RUNNER_TEST_RESULTS_DIR}/torch_compile_be_test_results.xml backend/ - python -m pytest -ra -n 4 --junitxml=${RUNNER_TEST_RESULTS_DIR}/torch_complete_be_e2e_test_results.xml --ir torch_compile models/test_models.py - python -m pytest -ra --junitxml=${RUNNER_TEST_RESULTS_DIR}/torch_compile_dyn_models_export.xml --ir torch_compile models/test_dyn_models.py + cd tests/py/dynamo + python -m pytest -ra --junitxml=${RUNNER_TEST_RESULTS_DIR}/l1_dynamo_core_tests_results.xml -n auto runtime/test_001_* popd - tests-py-dynamo-core: - name: Test dynamo core [Python] - needs: [filter-matrix, build] + L1-dynamo-compile-tests: + name: L1 dynamo compile tests + needs: [filter-matrix, build, L0-dynamo-converter-tests, L0-dynamo-core-tests, L0-py-core-tests] strategy: fail-fast: false matrix: @@ -225,7 +210,7 @@ jobs: smoke-test-script: packaging/smoke_test_script.sh uses: ./.github/workflows/linux-test.yml with: - job-name: tests-py-dynamo-core + job-name: L1-dynamo-compile-tests repository: "pytorch/tensorrt" ref: "" test-infra-repository: pytorch/test-infra @@ -235,19 +220,45 @@ jobs: use-rtx: true script: | set -euo pipefail - export USE_HOST_DEPS=1 - export CI_BUILD=1 pushd . - cd tests/py - cd dynamo - python -m pytest -ra -n 4 --junitxml=${RUNNER_TEST_RESULTS_DIR}/tests_py_dynamo_core_runtime_test_results.xml --ignore runtime/test_002_cudagraphs_py.py --ignore runtime/test_002_cudagraphs_cpp.py runtime/ - python -m pytest -ra -n 4 --junitxml=${RUNNER_TEST_RESULTS_DIR}/tests_py_dynamo_core_partitioning_test_results.xml partitioning/ - python -m pytest -ra -n 4 --junitxml=${RUNNER_TEST_RESULTS_DIR}/tests_py_dynamo_core_lowering_test_results.xml lowering/ + cd tests/py/dynamo/ + python -m pytest -m critical -ra -n auto --junitxml=${RUNNER_TEST_RESULTS_DIR}/l1_dynamo_compile_tests_results.xml models/ popd - tests-py-dynamo-cudagraphs: - name: Test dynamo cudagraphs [Python] - needs: [filter-matrix, build] + L1-torch-compile-tests: + name: L1 torch compile tests + needs: [filter-matrix, build, L0-dynamo-converter-tests, L0-dynamo-core-tests, L0-py-core-tests] + 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 + uses: ./.github/workflows/linux-test.yml + with: + job-name: L1-torch-compile-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 }} + script: | + set -euo pipefail + pushd . + cd tests/py/dynamo/ + python -m pytest -ra --junitxml=${RUNNER_TEST_RESULTS_DIR}/l1_torch_compile_be_tests_results.xml -n auto backend/ + 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 + 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 + + + L2-torch-compile-tests: + name: L2 torch compile tests + needs: [filter-matrix, build, L1-torch-compile-tests, L1-dynamo-compile-tests, L1-dynamo-core-tests] strategy: fail-fast: false matrix: @@ -259,7 +270,7 @@ jobs: smoke-test-script: packaging/smoke_test_script.sh uses: ./.github/workflows/linux-test.yml with: - job-name: tests-py-dynamo-cudagraphs + job-name: L2-torch-compile-tests repository: "pytorch/tensorrt" ref: "" test-infra-repository: pytorch/test-infra @@ -269,19 +280,15 @@ jobs: use-rtx: true script: | set -euo pipefail - export USE_HOST_DEPS=1 - export CI_BUILD=1 pushd . - cd tests/py - cd dynamo - nvidia-smi - python -m pytest -ra --junitxml=${RUNNER_TEST_RESULTS_DIR}/tests_py_dynamo_core_runtime_cudagraphs_cpp_test_results.xml runtime/test_002_cudagraphs_cpp.py || true - python -m pytest -ra --junitxml=${RUNNER_TEST_RESULTS_DIR}/tests_py_dynamo_core_runtime_cudagraphs_py_test_results.xml runtime/test_002_cudagraphs_py.py || true + cd tests/py/dynamo/ + 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 + 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 - tests-py-core: - name: Test core [Python] - needs: [filter-matrix, build] + L2-dynamo-compile-tests: + name: L2 dynamo compile tests + needs: [filter-matrix, build, L1-dynamo-compile-tests, L1-dynamo-core-tests, L1-torch-compile-tests] strategy: fail-fast: false matrix: @@ -293,7 +300,7 @@ jobs: smoke-test-script: packaging/smoke_test_script.sh uses: ./.github/workflows/linux-test.yml with: - job-name: tests-py-core + job-name: L2-dynamo-compile-tests repository: "pytorch/tensorrt" ref: "" test-infra-repository: pytorch/test-infra @@ -303,13 +310,72 @@ jobs: use-rtx: true script: | set -euo pipefail - export USE_HOST_DEPS=1 - export CI_BUILD=1 pushd . - cd tests/py/core - python -m pytest -ra -n 4 --junitxml=${RUNNER_TEST_RESULTS_DIR}/tests_py_core_test_results.xml . + cd tests/py/dynamo/ + python -m pytest -m "not critical" -ra -n auto --junitxml=${RUNNER_TEST_RESULTS_DIR}/l2_dynamo_compile_tests_results.xml models/ + 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: [filter-matrix, build, L1-dynamo-core-tests, L1-dynamo-compile-tests, L1-torch-compile-tests] + 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 + uses: ./.github/workflows/linux-test.yml + with: + job-name: L2-dynamo-core-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 + 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: [filter-matrix, build, L1-dynamo-core-tests, L1-dynamo-compile-tests, L1-torch-compile-tests] + 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 + uses: ./.github/workflows/linux-test.yml + with: + job-name: L2-dynamo-plugin-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 + python -m pytest -ra --junitxml=${RUNNER_TEST_RESULTS_DIR}/l2_dynamo_plugins_tests_results.xml -n auto --ignore automatic_plugin/ popd + + concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref_name }}-tensorrt-rtx-${{ inputs.repository }}-${{ github.event_name == 'workflow_dispatch' }}-${{ inputs.job-name }} cancel-in-progress: true diff --git a/.github/workflows/build-test-windows.yml b/.github/workflows/build-test-windows.yml index bc8cf52def..c753fbbc16 100644 --- a/.github/workflows/build-test-windows.yml +++ b/.github/workflows/build-test-windows.yml @@ -70,7 +70,7 @@ jobs: env-script: packaging/vc_env_helper.bat smoke-test-script: packaging/smoke_test_windows.py package-name: torch_tensorrt - name: Build torch-tensorrt whl package for Windows + name: Build Windows torch-tensorrt whl package uses: ./.github/workflows/build_windows.yml with: repository: ${{ matrix.repository }} @@ -85,8 +85,8 @@ jobs: trigger-event: ${{ github.event_name }} timeout: 120 - tests-py-torchscript-fe: - name: Test torchscript frontend [Python] + L0-dynamo-converter-tests: + name: L0 dynamo converter tests needs: [substitute-runner, build] strategy: fail-fast: false @@ -96,7 +96,84 @@ jobs: package-name: torch_tensorrt uses: ./.github/workflows/windows-test.yml with: - job-name: tests-py-torchscript-fe + 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 @@ -105,22 +182,18 @@ jobs: pre-script: packaging/driver_upgrade.bat script: | set -euo pipefail - export USE_HOST_DEPS=1 - export CI_BUILD=1 pushd . cd tests/modules python hub.py popd pushd . cd tests/py/ts - python -m pytest -ra --junitxml=${RUNNER_TEST_RESULTS_DIR}/ts_api_test_results.xml api/ - python -m pytest -ra --junitxml=${RUNNER_TEST_RESULTS_DIR}/ts_models_test_results.xml models/ - python -m pytest -ra --junitxml=${RUNNER_TEST_RESULTS_DIR}/ts_integrations_test_results.xml integrations/ + ../../../packaging/vc_env_helper.bat python -m pytest -ra --junitxml=${RUNNER_TEST_RESULTS_DIR}/l0_ts_api_tests_results.xml -n auto api/ popd - tests-py-dynamo-converters: - name: Test dynamo converters [Python] - needs: [substitute-runner, build] + 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: @@ -129,7 +202,7 @@ jobs: package-name: torch_tensorrt uses: ./.github/workflows/windows-test.yml with: - job-name: tests-py-dynamo-converters + job-name: L1-dynamo-core-tests repository: ${{ matrix.repository }} ref: "" test-infra-repository: pytorch/test-infra @@ -138,17 +211,14 @@ jobs: pre-script: packaging/driver_upgrade.bat script: | set -euo pipefail - export USE_HOST_DEPS=1 - export CI_BUILD=1 pushd . - cd tests/py - cd dynamo - python -m pytest -ra --junitxml=${RUNNER_TEST_RESULTS_DIR}/dynamo_converters_test_results.xml -n 4 conversion/ + 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 - tests-py-dynamo-fe: - name: Test dynamo frontend [Python] - needs: [substitute-runner, build] + 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: @@ -157,7 +227,7 @@ jobs: package-name: torch_tensorrt uses: ./.github/workflows/windows-test.yml with: - job-name: tests-py-dynamo-fe + job-name: L1-dynamo-compile-tests repository: ${{ matrix.repository }} ref: "" test-infra-repository: pytorch/test-infra @@ -166,18 +236,14 @@ jobs: pre-script: packaging/driver_upgrade.bat script: | set -euo pipefail - export USE_HOST_DEPS=1 - export CI_BUILD=1 pushd . - cd tests/py - cd dynamo - python -m pytest -ra --junitxml=${RUNNER_TEST_RESULTS_DIR}/dyn_models_export.xml --ir dynamo models/ - python -m pytest -ra --junitxml=${RUNNER_TEST_RESULTS_DIR}/dyn_models_llm.xml llm/ + 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 - tests-py-dynamo-serde: - name: Test dynamo export serde [Python] - needs: [substitute-runner, build] + 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: @@ -186,7 +252,7 @@ jobs: package-name: torch_tensorrt uses: ./.github/workflows/windows-test.yml with: - job-name: tests-py-dynamo-serde + job-name: L1-torch-compile-tests repository: ${{ matrix.repository }} ref: "" test-infra-repository: pytorch/test-infra @@ -195,18 +261,16 @@ jobs: pre-script: packaging/driver_upgrade.bat script: | set -euo pipefail - export USE_HOST_DEPS=1 - export CI_BUILD=1 pushd . - cd tests/py - cd dynamo - python -m pytest -ra --junitxml=${RUNNER_TEST_RESULTS_DIR}/export_serde_test_results.xml --ir dynamo models/test_export_serde.py - python -m pytest -ra --junitxml=${RUNNER_TEST_RESULTS_DIR}/reexport_test_results.xml --ir dynamo models/test_reexport.py + 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 - tests-py-torch-compile-be: - name: Test torch compile backend [Python] - needs: [substitute-runner, build] + 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: @@ -215,7 +279,7 @@ jobs: package-name: torch_tensorrt uses: ./.github/workflows/windows-test.yml with: - job-name: tests-py-torch-compile-be + job-name: L1-torchscript-tests repository: ${{ matrix.repository }} ref: "" test-infra-repository: pytorch/test-infra @@ -224,19 +288,18 @@ jobs: pre-script: packaging/driver_upgrade.bat script: | set -euo pipefail - export USE_HOST_DEPS=1 - export CI_BUILD=1 pushd . - cd tests/py - cd dynamo - python -m pytest -ra -n 10 --junitxml=${RUNNER_TEST_RESULTS_DIR}/torch_compile_be_test_results.xml backend/ - python -m pytest -ra -n 4 --junitxml=${RUNNER_TEST_RESULTS_DIR}/torch_complete_be_e2e_test_results.xml --ir torch_compile models/test_models.py - ../../../packaging/vc_env_helper.bat python -m pytest -ra --junitxml=${RUNNER_TEST_RESULTS_DIR}/torch_compile_dyn_models_export.xml --ir torch_compile models/test_dyn_models.py + 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 - tests-py-dynamo-core: - name: Test dynamo core [Python] - needs: [substitute-runner, build] + 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: @@ -245,7 +308,7 @@ jobs: package-name: torch_tensorrt uses: ./.github/workflows/windows-test.yml with: - job-name: tests-py-dynamo-core + job-name: L2-torch-compile-tests repository: ${{ matrix.repository }} ref: "" test-infra-repository: pytorch/test-infra @@ -254,19 +317,15 @@ jobs: pre-script: packaging/driver_upgrade.bat script: | set -euo pipefail - export USE_HOST_DEPS=1 - export CI_BUILD=1 pushd . - cd tests/py - cd dynamo - ../../../packaging/vc_env_helper.bat python -m pytest -ra -n 4 --junitxml=${RUNNER_TEST_RESULTS_DIR}/tests_py_dynamo_core_runtime_test_results.xml --ignore runtime/test_002_cudagraphs_py.py --ignore runtime/test_002_cudagraphs_cpp.py runtime/ - python -m pytest -ra -n 4 --junitxml=${RUNNER_TEST_RESULTS_DIR}/tests_py_dynamo_core_partitioning_test_results.xml partitioning/ - ../../../packaging/vc_env_helper.bat python -m pytest -ra -n 4 --junitxml=${RUNNER_TEST_RESULTS_DIR}/tests_py_dynamo_core_lowering_test_results.xml lowering/ + 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 - tests-py-dynamo-cudagraphs: - name: Test dynamo cudagraphs [Python] - needs: [substitute-runner, build] + 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: @@ -275,7 +334,7 @@ jobs: package-name: torch_tensorrt uses: ./.github/workflows/windows-test.yml with: - job-name: tests-py-dynamo-cudagraphs + job-name: L2-dynamo-compile-tests repository: ${{ matrix.repository }} ref: "" test-infra-repository: pytorch/test-infra @@ -284,18 +343,15 @@ jobs: pre-script: packaging/driver_upgrade.bat script: | set -euo pipefail - export USE_HOST_DEPS=1 - export CI_BUILD=1 pushd . - cd tests/py - cd dynamo - python -m pytest -ra --junitxml=${RUNNER_TEST_RESULTS_DIR}/tests_py_dynamo_core_runtime_cudagraphs_cpp_test_results.xml runtime/test_002_cudagraphs_cpp.py - python -m pytest -ra --junitxml=${RUNNER_TEST_RESULTS_DIR}/tests_py_dynamo_core_runtime_cudagraphs_py_test_results.xml runtime/test_002_cudagraphs_py.py + 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 - tests-py-core: - name: Test core [Python] - needs: [substitute-runner, build] + 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: @@ -304,7 +360,7 @@ jobs: package-name: torch_tensorrt uses: ./.github/workflows/windows-test.yml with: - job-name: tests-py-core + job-name: L2-dynamo-core-tests repository: ${{ matrix.repository }} ref: "" test-infra-repository: pytorch/test-infra @@ -313,11 +369,63 @@ jobs: pre-script: packaging/driver_upgrade.bat script: | set -euo pipefail - export USE_HOST_DEPS=1 - export CI_BUILD=1 pushd . - cd tests/py/core - python -m pytest -ra -n 4 --junitxml=${RUNNER_TEST_RESULTS_DIR}/tests_py_core_test_results.xml . + 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: diff --git a/.github/workflows/build-test-windows_rtx.yml b/.github/workflows/build-test-windows_rtx.yml index 9ee768b964..5566fc6d37 100644 --- a/.github/workflows/build-test-windows_rtx.yml +++ b/.github/workflows/build-test-windows_rtx.yml @@ -70,7 +70,7 @@ jobs: env-script: packaging/vc_env_helper.bat smoke-test-script: packaging/smoke_test_windows.py package-name: torch_tensorrt - name: RTX - Build torch-tensorrt-rtx whl package for Windows + name: RTX - Build Windows torch-tensorrt whl package uses: ./.github/workflows/build_windows.yml with: repository: ${{ matrix.repository }} @@ -87,8 +87,8 @@ jobs: use-rtx: true timeout: 120 - tests-py-dynamo-converters: - name: Test dynamo converters [Python] + L0-dynamo-converter-tests: + name: L0 dynamo converter tests needs: [substitute-runner, build] strategy: fail-fast: false @@ -98,7 +98,7 @@ jobs: package-name: torch_tensorrt uses: ./.github/workflows/windows-test.yml with: - job-name: tests-py-dynamo-converters + job-name: L0-dynamo-converter-tests repository: ${{ matrix.repository }} ref: "" test-infra-repository: pytorch/test-infra @@ -108,16 +108,13 @@ jobs: use-rtx: true script: | set -euo pipefail - export USE_HOST_DEPS=1 - export CI_BUILD=1 pushd . - cd tests/py - cd dynamo - python -m pytest -ra --junitxml=${RUNNER_TEST_RESULTS_DIR}/dynamo_converters_test_results.xml -n 4 conversion/ + 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 - tests-py-dynamo-fe: - name: Test dynamo frontend [Python] + L0-dynamo-core-tests: + name: L0 dynamo core tests needs: [substitute-runner, build] strategy: fail-fast: false @@ -127,7 +124,7 @@ jobs: package-name: torch_tensorrt uses: ./.github/workflows/windows-test.yml with: - job-name: tests-py-dynamo-fe + job-name: L0-dynamo-core-tests repository: ${{ matrix.repository }} ref: "" test-infra-repository: pytorch/test-infra @@ -137,17 +134,15 @@ jobs: use-rtx: true script: | set -euo pipefail - export USE_HOST_DEPS=1 - export CI_BUILD=1 pushd . - cd tests/py - cd dynamo - python -m pytest -ra --junitxml=${RUNNER_TEST_RESULTS_DIR}/dyn_models_export.xml --ir dynamo models/ - python -m pytest -ra --junitxml=${RUNNER_TEST_RESULTS_DIR}/dyn_models_llm.xml llm/ + 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 - tests-py-dynamo-serde: - name: Test dynamo export serde [Python] + L0-py-core-tests: + name: L0 core python tests needs: [substitute-runner, build] strategy: fail-fast: false @@ -157,7 +152,7 @@ jobs: package-name: torch_tensorrt uses: ./.github/workflows/windows-test.yml with: - job-name: tests-py-dynamo-serde + job-name: L0-core-python-tests repository: ${{ matrix.repository }} ref: "" test-infra-repository: pytorch/test-infra @@ -167,18 +162,16 @@ jobs: use-rtx: true script: | set -euo pipefail - export USE_HOST_DEPS=1 - export CI_BUILD=1 pushd . - cd tests/py - cd dynamo - python -m pytest -ra --junitxml=${RUNNER_TEST_RESULTS_DIR}/export_serde_test_results.xml --ir dynamo models/test_export_serde.py - python -m pytest -ra --junitxml=${RUNNER_TEST_RESULTS_DIR}/reexport_test_results.xml --ir dynamo models/test_reexport.py + 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 - tests-py-torch-compile-be: - name: Test torch compile backend [Python] - needs: [substitute-runner, build] + + + 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] strategy: fail-fast: false matrix: @@ -187,7 +180,7 @@ jobs: package-name: torch_tensorrt uses: ./.github/workflows/windows-test.yml with: - job-name: tests-py-torch-compile-be + job-name: L1-dynamo-core-tests repository: ${{ matrix.repository }} ref: "" test-infra-repository: pytorch/test-infra @@ -197,19 +190,14 @@ jobs: use-rtx: true script: | set -euo pipefail - export USE_HOST_DEPS=1 - export CI_BUILD=1 pushd . - cd tests/py - cd dynamo - python -m pytest -ra -n 10 --junitxml=${RUNNER_TEST_RESULTS_DIR}/torch_compile_be_test_results.xml backend/ - python -m pytest -ra -n 4 --junitxml=${RUNNER_TEST_RESULTS_DIR}/torch_complete_be_e2e_test_results.xml --ir torch_compile models/test_models.py - ../../../packaging/vc_env_helper.bat python -m pytest -ra --junitxml=${RUNNER_TEST_RESULTS_DIR}/torch_compile_dyn_models_export.xml --ir torch_compile models/test_dyn_models.py + 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 - tests-py-dynamo-core: - name: Test dynamo core [Python] - needs: [substitute-runner, build] + 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] strategy: fail-fast: false matrix: @@ -218,7 +206,7 @@ jobs: package-name: torch_tensorrt uses: ./.github/workflows/windows-test.yml with: - job-name: tests-py-dynamo-core + job-name: L1-dynamo-compile-tests repository: ${{ matrix.repository }} ref: "" test-infra-repository: pytorch/test-infra @@ -228,19 +216,14 @@ jobs: use-rtx: true script: | set -euo pipefail - export USE_HOST_DEPS=1 - export CI_BUILD=1 pushd . - cd tests/py - cd dynamo - ../../../packaging/vc_env_helper.bat python -m pytest -ra -n 4 --junitxml=${RUNNER_TEST_RESULTS_DIR}/tests_py_dynamo_core_runtime_test_results.xml --ignore runtime/test_002_cudagraphs_py.py --ignore runtime/test_002_cudagraphs_cpp.py runtime/ - python -m pytest -ra -n 4 --junitxml=${RUNNER_TEST_RESULTS_DIR}/tests_py_dynamo_core_partitioning_test_results.xml partitioning/ - ../../../packaging/vc_env_helper.bat python -m pytest -ra -n 4 --junitxml=${RUNNER_TEST_RESULTS_DIR}/tests_py_dynamo_core_lowering_test_results.xml lowering/ + 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 - tests-py-dynamo-cudagraphs: - name: Test dynamo cudagraphs [Python] - needs: [substitute-runner, build] + 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] strategy: fail-fast: false matrix: @@ -249,7 +232,7 @@ jobs: package-name: torch_tensorrt uses: ./.github/workflows/windows-test.yml with: - job-name: tests-py-dynamo-cudagraphs + job-name: L1-torch-compile-tests repository: ${{ matrix.repository }} ref: "" test-infra-repository: pytorch/test-infra @@ -259,18 +242,16 @@ jobs: use-rtx: true script: | set -euo pipefail - export USE_HOST_DEPS=1 - export CI_BUILD=1 pushd . - cd tests/py - cd dynamo - python -m pytest -ra --junitxml=${RUNNER_TEST_RESULTS_DIR}/tests_py_dynamo_core_runtime_cudagraphs_cpp_test_results.xml runtime/test_002_cudagraphs_cpp.py - python -m pytest -ra --junitxml=${RUNNER_TEST_RESULTS_DIR}/tests_py_dynamo_core_runtime_cudagraphs_py_test_results.xml runtime/test_002_cudagraphs_py.py + 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 - tests-py-core: - name: Test core [Python] - needs: [substitute-runner, build] + 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] strategy: fail-fast: false matrix: @@ -279,7 +260,7 @@ jobs: package-name: torch_tensorrt uses: ./.github/workflows/windows-test.yml with: - job-name: tests-py-core + job-name: L2-torch-compile-tests repository: ${{ matrix.repository }} ref: "" test-infra-repository: pytorch/test-infra @@ -289,13 +270,92 @@ jobs: use-rtx: true script: | set -euo pipefail - export USE_HOST_DEPS=1 - export CI_BUILD=1 pushd . - cd tests/py/core - python -m pytest -ra -n 4 --junitxml=${RUNNER_TEST_RESULTS_DIR}/tests_py_core_test_results.xml . + 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] + 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 + use-rtx: true + 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] + 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 + use-rtx: true + 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] + 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 + use-rtx: true + 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 + + concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref_name }}-tensorrt-rtx-${{ inputs.repository }}-${{ github.event_name == 'workflow_dispatch' }}-${{ inputs.job-name }} cancel-in-progress: true diff --git a/setup.py b/setup.py index f4d22d0575..878e4de4ca 100644 --- a/setup.py +++ b/setup.py @@ -146,10 +146,6 @@ def load_dep_info(): if jetpack == "1": IS_JETPACK = True -if IS_AARCH64 and (sbsa := os.environ.get("SBSA_BUILD")) is not None: - if sbsa == "1": - IS_SBSA = True - if RELEASE: __version__ = os.environ.get("BUILD_VERSION") else: @@ -639,7 +635,6 @@ def run(self): ), extra_compile_args=( [ - f'/DPYBIND11_BUILD_ABI=\\"{getattr(torch._C, "_PYBIND11_BUILD_ABI", "_cxxabi1018")}\\"', "/GS-", "/permissive-", "/utf-8", @@ -776,12 +771,11 @@ def get_sbsa_requirements(): sbsa_requirements = base_requirements + ["numpy"] if IS_DLFW_CI: return sbsa_requirements + # TensorRT does not currently build wheels for Tegra, so we need to use the local tensorrt install from the tarball for thor + # also due to we use sbsa torch_tensorrt wheel for thor, so when we build sbsa wheel, we need to only include tensorrt dependency. return sbsa_requirements + [ "torch>=2.10.0.dev,<2.11.0", "tensorrt>=10.13.0,<10.14.0", - f"{tensorrt_prefix}>=10.13.0,<10.14.0", - f"{tensorrt_prefix}-bindings>=10.13.0,<10.14.0", - f"{tensorrt_prefix}-libs>=10.13.0,<10.14.0", ] diff --git a/tests/py/dynamo/conversion/test_reshape_aten.py b/tests/py/dynamo/conversion/test_reshape_aten.py index a8c831f23b..ced09bee7a 100644 --- a/tests/py/dynamo/conversion/test_reshape_aten.py +++ b/tests/py/dynamo/conversion/test_reshape_aten.py @@ -5,6 +5,7 @@ from parameterized import parameterized from torch.testing._internal.common_utils import run_tests from torch_tensorrt import Input +from torch_tensorrt._utils import is_tensorrt_version_supported from .harness import DispatchTestCase @@ -19,7 +20,7 @@ class TestReshapeConverter(DispatchTestCase): ] ) @unittest.skipIf( - trt.__version__ < "8.5", + not is_tensorrt_version_supported("8.5"), "Shape tensor supported well in TensorRT 8.5 and later", ) def test_reshape(self, target_shape): @@ -45,7 +46,7 @@ def forward(self, x): ] ) @unittest.skipIf( - trt.__version__ < "8.5", + not is_tensorrt_version_supported("8.5"), "Shape tensor supported well in TensorRT 8.5 and later", ) def test_reshape_with_dynamic_shape(self, target_shape): diff --git a/tests/py/dynamo/models/test_dtype_support.py b/tests/py/dynamo/models/test_dtype_support.py index a7274da40e..6c02db6b68 100644 --- a/tests/py/dynamo/models/test_dtype_support.py +++ b/tests/py/dynamo/models/test_dtype_support.py @@ -3,6 +3,7 @@ import math import unittest +import pytest import torch import torch_tensorrt from torch import nn @@ -12,6 +13,7 @@ from ..testing_utilities import DECIMALS_OF_AGREEMENT, lower_graph_testing +@pytest.mark.critical class Test64BitSupport(TestCase): @unittest.skipIf( not torch_tensorrt.ENABLED_FEATURES.torch_tensorrt_runtime, @@ -189,6 +191,7 @@ def forward(self, x): ) +@pytest.mark.critical @unittest.skipIf( torch.cuda.get_device_properties(torch.cuda.current_device()).major < 8 or ( diff --git a/tests/py/dynamo/models/test_dyn_models.py b/tests/py/dynamo/models/test_dyn_models.py index bd8a823519..28d72433b7 100644 --- a/tests/py/dynamo/models/test_dyn_models.py +++ b/tests/py/dynamo/models/test_dyn_models.py @@ -14,6 +14,7 @@ @pytest.mark.unit +@pytest.mark.critical def test_base_dynamic(ir): """ Tests the model (which is fully convertible) with dynamic shapes @@ -68,6 +69,7 @@ def forward(self, x): @pytest.mark.unit +@pytest.mark.critical def test_base_dynamic_fallback(ir): """ Tests the model with dynamic shapes where torch.abs op is forced to run in PyTorch @@ -125,6 +127,7 @@ def forward(self, x): @pytest.mark.unit +@pytest.mark.critical def test_view(ir): """ Tests the model (which is fully convertible) with dynamic shapes @@ -234,6 +237,7 @@ def test_resnet_dynamic(ir, dtype): @pytest.mark.unit +@pytest.mark.critical def test_view(ir): """ Tests the model (which is fully convertible) with dynamic shapes @@ -280,6 +284,7 @@ def forward(self, x): @pytest.mark.unit +@pytest.mark.critical def test_linear(ir): """ Tests the model with linear op and operator.mul (added internally by PyTorch) @@ -332,6 +337,7 @@ def forward(self, x): @pytest.mark.unit +@pytest.mark.critical def test_dynamic_with_fallback_shape_tensor_pass_through(ir): class MyModule(torch.nn.Module): def __init__(self): diff --git a/tests/py/dynamo/models/test_export_kwargs_serde.py b/tests/py/dynamo/models/test_export_kwargs_serde.py index d352829698..70a0fde12f 100644 --- a/tests/py/dynamo/models/test_export_kwargs_serde.py +++ b/tests/py/dynamo/models/test_export_kwargs_serde.py @@ -21,6 +21,7 @@ @pytest.mark.unit +@pytest.mark.critical def test_custom_model(): class net(nn.Module): def __init__(self): @@ -81,6 +82,7 @@ def forward(self, x, b=5, c=None, d=None): @pytest.mark.unit +@pytest.mark.critical def test_custom_model_with_dynamo_trace(): class net(nn.Module): def __init__(self): @@ -142,6 +144,7 @@ def forward(self, x, b=5, c=None, d=None): @pytest.mark.unit +@pytest.mark.critical def test_custom_model_with_dynamo_trace_dynamic(): class net(nn.Module): def __init__(self): @@ -212,6 +215,7 @@ def forward(self, x, b=5, c=None, d=None): @pytest.mark.unit +@pytest.mark.critical def test_custom_model_with_dynamo_trace_kwarg_dynamic(): ir = "dynamo" @@ -301,6 +305,7 @@ def forward(self, x, b=None, c=None, d=None, e=[]): @pytest.mark.unit +@pytest.mark.critical def test_custom_model_with_dynamo_trace_kwarg_dynamic(): ir = "dynamo" diff --git a/tests/py/dynamo/models/test_export_serde.py b/tests/py/dynamo/models/test_export_serde.py index 4afe885930..d9c2ca3b0b 100644 --- a/tests/py/dynamo/models/test_export_serde.py +++ b/tests/py/dynamo/models/test_export_serde.py @@ -21,6 +21,7 @@ @pytest.mark.unit +@pytest.mark.critical def test_base_full_compile(ir): """ This tests export serde functionality on a base model @@ -74,6 +75,7 @@ def forward(self, x): @pytest.mark.unit +@pytest.mark.critical def test_base_full_compile_multiple_outputs(ir): """ This tests export serde functionality on a base model @@ -133,6 +135,7 @@ def forward(self, x): @pytest.mark.unit +@pytest.mark.critical def test_no_compile(ir): """ This tests export serde functionality on a model @@ -191,6 +194,7 @@ def forward(self, x): @pytest.mark.unit +@pytest.mark.critical def test_hybrid_relu_fallback(ir): """ This tests export save and load functionality on a hybrid @@ -421,6 +425,7 @@ def test_resnet18_torch_exec_ops_serde(ir): @pytest.mark.unit +@pytest.mark.critical def test_hybrid_conv_fallback(ir): """ This tests export save and load functionality on a hybrid @@ -481,6 +486,7 @@ def forward(self, x): @pytest.mark.unit +@pytest.mark.critical def test_hybrid_conv_fallback_cpu_offload(ir): """ This tests export save and load functionality on a hybrid @@ -542,6 +548,7 @@ def forward(self, x): @pytest.mark.unit +@pytest.mark.critical def test_arange_export(ir): """ This tests export save and load functionality on a arange static graph diff --git a/tests/py/dynamo/models/test_model_refit.py b/tests/py/dynamo/models/test_model_refit.py index d1ae28fb13..222221e089 100644 --- a/tests/py/dynamo/models/test_model_refit.py +++ b/tests/py/dynamo/models/test_model_refit.py @@ -102,6 +102,7 @@ def test_mapping(): "torchvision is not installed", ) @pytest.mark.unit +@pytest.mark.critical def test_conv_refit_with_weightmap(): class net(nn.Module): def __init__(self): diff --git a/tests/py/dynamo/models/test_models.py b/tests/py/dynamo/models/test_models.py index c52b732c42..10ed5afd70 100644 --- a/tests/py/dynamo/models/test_models.py +++ b/tests/py/dynamo/models/test_models.py @@ -372,6 +372,7 @@ def test_resnet18_half(ir): torchtrt.ENABLED_FEATURES.tensorrt_rtx, "bf16 is not supported for tensorrt_rtx", ) +@pytest.mark.critical def test_bf16_model(ir): class MyModule(torch.nn.Module): def __init__(self): @@ -420,6 +421,7 @@ def forward(self, x): torchtrt.ENABLED_FEATURES.tensorrt_rtx, "bf16 is not supported for tensorrt_rtx", ) +@pytest.mark.critical def test_bf16_fallback_model(ir): class MyModule(torch.nn.Module): def __init__(self): diff --git a/tests/py/dynamo/models/test_models_export.py b/tests/py/dynamo/models/test_models_export.py index 4620176523..f87911cc74 100644 --- a/tests/py/dynamo/models/test_models_export.py +++ b/tests/py/dynamo/models/test_models_export.py @@ -219,6 +219,7 @@ def test_resnet18_half(ir): "ModelOpt is required to run this test", ) @pytest.mark.unit +@pytest.mark.critical def test_base_fp4_dynamic_shapes(ir): import modelopt.torch.quantization as mtq from modelopt.torch.quantization.utils import export_torch_mode @@ -281,6 +282,7 @@ def calibrate_loop(model): "ModelOpt is required to run this test", ) @pytest.mark.unit +@pytest.mark.critical def test_base_fp4_static_shapes(ir): import modelopt.torch.quantization as mtq from modelopt.torch.quantization.utils import export_torch_mode @@ -338,6 +340,7 @@ def calibrate_loop(model): "ModelOpt is required to run this test", ) @pytest.mark.unit +@pytest.mark.critical def test_base_fp8(ir): import modelopt.torch.quantization as mtq from modelopt.torch.quantization.utils import export_torch_mode @@ -388,6 +391,7 @@ def calibrate_loop(model): "modelopt 0.17.0 or later is required, Int8 quantization is supported in modelopt since 0.17.0 or later for linux", ) @pytest.mark.unit +@pytest.mark.critical @pytest.mark.parametrize("dtype", [torch.float16, torch.bfloat16, torch.float32]) def test_base_int8(ir, dtype): import modelopt.torch.quantization as mtq @@ -447,6 +451,7 @@ def calibrate_loop(model): "modelopt 0.17.0 or later is required, Int8 quantization is supported in modelopt since 0.17.0 or later for linux", ) @pytest.mark.unit +@pytest.mark.critical @pytest.mark.parametrize("dtype", [torch.float16, torch.bfloat16, torch.float32]) def test_base_int8_dynamic_shape(ir, dtype): import modelopt.torch.quantization as mtq diff --git a/tests/py/dynamo/models/test_reexport.py b/tests/py/dynamo/models/test_reexport.py index d86217bd51..7c414def52 100644 --- a/tests/py/dynamo/models/test_reexport.py +++ b/tests/py/dynamo/models/test_reexport.py @@ -18,6 +18,7 @@ @pytest.mark.unit +@pytest.mark.critical def test_base_full_compile(ir): """ This tests export serde functionality on a base model @@ -74,6 +75,7 @@ def forward(self, x): @pytest.mark.unit +@pytest.mark.critical def test_base_full_compile_multiple_outputs(ir): """ This tests export serde functionality on a base model @@ -136,6 +138,7 @@ def forward(self, x): @pytest.mark.unit +@pytest.mark.critical def test_no_compile(ir): """ This tests export serde functionality on a model