Skip to content

Commit 6204ef8

Browse files
committed
Disable tests for Python-only runtime + Win unsupported ops
1 parent cf58da3 commit 6204ef8

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

tests/py/dynamo/lowering/test_aten_lowering_passes.py

Lines changed: 7 additions & 1 deletion
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

Lines changed: 5 additions & 3 deletions
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)