Skip to content

Commit a7985b3

Browse files
Skip TestCond::test_nan on CUDA
1 parent 7408324 commit a7985b3

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

dpnp/tests/test_linalg.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -347,6 +347,12 @@ def test_bool(self, p):
347347
"p", [None, -dpnp.inf, -2, -1, 1, 2, dpnp.inf, "fro"]
348348
)
349349
def test_nan(self, p):
350+
# dpnp.linalg.cond uses dpnp.linalg.inv()
351+
# for the case when p is not None or p != -2 or p != 2
352+
# For singular matrices cuSolver raises an error
353+
# while OneMKL returns nans
354+
if is_cuda_device() and p in [-dpnp.inf, -1, 1, dpnp.inf, "fro"]:
355+
pytest.skip("Different behavior on CUDA")
350356
a = numpy.array(numpy.random.uniform(-5, 5, 16)).reshape(2, 2, 2, 2)
351357
a[0, 0] = 0
352358
a[1, 1] = 0

0 commit comments

Comments
 (0)