Skip to content

Commit

Permalink
Skip TestCond::test_nan on CUDA
Browse files Browse the repository at this point in the history
  • Loading branch information
vlad-perevezentsev committed Dec 11, 2024
1 parent 8988be2 commit 5d0ea3c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions dpnp/tests/test_linalg.py
Original file line number Diff line number Diff line change
Expand Up @@ -347,6 +347,12 @@ def test_bool(self, p):
"p", [None, -dpnp.inf, -2, -1, 1, 2, dpnp.inf, "fro"]
)
def test_nan(self, p):
# dpnp.linalg.cond uses dpnp.linalg.inv()
# for the case when p is not None or p != -2 or p != 2
# For singular matrices cuSolver raises an error
# while OneMKL returns nans
if is_cuda_device() and p in [-dpnp.inf, -1, 1, dpnp.inf, "fro"]:
pytest.skip("Different behavior on CUDA")
a = numpy.array(numpy.random.uniform(-5, 5, 16)).reshape(2, 2, 2, 2)
a[0, 0] = 0
a[1, 1] = 0
Expand Down

0 comments on commit 5d0ea3c

Please sign in to comment.