Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update thrid party testing f/w #1754

Merged
merged 4 commits into from
Mar 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
209 changes: 106 additions & 103 deletions tests/skipped_tests.tbl

Large diffs are not rendered by default.

226 changes: 115 additions & 111 deletions tests/skipped_tests_gpu.tbl

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions tests/test_linalg.py
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,7 @@ def test_eig_arange(type, size):
@pytest.mark.parametrize("type", get_all_dtypes(no_bool=True, no_none=True))
@pytest.mark.parametrize("size", [2, 4, 8])
def test_eigh_arange(type, size):
if dpctl.get_current_device_type() != dpctl.device_type.gpu:
if dpctl.SyclDevice().device_type != dpctl.device_type.gpu:
pytest.skip(
"eig function doesn't work on CPU: https://github.com/IntelPython/dpnp/issues/1005"
)
Expand Down Expand Up @@ -429,7 +429,7 @@ def test_eigh_arange(type, size):

@pytest.mark.parametrize("type", get_all_dtypes(no_bool=True, no_complex=True))
def test_eigvals(type):
if dpctl.get_current_device_type() != dpctl.device_type.gpu:
if dpctl.SyclDevice().device_type != dpctl.device_type.gpu:
pytest.skip(
"eigvals function doesn't work on CPU: https://github.com/IntelPython/dpnp/issues/1005"
)
Expand Down
1 change: 0 additions & 1 deletion tests/third_party/cupy/binary_tests/test_elementwise.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
from tests.third_party.cupy import testing


@testing.gpu
class TestElementwise(unittest.TestCase):
@testing.for_int_dtypes()
@testing.numpy_cupy_array_equal()
Expand Down
2 changes: 0 additions & 2 deletions tests/third_party/cupy/core_tests/test_ndarray_reduction.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
from tests.third_party.cupy import testing


@testing.gpu
@testing.parameterize(
*testing.product(
{
Expand Down Expand Up @@ -395,7 +394,6 @@ def test_zero_size(self, xp):
}
)
)
@testing.gpu
# @unittest.skipUnless(cupy.cuda.cub.available, 'The CUB routine is not enabled')
class TestCubReduction(unittest.TestCase):
# def setUp(self):
Expand Down
2 changes: 0 additions & 2 deletions tests/third_party/cupy/creation_tests/test_basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
from tests.third_party.cupy import testing


@testing.gpu
class TestBasic(unittest.TestCase):
@testing.for_CF_orders()
@testing.for_all_dtypes()
Expand Down Expand Up @@ -259,7 +258,6 @@ def test_full_like_subok(self):
}
)
)
@testing.gpu
class TestBasicReshape(unittest.TestCase):
@testing.with_requires("numpy>=1.17.0")
@testing.for_orders("C")
Expand Down
3 changes: 0 additions & 3 deletions tests/third_party/cupy/creation_tests/test_matrix.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
from tests.third_party.cupy import testing


@testing.gpu
class TestMatrix(unittest.TestCase):
@testing.numpy_cupy_array_equal()
def test_diag1(self, xp):
Expand Down Expand Up @@ -107,7 +106,6 @@ def test_diagflat_from_scalar_with_k1(self, xp):
{"shape": (3, 3)},
{"shape": (4, 3)},
)
@testing.gpu
class TestTri(unittest.TestCase):
@testing.for_all_dtypes()
@testing.numpy_cupy_array_equal()
Expand All @@ -131,7 +129,6 @@ def test_tri_posi(self, xp, dtype):
{"shape": (4, 3)},
{"shape": (2, 3, 4)},
)
@testing.gpu
class TestTriLowerAndUpper(unittest.TestCase):
@testing.for_all_dtypes(no_complex=True)
@testing.numpy_cupy_array_equal()
Expand Down
4 changes: 0 additions & 4 deletions tests/third_party/cupy/creation_tests/test_ranges.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ def wrapper(self, *args, **kwargs):
return decorator


@testing.gpu
class TestRanges(unittest.TestCase):
@testing.for_all_dtypes(no_bool=True)
@testing.numpy_cupy_array_equal()
Expand Down Expand Up @@ -312,7 +311,6 @@ def test_logspace_array_start_stop_axis1(self, xp, dtype_range, dtype_out):
}
)
)
@testing.gpu
class TestMeshgrid(unittest.TestCase):
@testing.for_all_dtypes()
def test_meshgrid0(self, dtype):
Expand Down Expand Up @@ -349,7 +347,6 @@ def test_meshgrid3(self, xp, dtype):
)


@testing.gpu
class TestMgrid(unittest.TestCase):
@testing.numpy_cupy_array_equal()
def test_mgrid0(self, xp):
Expand Down Expand Up @@ -382,7 +379,6 @@ def test_mgrid5(self, xp):
return xp.mgrid[x:y:10j, x:y:10j]


