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
  • Loading branch information
gs-olive committed Apr 22, 2024
1 parent cf58da3 commit 6204ef8
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
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 6204ef8

Please sign in to comment.