diff --git a/dpnp/tests/third_party/cupy/math_tests/test_hyperbolic.py b/dpnp/tests/third_party/cupy/math_tests/test_hyperbolic.py index f195b041b5b2..5613cee41589 100644 --- a/dpnp/tests/third_party/cupy/math_tests/test_hyperbolic.py +++ b/dpnp/tests/third_party/cupy/math_tests/test_hyperbolic.py @@ -1,5 +1,7 @@ import unittest +import numpy + from dpnp.tests.helper import has_support_aspect64 from dpnp.tests.third_party.cupy import testing @@ -7,13 +9,16 @@ class TestHyperbolic(unittest.TestCase): @testing.for_all_dtypes() - @testing.numpy_cupy_allclose(atol=1e-5, type_check=has_support_aspect64()) + @testing.numpy_cupy_allclose( + atol={numpy.float16: 1e-3, "default": 1e-5}, + type_check=has_support_aspect64(), + ) def check_unary(self, name, xp, dtype): a = testing.shaped_arange((2, 3), xp, dtype) return getattr(xp, name)(a) @testing.for_dtypes(["e", "f", "d"]) - @testing.numpy_cupy_allclose(atol=1e-5) + @testing.numpy_cupy_allclose(atol={numpy.float16: 1e-3, "default": 1e-5}) def check_unary_unit(self, name, xp, dtype): a = xp.array([0.2, 0.4, 0.6, 0.8], dtype=dtype) return getattr(xp, name)(a) @@ -31,7 +36,7 @@ def test_arcsinh(self): self.check_unary("arcsinh") @testing.for_dtypes(["e", "f", "d"]) - @testing.numpy_cupy_allclose(atol=1e-5) + @testing.numpy_cupy_allclose(atol={numpy.float16: 1e-3, "default": 1e-5}) def test_arccosh(self, xp, dtype): a = xp.array([1, 2, 3], dtype=dtype) return xp.arccosh(a) diff --git a/dpnp/tests/third_party/cupy/math_tests/test_trigonometric.py b/dpnp/tests/third_party/cupy/math_tests/test_trigonometric.py index 9bb8b67870c7..3340565fbcb9 100644 --- a/dpnp/tests/third_party/cupy/math_tests/test_trigonometric.py +++ b/dpnp/tests/third_party/cupy/math_tests/test_trigonometric.py @@ -1,5 +1,6 @@ import unittest +import numpy import pytest from dpnp.tests.helper import has_support_aspect64 @@ -24,7 +25,7 @@ def check_binary(self, name, xp, dtype): return getattr(xp, name)(a, b) @testing.for_dtypes(["e", "f", "d"]) - @testing.numpy_cupy_allclose(atol=1e-5) + @testing.numpy_cupy_allclose(atol={numpy.float16: 1e-3, "default": 1e-5}) def check_unary_unit(self, name, xp, dtype): a = xp.array([0.2, 0.4, 0.6, 0.8], dtype=dtype) return getattr(xp, name)(a)