@testing.gpu
class TestOgrid(unittest.TestCase):
@testing.numpy_cupy_array_equal()
def test_ogrid0(self, xp):
Expand Down
9 changes: 0 additions & 9 deletions tests/third_party/cupy/fft_tests/test_fft.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
)
)
@pytest.mark.usefixtures("allow_fall_back_on_numpy")
@testing.gpu
class TestFft(unittest.TestCase):
@testing.for_all_dtypes()
@testing.numpy_cupy_allclose(
Expand Down Expand Up @@ -77,7 +76,6 @@ def test_ifft(self, xp, dtype):
{"shape": (3, 4), "s": (1, 0), "axes": None, "norm": None},
)
@pytest.mark.usefixtures("allow_fall_back_on_numpy")
@testing.gpu
class TestFft2(unittest.TestCase):
@testing.for_all_dtypes()
@testing.numpy_cupy_allclose(
Expand Down Expand Up @@ -135,7 +133,6 @@ def test_ifft2(self, xp, dtype):
{"shape": (0, 0, 5), "s": None, "axes": None, "norm": None},
)
@pytest.mark.usefixtures("allow_fall_back_on_numpy")
@testing.gpu
class TestFftn(unittest.TestCase):
@testing.for_all_dtypes()
@testing.numpy_cupy_allclose(
Expand Down Expand Up @@ -176,7 +173,6 @@ def test_ifftn(self, xp, dtype):
)
)
@pytest.mark.usefixtures("allow_fall_back_on_numpy")
@testing.gpu
class TestRfft(unittest.TestCase):
@testing.for_all_dtypes(no_complex=True)
@testing.numpy_cupy_allclose(
Expand Down Expand Up @@ -208,7 +204,6 @@ def test_irfft(self, xp, dtype):
{"shape": (2, 3, 4), "s": None, "axes": (), "norm": None},
)
@pytest.mark.usefixtures("allow_fall_back_on_numpy")
@testing.gpu
class TestRfft2EmptyAxes(unittest.TestCase):
@testing.for_all_dtypes(no_complex=True)
def test_rfft2(self, dtype):
Expand All @@ -230,7 +225,6 @@ def test_irfft2(self, dtype):
{"shape": (2, 3, 4), "s": None, "axes": (), "norm": None},
)
@pytest.mark.usefixtures("allow_fall_back_on_numpy")
@testing.gpu
class TestRfftnEmptyAxes(unittest.TestCase):
@testing.for_all_dtypes(no_complex=True)
def test_rfftn(self, dtype):
Expand All @@ -257,7 +251,6 @@ def test_irfftn(self, dtype):
)
)
@pytest.mark.usefixtures("allow_fall_back_on_numpy")
@testing.gpu
class TestHfft(unittest.TestCase):
@testing.for_all_dtypes()
@testing.numpy_cupy_allclose(
Expand Down Expand Up @@ -290,7 +283,6 @@ def test_ihfft(self, xp, dtype):
{"n": 100, "d": 2},
)
@pytest.mark.usefixtures("allow_fall_back_on_numpy")
@testing.gpu
class TestFftfreq(unittest.TestCase):
@testing.for_all_dtypes()
@testing.numpy_cupy_allclose(
Expand Down Expand Up @@ -325,7 +317,6 @@ def test_rfftfreq(self, xp, dtype):
{"shape": (10, 10), "axes": (0, 1)},
)
@pytest.mark.usefixtures("allow_fall_back_on_numpy")
@testing.gpu
class TestFftshift(unittest.TestCase):
@testing.for_all_dtypes()
@testing.numpy_cupy_allclose(
Expand Down
7 changes: 0 additions & 7 deletions tests/third_party/cupy/indexing_tests/test_generate.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
from tests.third_party.cupy import testing


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


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


@testing.gpu
class TestR_(unittest.TestCase):
@testing.for_all_dtypes()
@testing.numpy_cupy_array_equal()
Expand Down Expand Up @@ -103,7 +100,6 @@ def test_r_9(self, dtype):
cupy.r_[a, b]


@testing.gpu
class TestC_(unittest.TestCase):
@testing.for_all_dtypes()
@testing.numpy_cupy_array_equal()
Expand All @@ -128,7 +124,6 @@ def test_c_3(self, dtype):
cupy.c_[a, b]


@testing.gpu
class TestAxisConcatenator(unittest.TestCase):
def test_AxisConcatenator_init1(self):
with self.assertRaises(TypeError):
Expand All @@ -139,7 +134,6 @@ def test_len(self):
self.assertEqual(len(a), 0)


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


@testing.gpu
class TestRavelMultiIndex(unittest.TestCase):
@testing.for_orders(["C", "F", None])
@testing.for_int_dtypes()
Expand Down
2 changes: 0 additions & 2 deletions tests/third_party/cupy/indexing_tests/test_indexing.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,6 @@ def test_extract_empty_1dim(self, xp):


@pytest.mark.usefixtures("allow_fall_back_on_numpy")
@testing.gpu
class TestChoose(unittest.TestCase):
@testing.for_all_dtypes()
@testing.numpy_cupy_array_equal()
Expand Down Expand Up @@ -253,7 +252,6 @@ def test_choose_broadcast_fail(self, dtype):
return a.choose(c)


@testing.gpu
class TestSelect(unittest.TestCase):
@testing.for_all_dtypes(no_bool=True, no_complex=True)
@testing.numpy_cupy_array_equal()
Expand Down
13 changes: 0 additions & 13 deletions tests/third_party/cupy/indexing_tests/test_insert.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
}
)
)
@testing.gpu
class TestPlace(unittest.TestCase):
# NumPy 1.9 don't wraps values.
# https://github.com/numpy/numpy/pull/5821
Expand All @@ -39,7 +38,6 @@ def test_place(self, xp, dtype):
}
)
)
@testing.gpu
class TestPlaceRaises(unittest.TestCase):
# NumPy 1.9 performs illegal memory access.
# https://github.com/numpy/numpy/pull/5821
Expand Down Expand Up @@ -77,7 +75,6 @@ def test_place_shape_unmatch_error(self, dtype):
)
)
@pytest.mark.usefixtures("allow_fall_back_on_numpy")
@testing.gpu
class TestPut(unittest.TestCase):
@testing.for_all_dtypes()
@testing.numpy_cupy_array_equal()
Expand Down Expand Up @@ -105,7 +102,6 @@ def test_put(self, xp, dtype):
}
)
)
@testing.gpu
class TestPutScalars(unittest.TestCase):
@pytest.mark.usefixtures("allow_fall_back_on_numpy")
@testing.numpy_cupy_array_equal()
Expand Down Expand Up @@ -136,7 +132,6 @@ def test_put_values_scalar(self, xp):
)
)
@pytest.mark.usefixtures("allow_fall_back_on_numpy")
@testing.gpu
class TestPutRaises(unittest.TestCase):
@testing.for_all_dtypes()
def test_put_inds_underflow_error(self, dtype):
Expand Down Expand Up @@ -170,7 +165,6 @@ def test_put_mode_error(self, dtype):
@testing.parameterize(
*testing.product({"shape": [(0,), (1,), (2, 3), (2, 3, 4)]})
)
@testing.gpu
class TestPutmaskSameShape(unittest.TestCase):
@testing.for_all_dtypes()
@testing.numpy_cupy_array_equal()
Expand All @@ -191,7 +185,6 @@ def test_putmask(self, xp, dtype):
}
)
)
@testing.gpu
class TestPutmaskDifferentShapes(unittest.TestCase):
@testing.for_all_dtypes()
@testing.numpy_cupy_array_equal()
Expand All @@ -207,7 +200,6 @@ def test_putmask(self, xp, dtype):


