Skip to content

Commit

Permalink
Disable tests for Python-only runtime + Win unsupported ops
Browse files Browse the repository at this point in the history
Remove serde and extraneous tests
  • Loading branch information
gs-olive committed Apr 23, 2024
1 parent a650750 commit 5fac363
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 92 deletions.
88 changes: 0 additions & 88 deletions .github/workflows/build-test-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,41 +39,6 @@ jobs:
package-name: ${{ matrix.package-name }}
trigger-event: ${{ github.event_name }}

# tests-py-torchscript-fe:
# name: Test torchscript frontend [Python]
# needs: [generate-matrix, build]
# strategy:
# fail-fast: false
# matrix:
# include:
# - repository: pytorch/tensorrt
# package-name: torch_tensorrt
# pre-script: packaging/pre_build_script.sh
# uses: pytorch/tensorrt/.github/workflows/windows-test.yml@main
# with:
# job-name: tests-py-torchscript-fe
# repository: "pytorch/tensorrt"
# ref: ""
# test-infra-repository: pytorch/test-infra
# test-infra-ref: main
# build-matrix: ${{ needs.generate-matrix.outputs.matrix }}
# pre-script: ${{ matrix.pre-script }}
# script: |
# export USE_HOST_DEPS=1
# export LD_LIBRARY_PATH=/usr/lib64:$LD_LIBRARY_PATH
# pushd .
# cd tests/modules
# ${CONDA_RUN} python -m pip install --pre -r requirements.txt --use-deprecated=legacy-resolver
# ${CONDA_RUN} python hub.py
# popd
# pushd .
# cd tests/py/ts
# ${CONDA_RUN} python -m pip install --pre pytest timm transformers parameterized expecttest==0.1.6 --use-deprecated=legacy-resolver
# ${CONDA_RUN} python -m pytest --junitxml=${RUNNER_TEST_RESULTS_DIR}/ts_api_test_results.xml api/
# ${CONDA_RUN} python -m pytest --junitxml=${RUNNER_TEST_RESULTS_DIR}/ts_models_test_results.xml models/
# ${CONDA_RUN} python -m pytest --junitxml=${RUNNER_TEST_RESULTS_DIR}/ts_integrations_test_results.xml integrations/
# popd

tests-py-dynamo-converters:
name: Test dynamo converters [Python]
needs: [generate-matrix, build]
Expand Down Expand Up @@ -127,32 +92,6 @@ jobs:
${CONDA_RUN} python -m pytest --junitxml=${RUNNER_TEST_RESULTS_DIR}/dyn_models_export.xml --ir dynamo models/test_dyn_models.py
popd
tests-py-dynamo-serde:
name: Test dynamo export serde [Python]
needs: [generate-matrix, build]
strategy:
fail-fast: false
matrix:
include:
- repository: pytorch/tensorrt
package-name: torch_tensorrt
uses: ./.github/workflows/windows-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.generate-matrix.outputs.matrix }}
pre-script: packaging/driver_upgrade.bat
script: |
export USE_HOST_DEPS=1
pushd .
cd tests/py/dynamo
${CONDA_RUN} python -m pip install --pre pytest-xdist timm transformers parameterized expecttest==0.1.6 --use-deprecated=legacy-resolver
${CONDA_RUN} python -m pytest --junitxml=${RUNNER_TEST_RESULTS_DIR}/export_serde_test_results.xml --ir dynamo models/test_export_serde.py
popd
tests-py-torch-compile-be:
name: Test torch compile backend [Python]
needs: [generate-matrix, build]
Expand Down Expand Up @@ -207,30 +146,3 @@ jobs:
${CONDA_RUN} python -m pytest -n 4 --junitxml=${RUNNER_TEST_RESULTS_DIR}/tests_py_dynamo_core_partitioning_test_results.xml partitioning/
${CONDA_RUN} python -m pytest -n 4 --junitxml=${RUNNER_TEST_RESULTS_DIR}/tests_py_dynamo_core_lowering_test_results.xml lowering/
popd
# tests-py-core:
# name: Test core [Python]
# needs: [generate-matrix, build]
# strategy:
# fail-fast: false
# matrix:
# include:
# - repository: pytorch/tensorrt
# package-name: torch_tensorrt
# pre-script: packaging/pre_build_script.sh
# uses: pytorch/tensorrt/.github/workflows/windows-test.yml@main
# with:
# job-name: tests-py-core
# repository: "pytorch/tensorrt"
# ref: ""
# test-infra-repository: pytorch/test-infra
# test-infra-ref: main
# build-matrix: ${{ needs.generate-matrix.outputs.matrix }}
# pre-script: ${{ matrix.pre-script }}
# script: |
# export USE_HOST_DEPS=1
# pushd .
# cd tests/py/core
# ${CONDA_RUN} python -m pip install --pre pytest-xdist timm transformers parameterized expecttest==0.1.6 --use-deprecated=legacy-resolver
# ${CONDA_RUN} python -m pytest -n 4 --junitxml=${RUNNER_TEST_RESULTS_DIR}/tests_py_core_test_results.xml .
# popd
8 changes: 7 additions & 1 deletion tests/py/dynamo/lowering/test_aten_lowering_passes.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
import sys
import unittest

import torch
import torch_tensorrt
from torch.testing._internal.common_utils import TestCase, run_tests

import torch_tensorrt

from ..testing_utilities import DECIMALS_OF_AGREEMENT, lower_graph_testing


Expand Down Expand Up @@ -273,6 +275,10 @@ def forward(self, q, k, v):
torch.cuda.get_device_properties(torch.cuda.current_device()).major < 8,
"GPU compute capability is too low to run flash attention, need Ampere (8.0) or greater",
)
@unittest.skipIf(
sys.platform.startswith("win"),
"Test not supported on Windows",
)
class TestLowerFlashAttention(TestCase):
def test_lower_flash_attention(self):
class FlashAttention(torch.nn.Module):
Expand Down
8 changes: 5 additions & 3 deletions tests/py/dynamo/runtime/test_hw_compat.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@
import unittest

import torch
import torch_tensorrt
from torch.testing._internal.common_utils import TestCase, run_tests

import torch_tensorrt


class TestHardwareCompatibility(TestCase):
@unittest.skipIf(
Expand Down Expand Up @@ -63,8 +64,9 @@ def forward(self, x):
self.assertIn("Hardware Compatibility: Disabled", cpp_repr)

@unittest.skipIf(
torch.ops.tensorrt.ABI_VERSION() != "5",
"Detected incorrect ABI version, please update this test case",
not torch_tensorrt.ENABLED_FEATURES.torch_tensorrt_runtime
or torch.ops.tensorrt.ABI_VERSION() != "5",
"Torch-TensorRT runtime is not available or ABI Version is compatible",
)
@unittest.skipIf(
not torch_tensorrt.ENABLED_FEATURES.torch_tensorrt_runtime,
Expand Down

0 comments on commit 5fac363

Please sign in to comment.