Skip to content

Commit

Permalink
skip tests if customized ops are not enables
Browse files Browse the repository at this point in the history
Signed-off-by: Jinzhe Zeng <[email protected]>
  • Loading branch information
njzjz committed Jun 17, 2024
1 parent 22ae3b7 commit 9920e57
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 0 deletions.
4 changes: 4 additions & 0 deletions source/tests/pt/test_tabulate_fusion_se_a.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@

import torch

from deepmd.pt.cxx_op import (
ENABLE_CUSTOMIZED_OP,
)
from deepmd.pt.utils import (
env,
)
Expand All @@ -13,6 +16,7 @@


@parameterized((torch.float64, torch.float32))
@unittest.skipIf(not ENABLE_CUSTOMIZED_OP, "PyTorch customized OPs are not built")
class TestTabulateFusionSeAOp(unittest.TestCase):
def setUp(self):
(dtype,) = self.param
Expand Down
4 changes: 4 additions & 0 deletions source/tests/pt/test_tabulate_fusion_se_atten.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@

import torch

from deepmd.pt.cxx_op import (
ENABLE_CUSTOMIZED_OP,
)
from deepmd.pt.utils import (
env,
)
Expand All @@ -13,6 +16,7 @@


@parameterized((torch.float64, torch.float32))
@unittest.skipIf(not ENABLE_CUSTOMIZED_OP, "PyTorch customized OPs are not built")
class TestTabulateFusionSeAttenOp(unittest.TestCase):
def setUp(self):
(dtype,) = self.param
Expand Down
4 changes: 4 additions & 0 deletions source/tests/pt/test_tabulate_fusion_se_r.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@

import torch

from deepmd.pt.cxx_op import (
ENABLE_CUSTOMIZED_OP,
)
from deepmd.pt.utils import (
env,
)
Expand All @@ -13,6 +16,7 @@


@parameterized((torch.float64, torch.float32))
@unittest.skipIf(not ENABLE_CUSTOMIZED_OP, "PyTorch customized OPs are not built")
class TestTabulateFusionSeAOp(unittest.TestCase):
def setUp(self):
(dtype,) = self.param
Expand Down
4 changes: 4 additions & 0 deletions source/tests/pt/test_tabulate_fusion_se_t.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@

import torch

from deepmd.pt.cxx_op import (
ENABLE_CUSTOMIZED_OP,
)
from deepmd.pt.utils import (
env,
)
Expand All @@ -13,6 +16,7 @@


@parameterized((torch.float64, torch.float32))
@unittest.skipIf(not ENABLE_CUSTOMIZED_OP, "PyTorch customized OPs are not built")
class TestTabulateFusionSeTOp(unittest.TestCase):
def setUp(self):
(dtype,) = self.param
Expand Down

0 comments on commit 9920e57

Please sign in to comment.