Skip to content

Commit 1b94a40

Browse files
Unskip some linalg tests (#2559)
This PR suggests unskipping batch tests in linalg since oneMKL 2025.2 has been released and version 2025.1 is no longer relevant. It also excludes `requires_intel_mkl_version` from coverage until it is needed
1 parent 230ba6a commit 1b94a40

File tree

3 files changed

+1
-25
lines changed

3 files changed

+1
-25
lines changed

dpnp/tests/helper.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -483,7 +483,7 @@ def numpy_version():
483483
return numpy.lib.NumpyVersion(numpy.__version__)
484484

485485

486-
def requires_intel_mkl_version(version):
486+
def requires_intel_mkl_version(version): # pragma: no cover
487487
"""
488488
Check if Intel MKL is used and its version is greater than or
489489
equal to the specified one.

dpnp/tests/test_linalg.py

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
has_support_aspect64,
2626
is_cpu_device,
2727
numpy_version,
28-
requires_intel_mkl_version,
2928
)
3029
from .third_party.cupy import testing
3130

@@ -1747,10 +1746,6 @@ def test_inv_singular_matrix(self, matrix):
17471746
assert_raises(numpy.linalg.LinAlgError, numpy.linalg.inv, a_np)
17481747
assert_raises(dpnp.linalg.LinAlgError, dpnp.linalg.inv, a_dp)
17491748

1750-
# TODO: remove skipif when Intel MKL 2025.2 is released
1751-
@pytest.mark.skipif(
1752-
not requires_intel_mkl_version("2025.2"), reason="mkl<2025.2"
1753-
)
17541749
def test_inv_singular_matrix_3D(self):
17551750
a_np = numpy.array(
17561751
[[[1, 2], [3, 4]], [[1, 2], [1, 2]], [[1, 3], [3, 1]]]
@@ -2766,13 +2761,6 @@ def test_slogdet_strides(self):
27662761
assert_allclose(sign_result, sign_expected)
27672762
assert_allclose(logdet_result, logdet_expected)
27682763

2769-
# TODO: remove skipif when Intel MKL 2025.2 is released
2770-
# Skip running on CPU because dpnp uses _getrf_batch only on CPU
2771-
# for dpnp.linalg.det/slogdet.
2772-
@pytest.mark.skipif(
2773-
is_cpu_device() and not requires_intel_mkl_version("2025.2"),
2774-
reason="mkl<2025.2",
2775-
)
27762764
@pytest.mark.parametrize(
27772765
"matrix",
27782766
[
@@ -2803,13 +2791,6 @@ def test_slogdet_singular_matrix(self, matrix):
28032791
assert_allclose(sign_result, sign_expected)
28042792
assert_allclose(logdet_result, logdet_expected)
28052793

2806-
# TODO: remove skipif when Intel MKL 2025.2 is released
2807-
# Skip running on CPU because dpnp uses _getrf_batch only on CPU
2808-
# for dpnp.linalg.det/slogdet.
2809-
@pytest.mark.skipif(
2810-
is_cpu_device() and not requires_intel_mkl_version("2025.2"),
2811-
reason="mkl<2025.2",
2812-
)
28132794
def test_slogdet_singular_matrix_3D(self):
28142795
a_np = numpy.array(
28152796
[[[1, 2], [3, 4]], [[1, 2], [1, 2]], [[1, 3], [3, 1]]]

dpnp/tests/third_party/cupy/linalg_tests/test_solve.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
from dpnp.tests.helper import (
88
assert_dtype_allclose,
99
has_support_aspect64,
10-
requires_intel_mkl_version,
1110
)
1211
from dpnp.tests.third_party.cupy import testing
1312
from dpnp.tests.third_party.cupy.testing import _condition
@@ -214,10 +213,6 @@ def test_inv(self, dtype):
214213
):
215214
xp.linalg.inv(a)
216215

217-
# TODO: remove skipif when Intel MKL 2025.2 is released
218-
@pytest.mark.skipif(
219-
not requires_intel_mkl_version("2025.2"), reason="mkl<2025.2"
220-
)
221216
@testing.for_dtypes("ifdFD")
222217
def test_batched_inv(self, dtype):
223218
for xp in (numpy, cupy):

0 commit comments

Comments
 (0)