Skip to content

Commit 7cf2eea

Browse files
author
mamba-chen
committed
skip some test cases in test_compile.py when python is 3.14+
1 parent 1383726 commit 7cf2eea

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

test/test_compile.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -299,6 +299,9 @@ def test_to_device(td):
299299
assert td_device_c.batch_size == td.batch_size
300300
assert td_device_c.device == torch.device(device)
301301

302+
@pytest.mark.skipif(
303+
is_npu_available(), reason="torch.device in torch.compile is not supported on NPU currently."
304+
)
302305
def test_lock(self, mode):
303306
def locked_op(td):
304307
# Adding stuff uses cache, check that this doesn't break
@@ -589,6 +592,9 @@ def test_to_device(tc):
589592
assert tc_device_c.batch_size == data.batch_size
590593
assert tc_device_c.device == torch.device(device)
591594

595+
@pytest.mark.skipif(
596+
is_npu_available(), reason="torch.device in torch.compile is not supported on NPU currently."
597+
)
592598
def test_tc_lock(self, mode):
593599
def locked_op(tc):
594600
# Adding stuff uses cache, check that this doesn't break

0 commit comments

Comments
 (0)