Skip to content

Commit efc6411

Browse files
committed
Limit the mute only to Iris Xe GPUs
1 parent f37a867 commit efc6411

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

dpnp/tests/helper.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,11 @@ def _assert_shape(a, b):
2525
# numpy output is scalar, then dpnp is 0-D array
2626
assert a.shape == (), f"{a.shape} != ()"
2727

28+
def _get_dev_mask(device = None):
29+
dev = dpctl.select_default_device() if device is None else device
30+
dev_info = dpctl.utils.intel_device_info(dev)
31+
return dev_info.get("device_id", 0) & 0xFF00
32+
2833

2934
def assert_dtype_allclose(
3035
dpnp_arr,
@@ -434,6 +439,13 @@ def is_intel_numpy():
434439
return all(dep["name"].startswith("mkl") for dep in [blas, lapack])
435440

436441

442+
def is_iris_xe(device=None):
443+
"""
444+
Return True if a test is running on Iris Xe GPU device, False otherwise.
445+
"""
446+
return _get_dev_mask(device) == 0x9A00
447+
448+
437449
def is_lts_driver(device=None):
438450
"""
439451
Return True if a test is running on a GPU device with LTS driver version,

dpnp/tests/test_arraycreation.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
assert_dtype_allclose,
2020
get_all_dtypes,
2121
get_array,
22+
is_iris_xe,
2223
is_lts_driver,
2324
is_win_platform,
2425
)
@@ -915,7 +916,7 @@ def test_geomspace_num0():
915916
@pytest.mark.parametrize("num", [2, 4, 8, 3, 9, 27])
916917
@pytest.mark.parametrize("endpoint", [True, False])
917918
def test_logspace(dtype, num, endpoint):
918-
if not is_win_platform() and is_lts_driver():
919+
if not is_win_platform() and is_iris_xe() and is_lts_driver():
919920
if dpnp.issubdtype(dtype, dpnp.integer) and num in [8, 27] and endpoint is True:
920921
pytest.skip("SAT-7978")
921922

0 commit comments

Comments
 (0)