Skip to content

Commit 1b58244

Browse files
authored
Update thrid party testing f/w (#1754)
* Update thrid party testing f/w * Updated names of skipped tests based on new f/w rules * Replaced removed dpctl.get_current_device_type() call * Applied review comments
1 parent b51100f commit 1b58244

40 files changed

+935
-1029
lines changed

tests/skipped_tests.tbl

Lines changed: 106 additions & 103 deletions
Large diffs are not rendered by default.

tests/skipped_tests_gpu.tbl

Lines changed: 115 additions & 111 deletions
Large diffs are not rendered by default.

tests/test_linalg.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,7 @@ def test_eig_arange(type, size):
387387
@pytest.mark.parametrize("type", get_all_dtypes(no_bool=True, no_none=True))
388388
@pytest.mark.parametrize("size", [2, 4, 8])
389389
def test_eigh_arange(type, size):
390-
if dpctl.get_current_device_type() != dpctl.device_type.gpu:
390+
if dpctl.SyclDevice().device_type != dpctl.device_type.gpu:
391391
pytest.skip(
392392
"eig function doesn't work on CPU: https://github.com/IntelPython/dpnp/issues/1005"
393393
)
@@ -429,7 +429,7 @@ def test_eigh_arange(type, size):
429429

430430
@pytest.mark.parametrize("type", get_all_dtypes(no_bool=True, no_complex=True))
431431
def test_eigvals(type):
432-
if dpctl.get_current_device_type() != dpctl.device_type.gpu:
432+
if dpctl.SyclDevice().device_type != dpctl.device_type.gpu:
433433
pytest.skip(
434434
"eigvals function doesn't work on CPU: https://github.com/IntelPython/dpnp/issues/1005"
435435
)

tests/third_party/cupy/binary_tests/test_elementwise.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
from tests.third_party.cupy import testing
44

55

6-
@testing.gpu
76
class TestElementwise(unittest.TestCase):
87
@testing.for_int_dtypes()
98
@testing.numpy_cupy_array_equal()

tests/third_party/cupy/core_tests/test_ndarray_reduction.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
from tests.third_party.cupy import testing
1010

1111

12-
@testing.gpu
1312
@testing.parameterize(
1413
*testing.product(
1514
{
@@ -395,7 +394,6 @@ def test_zero_size(self, xp):
395394
}
396395
)
397396
)
398-
@testing.gpu
399397
# @unittest.skipUnless(cupy.cuda.cub.available, 'The CUB routine is not enabled')
400398
class TestCubReduction(unittest.TestCase):
401399
# def setUp(self):

tests/third_party/cupy/creation_tests/test_basic.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
from tests.third_party.cupy import testing
88

99

10-
@testing.gpu
1110
class TestBasic(unittest.TestCase):
1211
@testing.for_CF_orders()
1312
@testing.for_all_dtypes()
@@ -259,7 +258,6 @@ def test_full_like_subok(self):
259258
}
260259
)
261260
)
262-
@testing.gpu
263261
class TestBasicReshape(unittest.TestCase):
264262
@testing.with_requires("numpy>=1.17.0")
265263
@testing.for_orders("C")

tests/third_party/cupy/creation_tests/test_matrix.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
from tests.third_party.cupy import testing
88

99

10-
@testing.gpu
1110
class TestMatrix(unittest.TestCase):
1211
@testing.numpy_cupy_array_equal()
1312
def test_diag1(self, xp):
@@ -107,7 +106,6 @@ def test_diagflat_from_scalar_with_k1(self, xp):
107106
{"shape": (3, 3)},
108107
{"shape": (4, 3)},
109108
)
110-
@testing.gpu
111109
class TestTri(unittest.TestCase):
112110
@testing.for_all_dtypes()
113111
@testing.numpy_cupy_array_equal()
@@ -131,7 +129,6 @@ def test_tri_posi(self, xp, dtype):
131129
{"shape": (4, 3)},
132130
{"shape": (2, 3, 4)},
133131
)
134-
@testing.gpu
135132
class TestTriLowerAndUpper(unittest.TestCase):
136133
@testing.for_all_dtypes(no_complex=True)
137134
@testing.numpy_cupy_array_equal()

tests/third_party/cupy/creation_tests/test_ranges.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ def wrapper(self, *args, **kwargs):
3232
return decorator
3333

3434

35-
@testing.gpu
3635
class TestRanges(unittest.TestCase):
3736
@testing.for_all_dtypes(no_bool=True)
3837
@testing.numpy_cupy_array_equal()
@@ -312,7 +311,6 @@ def test_logspace_array_start_stop_axis1(self, xp, dtype_range, dtype_out):
312311
}
313312
)
314313
)
315-
@testing.gpu
316314
class TestMeshgrid(unittest.TestCase):
317315
@testing.for_all_dtypes()
318316
def test_meshgrid0(self, dtype):
@@ -349,7 +347,6 @@ def test_meshgrid3(self, xp, dtype):
349347
)
350348

351349

352-
@testing.gpu
353350
class TestMgrid(unittest.TestCase):
354351
@testing.numpy_cupy_array_equal()
355352
def test_mgrid0(self, xp):
@@ -382,7 +379,6 @@ def test_mgrid5(self, xp):
382379
return xp.mgrid[x:y:10j, x:y:10j]
383380

384381

385-
@testing.gpu
386382
class TestOgrid(unittest.TestCase):
387383
@testing.numpy_cupy_array_equal()
388384
def test_ogrid0(self, xp):

