Skip to content

Commit 6a99243

Browse files
committed
skip test in case metis is not found
1 parent 3bda3da commit 6a99243

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

test/test_metis.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,14 @@
44

55
from .utils import devices
66

7+
try:
8+
torch.ops.torch_sparse.partition
9+
with_metis = True
10+
except RuntimeError:
11+
with_metis = False
712

13+
14+
@pytest.mark.skipif(not with_metis, reason='Not compiled with METIS support')
815
@pytest.mark.parametrize('device', devices)
916
def test_metis(device):
1017
value1 = torch.randn(6 * 6, device=device).view(6, 6)

0 commit comments

Comments
 (0)