Skip to content

Commit

Permalink
add condition to skip test compile
Browse files Browse the repository at this point in the history
  • Loading branch information
HAOCHENYE committed Mar 28, 2023
1 parent d37325f commit 120cfee
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/test_runner/test_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
LogProcessor, Runner, TestLoop, ValLoop)
from mmengine.runner.loops import _InfiniteDataloaderIterator
from mmengine.runner.priority import Priority, get_priority
from mmengine.utils import digit_version, is_list_of
from mmengine.utils import digit_version, is_installed, is_list_of
from mmengine.utils.dl_utils import TORCH_VERSION
from mmengine.visualization import Visualizer

Expand Down Expand Up @@ -1706,7 +1706,7 @@ def train_step(self, *args, **kwargs):
runner.train()

@skipIf(
not hasattr(torch, 'compile'),
not hasattr(torch, 'compile') or not is_installed('triton'),
reason='torch.compile is not valid, please install PyTorch>=2.0.0')
def test_train_with_compile(self):
# 1. test with simple configuration
Expand Down

0 comments on commit 120cfee

Please sign in to comment.