filter functions
@@ -18,6 +18,7 @@ try:
for f in dir(cupyx.scipy.special)
if isinstance(getattr(cupyx.scipy.special, f), cupy.ufunc)
}
+
except ImportError:
scipy_ufuncs = set()
cupyx_scipy_ufuncs = set()
@@ -27,8 +28,17 @@ except ImportError:
@testing.with_requires("scipy")
@pytest.mark.parametrize("ufunc", sorted(cupyx_scipy_ufuncs & scipy_ufuncs))
class TestUfunc:
+ def _should_skip(self, f):
+ if f.startswith("gammainc"):
+ if (
+ cupy.cuda.runtime.is_hip
+ and cupy.cuda.runtime.runtimeGetVersion() < 5_00_00000
+ ):
+ pytest.skip('ROCm/HIP fails in ROCm 4.x')
+
@testing.numpy_cupy_allclose(atol=1e-4)
def test_dispatch(self, xp, ufunc):
+ self._should_skip(ufunc)
ufunc = getattr(scipy.special, ufunc)
# some ufunc (like sph_harm) do not work with float inputs
# therefore we retrieve the types from the ufunc itself
