File tree Expand file tree Collapse file tree 3 files changed +18
-1
lines changed Expand file tree Collapse file tree 3 files changed +18
-1
lines changed Original file line number Diff line number Diff line change
1
+ import dpctl
2
+
3
+ def is_gen12 (device_type ):
4
+ with dpctl .device_context (device_type ):
5
+ q = dpctl .get_current_queue ()
6
+ device = q .get_sycl_device ()
7
+ name = device .get_device_name ()
8
+ if "Gen12" in name :
9
+ return True
10
+
11
+ return False
Original file line number Diff line number Diff line change 3
3
from numba import njit
4
4
import dpctl
5
5
import unittest
6
-
6
+ from . import skip_tests
7
7
8
8
@unittest .skipUnless (dpctl .has_gpu_queues (), 'test only on GPU system' )
9
9
class TestNumpy_math_functions (unittest .TestCase ):
@@ -179,6 +179,7 @@ def f(a):
179
179
180
180
self .assertTrue (np .all (c == - input_arr ))
181
181
182
+ @unittest .skipIf (skip_tests .is_gen12 ("opencl:gpu" ), "Gen12 not supported" )
182
183
def test_sign (self ):
183
184
@njit
184
185
def f (a ):
@@ -221,6 +222,7 @@ def f(a):
221
222
max_abs_err = c .sum () - d .sum ()
222
223
self .assertTrue (max_abs_err < 1e-5 )
223
224
225
+ @unittest .skipIf (skip_tests .is_gen12 ("opencl:gpu" ), "Gen12 not supported" )
224
226
def test_log (self ):
225
227
@njit
226
228
def f (a ):
@@ -236,6 +238,7 @@ def f(a):
236
238
max_abs_err = c .sum () - d .sum ()
237
239
self .assertTrue (max_abs_err < 1e-5 )
238
240
241
+ @unittest .skipIf (skip_tests .is_gen12 ("opencl:gpu" ), "Gen12 not supported" )
239
242
def test_log10 (self ):
240
243
@njit
241
244
def f (a ):
@@ -251,6 +254,7 @@ def f(a):
251
254
max_abs_err = c .sum () - d .sum ()
252
255
self .assertTrue (max_abs_err < 1e-5 )
253
256
257
+ @unittest .skipIf (skip_tests .is_gen12 ("opencl:gpu" ), "Gen12 not supported" )
254
258
def test_expm1 (self ):
255
259
@njit
256
260
def f (a ):
Original file line number Diff line number Diff line change 3
3
from numba import njit
4
4
import dpctl
5
5
import unittest
6
+ from . import skip_tests
6
7
7
8
8
9
@unittest .skipUnless (dpctl .has_gpu_queues (), 'test only on GPU system' )
@@ -155,6 +156,7 @@ def f(a):
155
156
max_abs_err = c .sum () - d .sum ()
156
157
self .assertTrue (max_abs_err < 1e-5 )
157
158
159
+ @unittest .skipIf (skip_tests .is_gen12 ("opencl:gpu" ), "Gen12 not supported" )
158
160
def test_arccosh (self ):
159
161
@njit
160
162
def f (a ):
You can’t perform that action at this time.
0 commit comments