Skip to content

Commit 5fac363

Browse files
committed
Disable tests for Python-only runtime + Win unsupported ops
Remove serde and extraneous tests
1 parent a650750 commit 5fac363

File tree

3 files changed

+12
-92
lines changed

3 files changed

+12
-92
lines changed

.github/workflows/build-test-windows.yml

-88
Original file line numberDiff line numberDiff line change
@@ -39,41 +39,6 @@ jobs:
3939
package-name: ${{ matrix.package-name }}
4040
trigger-event: ${{ github.event_name }}
4141

42-
# tests-py-torchscript-fe:
43-
# name: Test torchscript frontend [Python]
44-
# needs: [generate-matrix, build]
45-
# strategy:
46-
# fail-fast: false
47-
# matrix:
48-
# include:
49-
# - repository: pytorch/tensorrt
50-
# package-name: torch_tensorrt
51-
# pre-script: packaging/pre_build_script.sh
52-
# uses: pytorch/tensorrt/.github/workflows/windows-test.yml@main
53-
# with:
54-
# job-name: tests-py-torchscript-fe
55-
# repository: "pytorch/tensorrt"
56-
# ref: ""
57-
# test-infra-repository: pytorch/test-infra
58-
# test-infra-ref: main
59-
# build-matrix: ${{ needs.generate-matrix.outputs.matrix }}
60-
# pre-script: ${{ matrix.pre-script }}
61-
# script: |
62-
# export USE_HOST_DEPS=1
63-
# export LD_LIBRARY_PATH=/usr/lib64:$LD_LIBRARY_PATH
64-
# pushd .
65-
# cd tests/modules
66-
# ${CONDA_RUN} python -m pip install --pre -r requirements.txt --use-deprecated=legacy-resolver
67-
# ${CONDA_RUN} python hub.py
68-
# popd
69-
# pushd .
70-
# cd tests/py/ts
71-
# ${CONDA_RUN} python -m pip install --pre pytest timm transformers parameterized expecttest==0.1.6 --use-deprecated=legacy-resolver
72-
# ${CONDA_RUN} python -m pytest --junitxml=${RUNNER_TEST_RESULTS_DIR}/ts_api_test_results.xml api/
73-
# ${CONDA_RUN} python -m pytest --junitxml=${RUNNER_TEST_RESULTS_DIR}/ts_models_test_results.xml models/
74-
# ${CONDA_RUN} python -m pytest --junitxml=${RUNNER_TEST_RESULTS_DIR}/ts_integrations_test_results.xml integrations/
75-
# popd
76-
7742
tests-py-dynamo-converters:
7843
name: Test dynamo converters [Python]
7944
needs: [generate-matrix, build]
@@ -127,32 +92,6 @@ jobs:
12792
${CONDA_RUN} python -m pytest --junitxml=${RUNNER_TEST_RESULTS_DIR}/dyn_models_export.xml --ir dynamo models/test_dyn_models.py
12893
popd
12994
130-
tests-py-dynamo-serde:
131-
name: Test dynamo export serde [Python]
132-
needs: [generate-matrix, build]
133-
strategy:
134-
fail-fast: false
135-
matrix:
136-
include:
137-
- repository: pytorch/tensorrt
138-
package-name: torch_tensorrt
139-
uses: ./.github/workflows/windows-test.yml
140-
with:
141-
job-name: tests-py-dynamo-serde
142-
repository: "pytorch/tensorrt"
143-
ref: ""
144-
test-infra-repository: pytorch/test-infra
145-
test-infra-ref: main
146-
build-matrix: ${{ needs.generate-matrix.outputs.matrix }}
147-
pre-script: packaging/driver_upgrade.bat
148-
script: |
149-
export USE_HOST_DEPS=1
150-
pushd .
151-
cd tests/py/dynamo
152-
${CONDA_RUN} python -m pip install --pre pytest-xdist timm transformers parameterized expecttest==0.1.6 --use-deprecated=legacy-resolver
153-
${CONDA_RUN} python -m pytest --junitxml=${RUNNER_TEST_RESULTS_DIR}/export_serde_test_results.xml --ir dynamo models/test_export_serde.py
154-
popd
155-
15695
tests-py-torch-compile-be:
15796
name: Test torch compile backend [Python]
15897
needs: [generate-matrix, build]
@@ -207,30 +146,3 @@ jobs:
207146
${CONDA_RUN} python -m pytest -n 4 --junitxml=${RUNNER_TEST_RESULTS_DIR}/tests_py_dynamo_core_partitioning_test_results.xml partitioning/
208147
${CONDA_RUN} python -m pytest -n 4 --junitxml=${RUNNER_TEST_RESULTS_DIR}/tests_py_dynamo_core_lowering_test_results.xml lowering/
209148
popd
210-
211-
# tests-py-core:
212-
# name: Test core [Python]
213-
# needs: [generate-matrix, build]
214-
# strategy:
215-
# fail-fast: false
216-
# matrix:
217-
# include:
218-
# - repository: pytorch/tensorrt
219-
# package-name: torch_tensorrt
220-
# pre-script: packaging/pre_build_script.sh
221-
# uses: pytorch/tensorrt/.github/workflows/windows-test.yml@main
222-
# with:
223-
# job-name: tests-py-core
224-
# repository: "pytorch/tensorrt"
225-
# ref: ""
226-
# test-infra-repository: pytorch/test-infra
227-
# test-infra-ref: main
228-
# build-matrix: ${{ needs.generate-matrix.outputs.matrix }}
229-
# pre-script: ${{ matrix.pre-script }}
230-
# script: |
231-
# export USE_HOST_DEPS=1
232-
# pushd .
233-
# cd tests/py/core
234-
# ${CONDA_RUN} python -m pip install --pre pytest-xdist timm transformers parameterized expecttest==0.1.6 --use-deprecated=legacy-resolver
235-
# ${CONDA_RUN} python -m pytest -n 4 --junitxml=${RUNNER_TEST_RESULTS_DIR}/tests_py_core_test_results.xml .
236-
# popd

