Skip to content

Commit d7cd38c

Browse files
committed
Add is_tgllp_iris_xe() check instead of more common is_iris_xe() which included also UHD Graphics
1 parent 110d80b commit d7cd38c

File tree

2 files changed

+16
-11
lines changed

2 files changed

+16
-11
lines changed

dpnp/tests/helper.py

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,14 @@ def _assert_shape(a, b):
2626
assert a.shape == (), f"{a.shape} != ()"
2727

2828

29-
def _get_dev_mask(device=None):
29+
def _get_dev_id(device=None):
3030
dev = dpctl.select_default_device() if device is None else device
3131
dev_info = dpctl.utils.intel_device_info(dev)
32-
return dev_info.get("device_id", 0) & 0xFF00
32+
return dev_info.get("device_id", 0)
33+
34+
35+
def _get_dev_mask(device=None):
36+
return _get_dev_id(device) & 0xFF00
3337

3438

3539
def assert_dtype_allclose(
@@ -448,13 +452,6 @@ def is_intel_numpy():
448452
return all(dep["name"].startswith("mkl") for dep in [blas, lapack])
449453

450454

451-
def is_iris_xe(device=None):
452-
"""
453-
Return True if a test is running on Iris Xe GPU device, False otherwise.
454-
"""
455-
return _get_dev_mask(device) == 0x9A00
456-
457-
458455
def is_lnl(device=None):
459456
"""
460457
Return True if a test is running on Lunar Lake GPU device, False otherwise.
@@ -479,6 +476,14 @@ def is_ptl(device=None):
479476
return _get_dev_mask(device) in (0xB000, 0xFD00)
480477

481478

479+
def is_tgllp_iris_xe(device=None):
480+
"""
481+
Return True if a test is running on Tiger Lake-LP with Iris Xe GPU device,
482+
False otherwise.
483+
"""
484+
return _get_dev_id(device) in (0x9A49, 0x9A40)
485+
486+
482487
def is_win_platform():
483488
"""
484489
Return True if a test is running on Windows OS, False otherwise.

dpnp/tests/test_arraycreation.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@
1919
assert_dtype_allclose,
2020
get_all_dtypes,
2121
get_array,
22-
is_iris_xe,
2322
is_lts_driver,
23+
is_tgllp_iris_xe,
2424
is_win_platform,
2525
)
2626
from .third_party.cupy import testing
@@ -916,7 +916,7 @@ def test_geomspace_num0():
916916
@pytest.mark.parametrize("num", [2, 4, 8, 3, 9, 27])
917917
@pytest.mark.parametrize("endpoint", [True, False])
918918
def test_logspace(dtype, num, endpoint):
919-
if not is_win_platform() and is_iris_xe() and is_lts_driver():
919+
if not is_win_platform() and is_tgllp_iris_xe() and is_lts_driver():
920920
if (
921921
dpnp.issubdtype(dtype, dpnp.integer)
922922
and num in [8, 27]

0 commit comments

Comments
 (0)