Skip to content

Commit db869f0

Browse files
Skip test if mkl<2025.2
1 parent 4707999 commit db869f0

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

dpnp/tests/test_linalg.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,10 @@
2121
get_all_dtypes,
2222
get_float_complex_dtypes,
2323
get_integer_float_dtypes,
24+
get_intel_mkl_version,
2425
has_support_aspect64,
2526
is_cpu_device,
2627
is_cuda_device,
27-
is_gpu_device,
28-
is_win_platform,
2928
numpy_version,
3029
)
3130
from .third_party.cupy import testing
@@ -1753,6 +1752,8 @@ def test_inv_singular_matrix(self, matrix):
17531752
assert_raises(numpy.linalg.LinAlgError, numpy.linalg.inv, a_np)
17541753
assert_raises(dpnp.linalg.LinAlgError, dpnp.linalg.inv, a_dp)
17551754

1755+
# TODO: remove skipif when Intel MKL 2025.2 is released
1756+
@pytest.mark.skipif(get_intel_mkl_version < "2025.2", reason="mkl<2025.2")
17561757
def test_inv_singular_matrix_3D(self):
17571758
a_np = numpy.array(
17581759
[[[1, 2], [3, 4]], [[1, 2], [1, 2]], [[1, 3], [3, 1]]]
@@ -2774,6 +2775,12 @@ def test_slogdet_strides(self):
27742775
assert_allclose(sign_result, sign_expected)
27752776
assert_allclose(logdet_result, logdet_expected)
27762777

2778+
# TODO: remove skipif when Intel MKL 2025.2 is released
2779+
# Skip running on cpu because dpnp uses _getrf_batch only on cpu.
2780+
@pytest.mark.skipif(
2781+
is_cpu_device() and get_intel_mkl_version < "2025.2",
2782+
reason="mkl<2025.2",
2783+
)
27772784
@pytest.mark.parametrize(
27782785
"matrix",
27792786
[

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
import dpnp as cupy
77
from dpnp.tests.helper import (
88
assert_dtype_allclose,
9+
get_intel_mkl_version,
910
has_support_aspect64,
1011
)
1112
from dpnp.tests.third_party.cupy import testing
@@ -213,6 +214,8 @@ def test_inv(self, dtype):
213214
):
214215
xp.linalg.inv(a)
215216

217+
# TODO: remove skipif when Intel MKL 2025.2 is released
218+
@pytest.mark.skipif(get_intel_mkl_version < "2025.2", reason="mkl<2025.2")
216219
@testing.for_dtypes("ifdFD")
217220
def test_batched_inv(self, dtype):
218221
for xp in (numpy, cupy):

0 commit comments

Comments
 (0)