|
21 | 21 | get_all_dtypes, |
22 | 22 | get_float_complex_dtypes, |
23 | 23 | get_integer_float_dtypes, |
24 | | - get_intel_mkl_version, |
25 | 24 | has_support_aspect64, |
26 | 25 | is_cpu_device, |
27 | 26 | is_cuda_device, |
28 | 27 | numpy_version, |
| 28 | + requires_intel_mkl_version, |
29 | 29 | ) |
30 | 30 | from .third_party.cupy import testing |
31 | 31 |
|
@@ -333,7 +333,13 @@ def test_nan(self, p): |
333 | 333 | # while OneMKL returns nans |
334 | 334 | if is_cuda_device() and p in [-dpnp.inf, -1, 1, dpnp.inf, "fro"]: |
335 | 335 | pytest.skip("Different behavior on CUDA") |
336 | | - elif p in [-dpnp.inf, -1, 1, dpnp.inf, "fro"]: |
| 336 | + elif requires_intel_mkl_version("2025.2") and p in [ |
| 337 | + -dpnp.inf, |
| 338 | + -1, |
| 339 | + 1, |
| 340 | + dpnp.inf, |
| 341 | + "fro", |
| 342 | + ]: |
337 | 343 | pytest.skip("SAT-7966") |
338 | 344 | a = generate_random_numpy_array((2, 2, 2, 2)) |
339 | 345 | a[0, 0] = 0 |
@@ -1753,7 +1759,9 @@ def test_inv_singular_matrix(self, matrix): |
1753 | 1759 | assert_raises(dpnp.linalg.LinAlgError, dpnp.linalg.inv, a_dp) |
1754 | 1760 |
|
1755 | 1761 | # TODO: remove skipif when Intel MKL 2025.2 is released |
1756 | | - @pytest.mark.skipif(get_intel_mkl_version() < "2025.2", reason="mkl<2025.2") |
| 1762 | + @pytest.mark.skipif( |
| 1763 | + not requires_intel_mkl_version("2025.2"), reason="mkl<2025.2" |
| 1764 | + ) |
1757 | 1765 | def test_inv_singular_matrix_3D(self): |
1758 | 1766 | a_np = numpy.array( |
1759 | 1767 | [[[1, 2], [3, 4]], [[1, 2], [1, 2]], [[1, 3], [3, 1]]] |
@@ -2776,9 +2784,10 @@ def test_slogdet_strides(self): |
2776 | 2784 | assert_allclose(logdet_result, logdet_expected) |
2777 | 2785 |
|
2778 | 2786 | # TODO: remove skipif when Intel MKL 2025.2 is released |
2779 | | - # Skip running on cpu because dpnp uses _getrf_batch only on cpu. |
| 2787 | + # Skip running on CPU because dpnp uses _getrf_batch only on CPU |
| 2788 | + # for dpnp.linalg.det/slogdet. |
2780 | 2789 | @pytest.mark.skipif( |
2781 | | - is_cpu_device() and get_intel_mkl_version() < "2025.2", |
| 2790 | + is_cpu_device() and not requires_intel_mkl_version("2025.2"), |
2782 | 2791 | reason="mkl<2025.2", |
2783 | 2792 | ) |
2784 | 2793 | @pytest.mark.parametrize( |
|
0 commit comments