tests/py/dynamo/lowering/test_aten_lowering_passes.py

+7-1
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
1+
import sys
12
import unittest
23

34
import torch
4-
import torch_tensorrt
55
from torch.testing._internal.common_utils import TestCase, run_tests
66

7+
import torch_tensorrt
8+
79
from ..testing_utilities import DECIMALS_OF_AGREEMENT, lower_graph_testing
810

911

@@ -273,6 +275,10 @@ def forward(self, q, k, v):
273275
torch.cuda.get_device_properties(torch.cuda.current_device()).major < 8,
274276
"GPU compute capability is too low to run flash attention, need Ampere (8.0) or greater",
275277
)
278+
@unittest.skipIf(
279+
sys.platform.startswith("win"),
280+
"Test not supported on Windows",
281+
)
276282
class TestLowerFlashAttention(TestCase):
277283
def test_lower_flash_attention(self):
278284
class FlashAttention(torch.nn.Module):

tests/py/dynamo/runtime/test_hw_compat.py

+5-3
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@
22
import unittest
33

44
import torch
5-
import torch_tensorrt
65
from torch.testing._internal.common_utils import TestCase, run_tests
76

7+
import torch_tensorrt
8+
89

910
class TestHardwareCompatibility(TestCase):
1011
@unittest.skipIf(
@@ -63,8 +64,9 @@ def forward(self, x):
6364
self.assertIn("Hardware Compatibility: Disabled", cpp_repr)
6465

6566
@unittest.skipIf(
66-
torch.ops.tensorrt.ABI_VERSION() != "5",
67-
"Detected incorrect ABI version, please update this test case",
67+
not torch_tensorrt.ENABLED_FEATURES.torch_tensorrt_runtime
68+
or torch.ops.tensorrt.ABI_VERSION() != "5",
69+
"Torch-TensorRT runtime is not available or ABI Version is compatible",
6870
)
6971
@unittest.skipIf(
7072
not torch_tensorrt.ENABLED_FEATURES.torch_tensorrt_runtime,

0 commit comments

Comments
 (0)