Skip gammainc tests for ROCm 4.3
@@ -11,6 +11,10 @@ INVALID_POINTS = [(1, -1), (0, 0), (-1, 1), (cp.nan, 1), (1, cp.nan)]
class TestGammainc(object):
+ @pytest.mark.skipif(
+ cp.cuda.runtime.is_hip and
+ cp.cuda.runtime.runtimeGetVersion() < 5_00_00000,
+ reason='ROCm/HIP fails in ROCm 4.x')
@pytest.mark.parametrize("a, x", INVALID_POINTS)
def test_domain(self, a, x):
assert cp.isnan(sc.gammainc(a, x))
@@ -34,6 +38,10 @@ class TestGammainc(object):
else:
assert result == desired
+ @pytest.mark.skipif(
+ cp.cuda.runtime.is_hip and
+ cp.cuda.runtime.runtimeGetVersion() < 5_00_00000,
+ reason='ROCm/HIP fails in ROCm 4.x')
def test_infinite_limits(self):
# Test that large arguments converge to the hard-coded limits
# at infinity.
@@ -49,6 +57,10 @@ class TestGammainc(object):
a = cp.arange(1, 10)
assert_array_equal(sc.gammainc(a, 0), 0)
+ @pytest.mark.skipif(
+ cp.cuda.runtime.is_hip and
+ cp.cuda.runtime.runtimeGetVersion() < 5_00_00000,
+ reason='ROCm/HIP fails in ROCm 4.x')
def test_limit_check(self):
result = sc.gammainc(1e-10, 1)
limit = sc.gammainc(0, 1)
@@ -120,6 +132,10 @@ class TestGammaincc(object):
else:
assert result == desired
+ @pytest.mark.skipif(
+ cp.cuda.runtime.is_hip and
+ cp.cuda.runtime.runtimeGetVersion() < 5_00_00000,
+ reason='ROCm/HIP fails in ROCm 4.x')
def test_infinite_limits(self):
# Test that large arguments converge to the hard-coded limits
# at infinity.
@@ -140,6 +156,10 @@ class TestGammaincc(object):
a = cp.arange(1, 10)
assert_array_equal(sc.gammaincc(a, 0), 1)
+ @pytest.mark.skipif(
+ cp.cuda.runtime.is_hip and
+ cp.cuda.runtime.runtimeGetVersion() < 5_00_00000,
+ reason='ROCm/HIP fails in ROCm 4.x')
def test_roundtrip(self):
a = cp.logspace(-5, 10, 100)
x = cp.logspace(-5, 10, 100)
