Skip to content

Commit 8efdede

Browse files
authored
Remove dpctl has_gpu_queues check (#282)
* Remove dpctl has_gpu_queues check * Added skip tests * black reformat * Add device_type to is_gen12 call Co-authored-by: reazul.hoque <reazul.hoque@intel.com>
1 parent bcac8b1 commit 8efdede

3 files changed

Lines changed: 20 additions & 4 deletions

File tree

numba_dppy/config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
try:
1919
import dpctl
2020

21-
dppy_present = dpctl.has_sycl_platforms() and dpctl.has_gpu_queues()
21+
dppy_present = dpctl.has_sycl_platforms()
2222
except:
2323
dppy_present = False
2424

numba_dppy/tests/njit_tests/dpnp/test_numpy_array_ops.py

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
import pytest
2323
from numba_dppy.testing import dpnp_debug
2424
from .dpnp_skip_test import dpnp_skip_test as skip_test
25+
from numba_dppy.tests.skip_tests import is_gen12
2526

2627
list_of_filter_strs = [
2728
"opencl:gpu:0",
@@ -95,10 +96,19 @@ def test_unary_ops(filter_str, unary_op, input_arrays, get_shape, capfd):
9596
op, name = unary_op
9697
if name != "argsort" and name != "copy":
9798
a = np.reshape(a, get_shape)
98-
if name == "cumprod" and (filter_str == "opencl:cpu:0" or a.dtype == np.int32):
99+
if name == "cumprod" and (
100+
filter_str == "opencl:cpu:0" or a.dtype == np.int32 or is_gen12(filter_str)
101+
):
99102
pytest.skip()
100-
if name == "cumsum" and (filter_str == "opencl:cpu:0" or a.dtype == np.int32):
103+
if name == "cumsum" and (
104+
filter_str == "opencl:cpu:0" or a.dtype == np.int32 or is_gen12(filter_str)
105+
):
101106
pytest.skip()
107+
if name == "mean" and is_gen12(filter_str):
108+
pytest.skip()
109+
if name == "argmax" and is_gen12(filter_str):
110+
pytest.skip()
111+
102112
actual = np.empty(shape=a.shape, dtype=a.dtype)
103113
expected = np.empty(shape=a.shape, dtype=a.dtype)
104114

numba_dppy/tests/njit_tests/dpnp/test_numpy_transcendentals.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
import pytest
2323
from numba_dppy.testing import dpnp_debug
2424
from .dpnp_skip_test import dpnp_skip_test as skip_test
25+
from numba_dppy.tests.skip_tests import is_gen12
2526

2627
list_of_filter_strs = [
2728
"opencl:gpu:0",
@@ -117,7 +118,9 @@ def test_unary_ops(filter_str, unary_op, input_array, get_shape, capfd):
117118
a = input_array
118119
a = np.reshape(a, get_shape)
119120
op, name = unary_op
120-
if (name == "cumprod" or name == "cumsum") and filter_str == "opencl:cpu:0":
121+
if (name == "cumprod" or name == "cumsum") and (
122+
filter_str == "opencl:cpu:0" or is_gen12(filter_str)
123+
):
121124
pytest.skip()
122125
actual = np.empty(shape=a.shape, dtype=a.dtype)
123126
expected = np.empty(shape=a.shape, dtype=a.dtype)
@@ -143,6 +146,9 @@ def test_unary_nan_ops(filter_str, unary_nan_op, input_nan_array, get_shape, cap
143146
actual = np.empty(shape=a.shape, dtype=a.dtype)
144147
expected = np.empty(shape=a.shape, dtype=a.dtype)
145148

149+
if name == "nansum" and is_gen12(filter_str):
150+
pytest.skip()
151+
146152
f = njit(op)
147153
with dpctl.device_context(filter_str), dpnp_debug():
148154
actual = f(a)

0 commit comments

Comments
 (0)