From ac2221dbc4d0940c66f176a4ba8ffa10ede0e830 Mon Sep 17 00:00:00 2001 From: Vladislav Perevezentsev Date: Tue, 9 Sep 2025 04:50:29 -0700 Subject: [PATCH 1/3] Mute batched cholesky test due to SAT-8206 --- dpnp/tests/helper.py | 8 ++++++++ dpnp/tests/test_linalg.py | 9 ++++++++- dpnp/tests/test_sycl_queue.py | 9 ++++++++- dpnp/tests/test_usm_type.py | 4 +++- .../third_party/cupy/linalg_tests/test_decomposition.py | 3 +++ 5 files changed, 30 insertions(+), 3 deletions(-) diff --git a/dpnp/tests/helper.py b/dpnp/tests/helper.py index a94a592ad2fa..26b768890c8e 100644 --- a/dpnp/tests/helper.py +++ b/dpnp/tests/helper.py @@ -464,6 +464,14 @@ def is_lts_driver(device=None): return dev.has_aspect_gpu and "1.3" in dev.driver_version +def is_dg2(device=None): + """ + Return True if a test is running on DG2 (Intel Arc Alchemist family) GPU device, + False otherwise. + """ + return _get_dev_mask(device) in (0x4F00, 0x5600) + + def is_ptl(device=None): """ Return True if a test is running on Panther Lake with Iris Xe3 GPU device, diff --git a/dpnp/tests/test_linalg.py b/dpnp/tests/test_linalg.py index bef8159e6e91..dd45216f0e54 100644 --- a/dpnp/tests/test_linalg.py +++ b/dpnp/tests/test_linalg.py @@ -23,7 +23,8 @@ get_float_complex_dtypes, get_integer_float_dtypes, has_support_aspect64, - is_cpu_device, + is_dg2, + is_win_platform, numpy_version, ) from .third_party.cupy import testing @@ -158,6 +159,8 @@ class TestCholesky: def test_cholesky(self, array, dtype): a = numpy.array(array, dtype=dtype) ia = dpnp.array(a) + if ia.ndim > 2 and is_win_platform() and is_dg2(): + pytest.skip("SAT-8206") result = dpnp.linalg.cholesky(ia) expected = numpy.linalg.cholesky(a) assert_dtype_allclose(result, expected) @@ -177,6 +180,8 @@ def test_cholesky(self, array, dtype): @pytest.mark.parametrize("dtype", get_all_dtypes(no_bool=True)) def test_cholesky_upper(self, array, dtype): ia = dpnp.array(array, dtype=dtype) + if ia.ndim > 2 and is_win_platform() and is_dg2(): + pytest.skip("SAT-8206") result = dpnp.linalg.cholesky(ia, upper=True) if ia.ndim > 2: @@ -219,6 +224,8 @@ def test_cholesky_upper(self, array, dtype): def test_cholesky_upper_numpy(self, array, dtype): a = numpy.array(array, dtype=dtype) ia = dpnp.array(a) + if ia.ndim > 2 and is_win_platform() and is_dg2(): + pytest.skip("SAT-8206") result = dpnp.linalg.cholesky(ia, upper=True) expected = numpy.linalg.cholesky(a, upper=True) assert_dtype_allclose(result, expected) diff --git a/dpnp/tests/test_sycl_queue.py b/dpnp/tests/test_sycl_queue.py index d3d8e19439e2..85fcc3ceb2cb 100644 --- a/dpnp/tests/test_sycl_queue.py +++ b/dpnp/tests/test_sycl_queue.py @@ -12,7 +12,12 @@ from dpnp.dpnp_array import dpnp_array from dpnp.dpnp_utils import get_usm_allocations -from .helper import generate_random_numpy_array, get_all_dtypes, is_win_platform +from .helper import ( + generate_random_numpy_array, + get_all_dtypes, + is_dg2, + is_win_platform, +) list_of_backend_str = ["cuda", "host", "level_zero", "opencl"] @@ -1488,6 +1493,8 @@ def test_cholesky(self, data, is_empty, device): else: dtype = dpnp.default_float_type(device) x = dpnp.array(data, dtype=dtype, device=device) + if x.ndim > 2 and is_win_platform() and is_dg2(): + pytest.skip("SAT-8206") result = dpnp.linalg.cholesky(x) assert_sycl_queue_equal(result.sycl_queue, x.sycl_queue) diff --git a/dpnp/tests/test_usm_type.py b/dpnp/tests/test_usm_type.py index 34fd9bbc003a..d2849577a988 100644 --- a/dpnp/tests/test_usm_type.py +++ b/dpnp/tests/test_usm_type.py @@ -10,7 +10,7 @@ import dpnp from dpnp.dpnp_utils import get_usm_allocations -from .helper import generate_random_numpy_array, is_win_platform +from .helper import generate_random_numpy_array, is_dg2, is_win_platform list_of_usm_types = ["device", "shared", "host"] @@ -1341,6 +1341,8 @@ def test_cholesky(self, data, is_empty, usm_type): x = dpnp.empty(data, dtype=dtype, usm_type=usm_type) else: x = dpnp.array(data, dtype=dtype, usm_type=usm_type) + if x.ndim > 2 and is_win_platform() and is_dg2(): + pytest.skip("SAT-8206") result = dpnp.linalg.cholesky(x) assert x.usm_type == result.usm_type diff --git a/dpnp/tests/third_party/cupy/linalg_tests/test_decomposition.py b/dpnp/tests/third_party/cupy/linalg_tests/test_decomposition.py index 9948f4d0a920..88d01fdbd2f1 100644 --- a/dpnp/tests/third_party/cupy/linalg_tests/test_decomposition.py +++ b/dpnp/tests/third_party/cupy/linalg_tests/test_decomposition.py @@ -7,6 +7,8 @@ from dpnp.tests.helper import ( has_support_aspect64, is_cpu_device, + is_dg2, + is_win_platform, ) from dpnp.tests.third_party.cupy import testing from dpnp.tests.third_party.cupy.testing import _condition @@ -82,6 +84,7 @@ def test_decomposition(self, dtype): # np.linalg.cholesky only uses a lower triangle of an array self.check_L(numpy.array([[1, 2], [1, 9]], dtype)) + @pytest.mark.skipif(is_win_platform() and is_dg2(), reason="SAT-8206") @testing.for_dtypes( [ numpy.int32, From 45b6f977254d25973f15ce430d0ad825d3b96668 Mon Sep 17 00:00:00 2001 From: Vladislav Perevezentsev Date: Tue, 9 Sep 2025 06:43:16 -0700 Subject: [PATCH 2/3] Skip tests on arl or mtl --- dpnp/tests/helper.py | 16 ++++++++-------- dpnp/tests/test_linalg.py | 8 ++++---- dpnp/tests/test_sycl_queue.py | 4 ++-- dpnp/tests/test_usm_type.py | 4 ++-- .../cupy/linalg_tests/test_decomposition.py | 6 ++++-- 5 files changed, 20 insertions(+), 18 deletions(-) diff --git a/dpnp/tests/helper.py b/dpnp/tests/helper.py index 26b768890c8e..f1222b4c2a2e 100644 --- a/dpnp/tests/helper.py +++ b/dpnp/tests/helper.py @@ -404,6 +404,14 @@ def has_support_aspect64(device=None): return dev.has_aspect_fp64 +def is_arl_or_mtl(device=None): + """ + Return True if a test is running on Arrow Lake or Meteor Lake GPU device, + False otherwise. + """ + return _get_dev_mask(device) == 0x7D00 + + def is_cpu_device(device=None): """ Return True if a test is running on CPU device, False otherwise. @@ -464,14 +472,6 @@ def is_lts_driver(device=None): return dev.has_aspect_gpu and "1.3" in dev.driver_version -def is_dg2(device=None): - """ - Return True if a test is running on DG2 (Intel Arc Alchemist family) GPU device, - False otherwise. - """ - return _get_dev_mask(device) in (0x4F00, 0x5600) - - def is_ptl(device=None): """ Return True if a test is running on Panther Lake with Iris Xe3 GPU device, diff --git a/dpnp/tests/test_linalg.py b/dpnp/tests/test_linalg.py index dd45216f0e54..bc65269a6998 100644 --- a/dpnp/tests/test_linalg.py +++ b/dpnp/tests/test_linalg.py @@ -23,7 +23,7 @@ get_float_complex_dtypes, get_integer_float_dtypes, has_support_aspect64, - is_dg2, + is_arl_or_mtl, is_win_platform, numpy_version, ) @@ -159,7 +159,7 @@ class TestCholesky: def test_cholesky(self, array, dtype): a = numpy.array(array, dtype=dtype) ia = dpnp.array(a) - if ia.ndim > 2 and is_win_platform() and is_dg2(): + if ia.ndim > 2 and is_win_platform() and is_arl_or_mtl(): pytest.skip("SAT-8206") result = dpnp.linalg.cholesky(ia) expected = numpy.linalg.cholesky(a) @@ -180,7 +180,7 @@ def test_cholesky(self, array, dtype): @pytest.mark.parametrize("dtype", get_all_dtypes(no_bool=True)) def test_cholesky_upper(self, array, dtype): ia = dpnp.array(array, dtype=dtype) - if ia.ndim > 2 and is_win_platform() and is_dg2(): + if ia.ndim > 2 and is_win_platform() and is_arl_or_mtl(): pytest.skip("SAT-8206") result = dpnp.linalg.cholesky(ia, upper=True) @@ -224,7 +224,7 @@ def test_cholesky_upper(self, array, dtype): def test_cholesky_upper_numpy(self, array, dtype): a = numpy.array(array, dtype=dtype) ia = dpnp.array(a) - if ia.ndim > 2 and is_win_platform() and is_dg2(): + if ia.ndim > 2 and is_win_platform() and is_arl_or_mtl(): pytest.skip("SAT-8206") result = dpnp.linalg.cholesky(ia, upper=True) expected = numpy.linalg.cholesky(a, upper=True) diff --git a/dpnp/tests/test_sycl_queue.py b/dpnp/tests/test_sycl_queue.py index 85fcc3ceb2cb..8b0966c3f760 100644 --- a/dpnp/tests/test_sycl_queue.py +++ b/dpnp/tests/test_sycl_queue.py @@ -15,7 +15,7 @@ from .helper import ( generate_random_numpy_array, get_all_dtypes, - is_dg2, + is_arl_or_mtl, is_win_platform, ) @@ -1493,7 +1493,7 @@ def test_cholesky(self, data, is_empty, device): else: dtype = dpnp.default_float_type(device) x = dpnp.array(data, dtype=dtype, device=device) - if x.ndim > 2 and is_win_platform() and is_dg2(): + if x.ndim > 2 and is_win_platform() and is_arl_or_mtl(): pytest.skip("SAT-8206") result = dpnp.linalg.cholesky(x) diff --git a/dpnp/tests/test_usm_type.py b/dpnp/tests/test_usm_type.py index d2849577a988..3765ba5dcc7c 100644 --- a/dpnp/tests/test_usm_type.py +++ b/dpnp/tests/test_usm_type.py @@ -10,7 +10,7 @@ import dpnp from dpnp.dpnp_utils import get_usm_allocations -from .helper import generate_random_numpy_array, is_dg2, is_win_platform +from .helper import generate_random_numpy_array, is_arl_or_mtl, is_win_platform list_of_usm_types = ["device", "shared", "host"] @@ -1341,7 +1341,7 @@ def test_cholesky(self, data, is_empty, usm_type): x = dpnp.empty(data, dtype=dtype, usm_type=usm_type) else: x = dpnp.array(data, dtype=dtype, usm_type=usm_type) - if x.ndim > 2 and is_win_platform() and is_dg2(): + if x.ndim > 2 and is_win_platform() and is_arl_or_mtl(): pytest.skip("SAT-8206") result = dpnp.linalg.cholesky(x) diff --git a/dpnp/tests/third_party/cupy/linalg_tests/test_decomposition.py b/dpnp/tests/third_party/cupy/linalg_tests/test_decomposition.py index 88d01fdbd2f1..1ddd48c85eb4 100644 --- a/dpnp/tests/third_party/cupy/linalg_tests/test_decomposition.py +++ b/dpnp/tests/third_party/cupy/linalg_tests/test_decomposition.py @@ -6,8 +6,8 @@ import dpnp as cupy from dpnp.tests.helper import ( has_support_aspect64, + is_arl_or_mtl, is_cpu_device, - is_dg2, is_win_platform, ) from dpnp.tests.third_party.cupy import testing @@ -84,7 +84,9 @@ def test_decomposition(self, dtype): # np.linalg.cholesky only uses a lower triangle of an array self.check_L(numpy.array([[1, 2], [1, 9]], dtype)) - @pytest.mark.skipif(is_win_platform() and is_dg2(), reason="SAT-8206") + @pytest.mark.skipif( + is_win_platform() and is_arl_or_mtl(), reason="SAT-8206" + ) @testing.for_dtypes( [ numpy.int32, From 7918f57eb68701e2ca4066d16588b57f18349028 Mon Sep 17 00:00:00 2001 From: Anton Volkov Date: Tue, 9 Sep 2025 20:27:25 +0200 Subject: [PATCH 3/3] Skip test_usm_ndarray_linalg_batch for cholesky function --- dpnp/tests/test_linalg.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dpnp/tests/test_linalg.py b/dpnp/tests/test_linalg.py index bc65269a6998..97379876c909 100644 --- a/dpnp/tests/test_linalg.py +++ b/dpnp/tests/test_linalg.py @@ -110,6 +110,8 @@ def test_usm_ndarray_linalg_batch(func, gen_kwargs, func_kwargs): ) for _ in range(2) ] + elif func == "cholesky" and is_win_platform() and is_arl_or_mtl(): + pytest.skip("SAT-8206") else: dpt_args = [ dpt.asarray(generate_random_numpy_array(shape, **gen_kwargs))