Xfail some conditions of ndimage TestFilterFast
@@ -295,8 +295,23 @@ def dummy_deriv_func(input, axis, output, mode, cval, *args, **kwargs):
@testing.gpu
@testing.with_requires('scipy')
class TestFilterFast(FilterTestCaseBase):
+
+ def _hip_skip_invalid_condition(self):
+ if not runtime.is_hip:
+ return
+ if self.filter != 'percentile_filter':
+ return
+ if self.ksize != 3:
+ return
+ invalids = [(25, (1, 3, 4, 5)),
+ (50, (3, 4, 5)),
+ (-25, (1, 3, 4, 5))]
+ if (self.percentile, self.shape) in invalids:
+ pytest.xfail('ROCm/HIP may have a bug')
+
@testing.numpy_cupy_allclose(atol=1e-5, rtol=1e-5, scipy_name='scp')
def test_filter(self, xp, scp):
+ self._hip_skip_invalid_condition()
return self._filter(xp, scp)
