Skip to content

Commit 556fc8d

Browse files
arindamroy-engfacebook-github-bot
authored andcommitted
skip test_symeig if MAGMA not detected (pytorch#54526)
Summary: Add proper way to skip test_symeig. In case MAGMA is not detected, skip the test_symeig properly. Added skipCUDAIfNoMagma decorator. Pull Request resolved: pytorch#54526 Reviewed By: malfet Differential Revision: D27293640 Pulled By: heitorschueroff fbshipit-source-id: 245f86540af0e37c8795e80dc003e1ca4c08cd5b
1 parent 145bc5c commit 556fc8d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

test/test_vmap.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
import functools
66
import itertools
77
import warnings
8-
from torch.testing._internal.common_device_type import instantiate_device_type_tests
8+
from torch.testing._internal.common_device_type import instantiate_device_type_tests, \
9+
skipCUDAIfNoMagma
910
import types
1011

1112

@@ -2409,6 +2410,7 @@ def test_trace(self, device):
24092410
x = torch.randn(2, 3, device=device, requires_grad=True)
24102411
self._batched_grad_test(Tensor.trace, (x,))
24112412

2413+
@skipCUDAIfNoMagma
24122414
@allowVmapFallbackUsage
24132415
def test_symeig(self, device):
24142416
def op(x):

0 commit comments

Comments
 (0)