@pytest.mark.usefixtures("allow_fall_back_on_numpy")
@testing.gpu
class TestPutmask(unittest.TestCase):
@testing.numpy_cupy_array_equal()
def test_putmask_scalar_values(self, xp):
Expand Down Expand Up @@ -264,7 +256,6 @@ def test_putmask_differnt_dtypes_mask(self, xp, dtype):
)
)
@pytest.mark.usefixtures("allow_fall_back_on_numpy")
@testing.gpu
class TestFillDiagonal(unittest.TestCase):
def _compute_val(self, xp):
if type(self.val) is int:
Expand Down Expand Up @@ -309,7 +300,6 @@ def test_1darray(self, dtype):
}
)
)
@testing.gpu
class TestDiagIndices(unittest.TestCase):
@testing.numpy_cupy_array_equal()
def test_diag_indices(self, xp):
Expand All @@ -324,7 +314,6 @@ def test_diag_indices(self, xp):
}
)
)
@testing.gpu
class TestDiagIndicesInvalidValues(unittest.TestCase):
@testing.numpy_cupy_array_equal()
def test_diag_indices(self, xp):
Expand All @@ -338,7 +327,6 @@ def test_diag_indices(self, xp):
}
)
)
@testing.gpu
class TestDiagIndicesFrom(unittest.TestCase):
@testing.numpy_cupy_array_equal()
def test_diag_indices_from(self, xp):
Expand All @@ -354,7 +342,6 @@ def test_diag_indices_from(self, xp):
)
)
@pytest.mark.usefixtures("allow_fall_back_on_numpy")
@testing.gpu
class TestDiagIndicesFromRaises(unittest.TestCase):
def test_non_equal_dims(self):
for xp in (numpy, cupy):
Expand Down
3 changes: 0 additions & 3 deletions tests/third_party/cupy/indexing_tests/test_iterate.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
from tests.third_party.cupy import testing


@testing.gpu
class TestFlatiter(unittest.TestCase):
def test_base(self):
for xp in (numpy, cupy):
Expand Down Expand Up @@ -61,7 +60,6 @@ def test_copy_next(self, xp):
{"shape": (), "index": slice(None)},
{"shape": (10,), "index": slice(None)},
)
@testing.gpu
class TestFlatiterSubscript(unittest.TestCase):
@testing.for_CF_orders()
@testing.for_all_dtypes()
Expand Down Expand Up @@ -122,7 +120,6 @@ def test_setitem_ndarray_different_types(self, xp, a_dtype, v_dtype, order):
# {'shape': (2, 3, 4), 'index': cupy.array([0])},
{"shape": (2, 3, 4), "index": [0]},
)
@testing.gpu
class TestFlatiterSubscriptIndexError(unittest.TestCase):
@testing.for_all_dtypes()
def test_getitem(self, dtype):
Expand Down
Loading
Loading