From af68bab46734b5585fea267483aa8e128b30e806 Mon Sep 17 00:00:00 2001 From: Anton Volkov Date: Thu, 3 Jul 2025 07:11:06 -0500 Subject: [PATCH] Skip tests due to known issue with LTS driver on LNL --- dpnp/tests/helper.py | 13 +++++++++++++ dpnp/tests/test_arraycreation.py | 6 ++++++ 2 files changed, 19 insertions(+) diff --git a/dpnp/tests/helper.py b/dpnp/tests/helper.py index 7bf6f156e9eb..126bc4907ac7 100644 --- a/dpnp/tests/helper.py +++ b/dpnp/tests/helper.py @@ -26,6 +26,12 @@ def _assert_shape(a, b): assert a.shape == (), f"{a.shape} != ()" +def _get_dev_mask(device = None): + dev = dpctl.select_default_device() if device is None else device + dev_info = dpctl.utils.intel_device_info(dev) + return dev_info.get("device_id", 0) & 0xFF00 + + def assert_dtype_allclose( dpnp_arr, numpy_arr, @@ -434,6 +440,13 @@ def is_intel_numpy(): return all(dep["name"].startswith("mkl") for dep in [blas, lapack]) +def is_lnl_device(device=None): + """ + Return True if a test is running on Lunar Lake device, False otherwise. + """ + return _get_dev_mask(device) == 0x6400 + + def is_win_platform(): """ Return True if a test is running on Windows OS, False otherwise. diff --git a/dpnp/tests/test_arraycreation.py b/dpnp/tests/test_arraycreation.py index c801b769a7e2..018cf7aecec0 100644 --- a/dpnp/tests/test_arraycreation.py +++ b/dpnp/tests/test_arraycreation.py @@ -19,6 +19,8 @@ assert_dtype_allclose, get_all_dtypes, get_array, + is_lnl_device, + is_win_platform, ) from .third_party.cupy import testing @@ -913,6 +915,10 @@ def test_geomspace_num0(): @pytest.mark.parametrize("num", [2, 4, 8, 3, 9, 27]) @pytest.mark.parametrize("endpoint", [True, False]) def test_logspace(dtype, num, endpoint): + if is_lnl_device and not is_win_platform(): + if dpnp.issubdtype(dtype, dpnp.integer) and num in [8, 27] and endpoint is True: + pytest.skip("SAT-7978") + start = 2 stop = 5 base = 2