|
24 | 24 | has_support_aspect64, |
25 | 25 | is_cpu_device, |
26 | 26 | is_cuda_device, |
27 | | - is_gpu_device, |
28 | | - is_win_platform, |
29 | 27 | numpy_version, |
| 28 | + requires_intel_mkl_version, |
30 | 29 | ) |
31 | 30 | from .third_party.cupy import testing |
32 | 31 |
|
@@ -334,11 +333,13 @@ def test_nan(self, p): |
334 | 333 | # while OneMKL returns nans |
335 | 334 | if is_cuda_device() and p in [-dpnp.inf, -1, 1, dpnp.inf, "fro"]: |
336 | 335 | pytest.skip("Different behavior on CUDA") |
337 | | - elif ( |
338 | | - is_gpu_device() |
339 | | - and is_win_platform() |
340 | | - and p in [-dpnp.inf, -1, 1, dpnp.inf, "fro"] |
341 | | - ): |
| 336 | + elif requires_intel_mkl_version("2025.2") and p in [ |
| 337 | + -dpnp.inf, |
| 338 | + -1, |
| 339 | + 1, |
| 340 | + dpnp.inf, |
| 341 | + "fro", |
| 342 | + ]: |
342 | 343 | pytest.skip("SAT-7966") |
343 | 344 | a = generate_random_numpy_array((2, 2, 2, 2)) |
344 | 345 | a[0, 0] = 0 |
@@ -460,10 +461,6 @@ def test_det_singular_matrix(self, matrix): |
460 | 461 |
|
461 | 462 | assert_allclose(result, expected) |
462 | 463 |
|
463 | | - # TODO: remove skipif when MKLD-13852 is resolved |
464 | | - # _getrf_batch does not raise an error with singular matrices. |
465 | | - # Skip running on cpu because dpnp uses _getrf_batch only on cpu. |
466 | | - @pytest.mark.skipif(is_cpu_device(), reason="MKLD-13852") |
467 | 464 | def test_det_singular_matrix_3D(self): |
468 | 465 | a_np = numpy.array( |
469 | 466 | [[[1, 2], [3, 4]], [[1, 2], [1, 2]], [[1, 3], [3, 1]]] |
@@ -1761,9 +1758,10 @@ def test_inv_singular_matrix(self, matrix): |
1761 | 1758 | assert_raises(numpy.linalg.LinAlgError, numpy.linalg.inv, a_np) |
1762 | 1759 | assert_raises(dpnp.linalg.LinAlgError, dpnp.linalg.inv, a_dp) |
1763 | 1760 |
|
1764 | | - # TODO: remove skip when MKLD-13852 is resolved |
1765 | | - # _getrf_batch does not raise an error with singular matrices. |
1766 | | - @pytest.mark.skip("MKLD-13852") |
| 1761 | + # TODO: remove skipif when Intel MKL 2025.2 is released |
| 1762 | + @pytest.mark.skipif( |
| 1763 | + not requires_intel_mkl_version("2025.2"), reason="mkl<2025.2" |
| 1764 | + ) |
1767 | 1765 | def test_inv_singular_matrix_3D(self): |
1768 | 1766 | a_np = numpy.array( |
1769 | 1767 | [[[1, 2], [3, 4]], [[1, 2], [1, 2]], [[1, 3], [3, 1]]] |
@@ -2785,6 +2783,13 @@ def test_slogdet_strides(self): |
2785 | 2783 | assert_allclose(sign_result, sign_expected) |
2786 | 2784 | assert_allclose(logdet_result, logdet_expected) |
2787 | 2785 |
|
| 2786 | + # TODO: remove skipif when Intel MKL 2025.2 is released |
| 2787 | + # Skip running on CPU because dpnp uses _getrf_batch only on CPU |
| 2788 | + # for dpnp.linalg.det/slogdet. |
| 2789 | + @pytest.mark.skipif( |
| 2790 | + is_cpu_device() and not requires_intel_mkl_version("2025.2"), |
| 2791 | + reason="mkl<2025.2", |
| 2792 | + ) |
2788 | 2793 | @pytest.mark.parametrize( |
2789 | 2794 | "matrix", |
2790 | 2795 | [ |
@@ -2815,10 +2820,13 @@ def test_slogdet_singular_matrix(self, matrix): |
2815 | 2820 | assert_allclose(sign_result, sign_expected) |
2816 | 2821 | assert_allclose(logdet_result, logdet_expected) |
2817 | 2822 |
|
2818 | | - # TODO: remove skipif when MKLD-13852 is resolved |
2819 | | - # _getrf_batch does not raise an error with singular matrices. |
2820 | | - # Skip running on cpu because dpnp uses _getrf_batch only on cpu. |
2821 | | - @pytest.mark.skipif(is_cpu_device(), reason="MKLD-13852") |
| 2823 | + # TODO: remove skipif when Intel MKL 2025.2 is released |
| 2824 | + # Skip running on CPU because dpnp uses _getrf_batch only on CPU |
| 2825 | + # for dpnp.linalg.det/slogdet. |
| 2826 | + @pytest.mark.skipif( |
| 2827 | + is_cpu_device() and not requires_intel_mkl_version("2025.2"), |
| 2828 | + reason="mkl<2025.2", |
| 2829 | + ) |
2822 | 2830 | def test_slogdet_singular_matrix_3D(self): |
2823 | 2831 | a_np = numpy.array( |
2824 | 2832 | [[[1, 2], [3, 4]], [[1, 2], [1, 2]], [[1, 3], [3, 1]]] |
|
0 commit comments