diff --git a/tests/skipped_tests_gpu_no_fp64.tbl b/tests/skipped_tests_gpu_no_fp64.tbl index 15b28cd06d5..710eaf88afa 100644 --- a/tests/skipped_tests_gpu_no_fp64.tbl +++ b/tests/skipped_tests_gpu_no_fp64.tbl @@ -497,12 +497,6 @@ tests/test_umath.py::TestArctan2::test_invalid_shape[(2,2)] tests/test_umath.py::TestSqrt::test_sqrt_complex[complex64] -tests/third_party/cupy/core_tests/test_ndarray_math.py::TestRound_param_0_{decimals=-2}::test_round_out -tests/third_party/cupy/core_tests/test_ndarray_math.py::TestRound_param_1_{decimals=-1}::test_round_out -tests/third_party/cupy/core_tests/test_ndarray_math.py::TestRound_param_2_{decimals=0}::test_round_out -tests/third_party/cupy/core_tests/test_ndarray_math.py::TestRound_param_3_{decimals=1}::test_round_out -tests/third_party/cupy/core_tests/test_ndarray_math.py::TestRound_param_4_{decimals=2}::test_round_out - tests/third_party/cupy/creation_tests/test_ranges.py::TestRanges::test_arange_no_dtype_float tests/third_party/cupy/creation_tests/test_ranges.py::TestRanges::test_linspace_array_start_stop tests/third_party/cupy/creation_tests/test_ranges.py::TestRanges::test_linspace_float_overflow @@ -1189,26 +1183,6 @@ tests/third_party/cupy/math_tests/test_arithmetic.py::TestArithmeticBinary2_para tests/third_party/cupy/math_tests/test_arithmetic.py::TestArithmeticBinary2_param_1824_{arg1=-2.0, arg2=array([-3, -2, -1, 1, 2, 3]), dtype=float64, name='fmod', use_dtype=True}::test_binary tests/third_party/cupy/math_tests/test_arithmetic.py::TestArithmeticBinary2_param_1825_{arg1=-2.0, arg2=array([-3, -2, -1, 1, 2, 3]), dtype=float64, name='fmod', use_dtype=False}::test_binary -tests/third_party/cupy/math_tests/test_rounding.py::TestRound_param_0_{decimals=-2}::test_round_out -tests/third_party/cupy/math_tests/test_rounding.py::TestRound_param_1_{decimals=-1}::test_round_out -tests/third_party/cupy/math_tests/test_rounding.py::TestRound_param_2_{decimals=0}::test_round_out -tests/third_party/cupy/math_tests/test_rounding.py::TestRound_param_3_{decimals=1}::test_round_out -tests/third_party/cupy/math_tests/test_rounding.py::TestRound_param_4_{decimals=2}::test_round_out -tests/third_party/cupy/math_tests/test_rounding.py::TestRoundExtreme_param_0_{decimals=-100}::test_round_large -tests/third_party/cupy/math_tests/test_rounding.py::TestRoundExtreme_param_0_{decimals=-100}::test_round_small -tests/third_party/cupy/math_tests/test_rounding.py::TestRoundExtreme_param_1_{decimals=-99}::test_round_large -tests/third_party/cupy/math_tests/test_rounding.py::TestRoundExtreme_param_1_{decimals=-99}::test_round_small -tests/third_party/cupy/math_tests/test_rounding.py::TestRoundExtreme_param_2_{decimals=-90}::test_round_large -tests/third_party/cupy/math_tests/test_rounding.py::TestRoundExtreme_param_2_{decimals=-90}::test_round_small -tests/third_party/cupy/math_tests/test_rounding.py::TestRoundExtreme_param_3_{decimals=0}::test_round_large -tests/third_party/cupy/math_tests/test_rounding.py::TestRoundExtreme_param_3_{decimals=0}::test_round_small -tests/third_party/cupy/math_tests/test_rounding.py::TestRoundExtreme_param_4_{decimals=90}::test_round_large -tests/third_party/cupy/math_tests/test_rounding.py::TestRoundExtreme_param_4_{decimals=90}::test_round_small -tests/third_party/cupy/math_tests/test_rounding.py::TestRoundExtreme_param_5_{decimals=99}::test_round_large -tests/third_party/cupy/math_tests/test_rounding.py::TestRoundExtreme_param_5_{decimals=99}::test_round_small -tests/third_party/cupy/math_tests/test_rounding.py::TestRoundExtreme_param_6_{decimals=100}::test_round_large -tests/third_party/cupy/math_tests/test_rounding.py::TestRoundExtreme_param_6_{decimals=100}::test_round_small - tests/third_party/cupy/math_tests/test_explog.py::TestExplog::test_exp tests/third_party/cupy/math_tests/test_explog.py::TestExplog::test_exp2 tests/third_party/cupy/math_tests/test_explog.py::TestExplog::test_expm1 diff --git a/tests/third_party/cupy/core_tests/test_ndarray_math.py b/tests/third_party/cupy/core_tests/test_ndarray_math.py index cff07e5c104..5ed98f374bf 100644 --- a/tests/third_party/cupy/core_tests/test_ndarray_math.py +++ b/tests/third_party/cupy/core_tests/test_ndarray_math.py @@ -4,6 +4,7 @@ import pytest import dpnp as cupy +from tests.helper import has_support_aspect64 from tests.third_party.cupy import testing @@ -34,7 +35,8 @@ def test_round(self, xp, dtype): @testing.numpy_cupy_array_equal() def test_round_out(self, xp): - a = testing.shaped_random(self.shape, xp, scale=100, dtype="d") + dtype = "d" if has_support_aspect64() else "f" + a = testing.shaped_random(self.shape, xp, scale=100, dtype=dtype) out = xp.empty_like(a) a.round(self.decimals, out) return out diff --git a/tests/third_party/cupy/math_tests/test_rounding.py b/tests/third_party/cupy/math_tests/test_rounding.py index 73dead998b9..f36fcfca1ae 100644 --- a/tests/third_party/cupy/math_tests/test_rounding.py +++ b/tests/third_party/cupy/math_tests/test_rounding.py @@ -103,7 +103,8 @@ def test_round(self, xp, dtype): @testing.numpy_cupy_array_equal() def test_round_out(self, xp): - a = testing.shaped_random(self.shape, xp, scale=100, dtype="d") + dtype = "d" if has_support_aspect64() else "f" + a = testing.shaped_random(self.shape, xp, scale=100, dtype=dtype) out = xp.empty_like(a) xp.around(a, self.decimals, out) return out @@ -120,13 +121,25 @@ def test_round_out(self, xp): class TestRoundExtreme(unittest.TestCase): shape = (20,) - @testing.for_dtypes([numpy.float64, numpy.complex128]) + dtype_ = ( + [numpy.float64, numpy.complex128] + if has_support_aspect64() + else [numpy.float32, numpy.complex64] + ) + + @testing.for_dtypes(dtype_) @testing.numpy_cupy_allclose() def test_round_large(self, xp, dtype): a = testing.shaped_random(self.shape, xp, scale=1e100, dtype=dtype) return xp.around(a, self.decimals) - @testing.for_dtypes([numpy.float64, numpy.complex128]) + dtype_ = ( + [numpy.float64, numpy.complex128] + if has_support_aspect64() + else [numpy.float32, numpy.complex64] + ) + + @testing.for_dtypes(dtype_) @testing.numpy_cupy_allclose() def test_round_small(self, xp, dtype): a = testing.shaped_random(self.shape, xp, scale=1e-100, dtype=dtype)