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()

tests/third_party/cupy/indexing_tests/test_indexing.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,6 @@ def test_extract_empty_1dim(self, xp):
193193

194194

195195
@pytest.mark.usefixtures("allow_fall_back_on_numpy")
196-
@testing.gpu
197196
class TestChoose(unittest.TestCase):
198197
@testing.for_all_dtypes()
199198
@testing.numpy_cupy_array_equal()
@@ -253,7 +252,6 @@ def test_choose_broadcast_fail(self, dtype):
253252
return a.choose(c)
254253

255254

256-
@testing.gpu
257255
class TestSelect(unittest.TestCase):
258256
@testing.for_all_dtypes(no_bool=True, no_complex=True)
259257
@testing.numpy_cupy_array_equal()

tests/third_party/cupy/indexing_tests/test_insert.py

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
}
1616
)
1717
)
18-
@testing.gpu
1918
class TestPlace(unittest.TestCase):
2019
# NumPy 1.9 don't wraps values.
2120
# https://github.com/numpy/numpy/pull/5821
@@ -39,7 +38,6 @@ def test_place(self, xp, dtype):
3938
}
4039
)
4140
)
42-
@testing.gpu
4341
class TestPlaceRaises(unittest.TestCase):
4442
# NumPy 1.9 performs illegal memory access.
4543
# https://github.com/numpy/numpy/pull/5821
@@ -77,7 +75,6 @@ def test_place_shape_unmatch_error(self, dtype):
7775
)
7876
)
7977
@pytest.mark.usefixtures("allow_fall_back_on_numpy")
80-
@testing.gpu
8178
class TestPut(unittest.TestCase):
8279
@testing.for_all_dtypes()
8380
@testing.numpy_cupy_array_equal()
@@ -105,7 +102,6 @@ def test_put(self, xp, dtype):
105102
}
106103
)
107104
)
108-
@testing.gpu
109105
class TestPutScalars(unittest.TestCase):
110106
@pytest.mark.usefixtures("allow_fall_back_on_numpy")
111107
@testing.numpy_cupy_array_equal()
@@ -136,7 +132,6 @@ def test_put_values_scalar(self, xp):
136132
)
137133
)
138134
@pytest.mark.usefixtures("allow_fall_back_on_numpy")
139-
@testing.gpu
140135
class TestPutRaises(unittest.TestCase):
141136
@testing.for_all_dtypes()
142137
def test_put_inds_underflow_error(self, dtype):
@@ -170,7 +165,6 @@ def test_put_mode_error(self, dtype):
170165
@testing.parameterize(
171166
*testing.product({"shape": [(0,), (1,), (2, 3), (2, 3, 4)]})
172167
)
173-
@testing.gpu
174168
class TestPutmaskSameShape(unittest.TestCase):
175169
@testing.for_all_dtypes()
176170
@testing.numpy_cupy_array_equal()
@@ -191,7 +185,6 @@ def test_putmask(self, xp, dtype):
191185
}
192186
)
193187
)
194-
@testing.gpu
195188
class TestPutmaskDifferentShapes(unittest.TestCase):
196189
@testing.for_all_dtypes()
197190
@testing.numpy_cupy_array_equal()
@@ -207,7 +200,6 @@ def test_putmask(self, xp, dtype):
207200

208201

209202
@pytest.mark.usefixtures("allow_fall_back_on_numpy")
210-
@testing.gpu
211203
class TestPutmask(unittest.TestCase):
212204
@testing.numpy_cupy_array_equal()
213205
def test_putmask_scalar_values(self, xp):
@@ -264,7 +256,6 @@ def test_putmask_differnt_dtypes_mask(self, xp, dtype):
264256
)
265257
)
266258
@pytest.mark.usefixtures("allow_fall_back_on_numpy")
267-
@testing.gpu
268259
class TestFillDiagonal(unittest.TestCase):
269260
def _compute_val(self, xp):
270261
if type(self.val) is int:
@@ -309,7 +300,6 @@ def test_1darray(self, dtype):
309300
}
310301
)
311302
)
312-
@testing.gpu
313303
class TestDiagIndices(unittest.TestCase):
314304
@testing.numpy_cupy_array_equal()
315305
def test_diag_indices(self, xp):
@@ -324,7 +314,6 @@ def test_diag_indices(self, xp):
324314
}
325315
)
326316
)
327-
@testing.gpu
328317
class TestDiagIndicesInvalidValues(unittest.TestCase):
329318
@testing.numpy_cupy_array_equal()
330319
def test_diag_indices(self, xp):
@@ -338,7 +327,6 @@ def test_diag_indices(self, xp):
338327
}
339328
)
340329
)
341-
@testing.gpu
342330
class TestDiagIndicesFrom(unittest.TestCase):
343331
@testing.numpy_cupy_array_equal()
344332
def test_diag_indices_from(self, xp):
@@ -354,7 +342,6 @@ def test_diag_indices_from(self, xp):
354342
)
355343
)
356344
@pytest.mark.usefixtures("allow_fall_back_on_numpy")
357-
@testing.gpu
358345
class TestDiagIndicesFromRaises(unittest.TestCase):
359346
def test_non_equal_dims(self):
360347
for xp in (numpy, cupy):

tests/third_party/cupy/indexing_tests/test_iterate.py

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

1010

11-
@testing.gpu
1211
class TestFlatiter(unittest.TestCase):
1312
def test_base(self):
1413
for xp in (numpy, cupy):
@@ -61,7 +60,6 @@ def test_copy_next(self, xp):
6160
{"shape": (), "index": slice(None)},
6261
{"shape": (10,), "index": slice(None)},
6362
)
64-
@testing.gpu
6563
class TestFlatiterSubscript(unittest.TestCase):
6664
@testing.for_CF_orders()
6765
@testing.for_all_dtypes()
@@ -122,7 +120,6 @@ def test_setitem_ndarray_different_types(self, xp, a_dtype, v_dtype, order):
122120
# {'shape': (2, 3, 4), 'index': cupy.array([0])},
123121
{"shape": (2, 3, 4), "index": [0]},
124122
)
125-
@testing.gpu
126123
class TestFlatiterSubscriptIndexError(unittest.TestCase):
127124
@testing.for_all_dtypes()
128125
def test_getitem(self, dtype):

0 commit comments

Comments
 (0)