tests/third_party/cupy/fft_tests/test_fft.py

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
)
2121
)
2222
@pytest.mark.usefixtures("allow_fall_back_on_numpy")
23-
@testing.gpu
2423
class TestFft(unittest.TestCase):
2524
@testing.for_all_dtypes()
2625
@testing.numpy_cupy_allclose(
@@ -77,7 +76,6 @@ def test_ifft(self, xp, dtype):
7776
{"shape": (3, 4), "s": (1, 0), "axes": None, "norm": None},
7877
)
7978
@pytest.mark.usefixtures("allow_fall_back_on_numpy")
80-
@testing.gpu
8179
class TestFft2(unittest.TestCase):
8280
@testing.for_all_dtypes()
8381
@testing.numpy_cupy_allclose(
@@ -135,7 +133,6 @@ def test_ifft2(self, xp, dtype):
135133
{"shape": (0, 0, 5), "s": None, "axes": None, "norm": None},
136134
)
137135
@pytest.mark.usefixtures("allow_fall_back_on_numpy")
138-
@testing.gpu
139136
class TestFftn(unittest.TestCase):
140137
@testing.for_all_dtypes()
141138
@testing.numpy_cupy_allclose(
@@ -176,7 +173,6 @@ def test_ifftn(self, xp, dtype):
176173
)
177174
)
178175
@pytest.mark.usefixtures("allow_fall_back_on_numpy")
179-
@testing.gpu
180176
class TestRfft(unittest.TestCase):
181177
@testing.for_all_dtypes(no_complex=True)
182178
@testing.numpy_cupy_allclose(
@@ -208,7 +204,6 @@ def test_irfft(self, xp, dtype):
208204
{"shape": (2, 3, 4), "s": None, "axes": (), "norm": None},
209205
)
210206
@pytest.mark.usefixtures("allow_fall_back_on_numpy")
211-
@testing.gpu
212207
class TestRfft2EmptyAxes(unittest.TestCase):
213208
@testing.for_all_dtypes(no_complex=True)
214209
def test_rfft2(self, dtype):
@@ -230,7 +225,6 @@ def test_irfft2(self, dtype):
230225
{"shape": (2, 3, 4), "s": None, "axes": (), "norm": None},
231226
)
232227
@pytest.mark.usefixtures("allow_fall_back_on_numpy")
233-
@testing.gpu
234228
class TestRfftnEmptyAxes(unittest.TestCase):
235229
@testing.for_all_dtypes(no_complex=True)
236230
def test_rfftn(self, dtype):
@@ -257,7 +251,6 @@ def test_irfftn(self, dtype):
257251
)
258252
)
259253
@pytest.mark.usefixtures("allow_fall_back_on_numpy")
260-
@testing.gpu
261254
class TestHfft(unittest.TestCase):
262255
@testing.for_all_dtypes()
263256
@testing.numpy_cupy_allclose(
@@ -290,7 +283,6 @@ def test_ihfft(self, xp, dtype):
290283
{"n": 100, "d": 2},
291284
)
292285
@pytest.mark.usefixtures("allow_fall_back_on_numpy")
293-
@testing.gpu
294286
class TestFftfreq(unittest.TestCase):
295287
@testing.for_all_dtypes()
296288
@testing.numpy_cupy_allclose(
@@ -325,7 +317,6 @@ def test_rfftfreq(self, xp, dtype):
325317
{"shape": (10, 10), "axes": (0, 1)},
326318
)
327319
@pytest.mark.usefixtures("allow_fall_back_on_numpy")
328-
@testing.gpu
329320
class TestFftshift(unittest.TestCase):
330321
@testing.for_all_dtypes()
331322
@testing.numpy_cupy_allclose(

tests/third_party/cupy/indexing_tests/test_generate.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
from tests.third_party.cupy import testing
88

99

10-
@testing.gpu
1110
class TestIndices(unittest.TestCase):
1211
@testing.for_all_dtypes()
1312
@testing.numpy_cupy_array_equal()
@@ -30,7 +29,6 @@ def test_indices_list3(self):
3029
xp.indices((1, 2, 3, 4), dtype=xp.bool_)
3130

3231

33-
@testing.gpu
3432
class TestIX_(unittest.TestCase):
3533
@testing.numpy_cupy_array_equal()
3634
def test_ix_list(self, xp):
@@ -50,7 +48,6 @@ def test_ix_bool_ndarray(self, xp):
5048
return xp.ix_(xp.array([True, False] * 2))
5149

5250

53-
@testing.gpu
5451
class TestR_(unittest.TestCase):
5552
@testing.for_all_dtypes()
5653
@testing.numpy_cupy_array_equal()
@@ -103,7 +100,6 @@ def test_r_9(self, dtype):
103100
cupy.r_[a, b]
104101

105102

106-
@testing.gpu
107103
class TestC_(unittest.TestCase):
108104
@testing.for_all_dtypes()
109105
@testing.numpy_cupy_array_equal()
@@ -128,7 +124,6 @@ def test_c_3(self, dtype):
128124
cupy.c_[a, b]
129125

130126

131-
@testing.gpu
132127
class TestAxisConcatenator(unittest.TestCase):
133128
def test_AxisConcatenator_init1(self):
134129
with self.assertRaises(TypeError):
@@ -139,7 +134,6 @@ def test_len(self):
139134
self.assertEqual(len(a), 0)
140135

141136

142-
@testing.gpu
143137
class TestUnravelIndex(unittest.TestCase):
144138
@testing.for_orders(["C", "F", None])
145139
@testing.for_int_dtypes()
@@ -174,7 +168,6 @@ def test_invalid_dtype(self, order, dtype):
174168
xp.unravel_index(a, (6, 4), order=order)
175169

176170

177-
@testing.gpu
178171
class TestRavelMultiIndex(unittest.TestCase):
179172
@testing.for_orders(["C", "F", None])
180173
@testing.for_int_dtypes()

0 commit comments

Comments
 (0)