Elaborate failing conditions
@@ -453,12 +453,23 @@ class TestDgmm(unittest.TestCase):
cublas.dgmm(self.side, self.a, self.x, out=self.a)
cupy.testing.assert_allclose(self.a, ref, rtol=self.tol, atol=self.tol)
- @pytest.mark.skipif(cupy.cuda.runtime.is_hip,
- reason="HIP fails for some condition")
+ _dgmm_incx_minus_one_hip_skip_condition = [
+ ('C', 'F', (9, 10), 'R'),
+ ('C', 'F', (10, 9), 'R'),
+ ('F', 'F', (9, 10), 'L'),
+ ('F', 'F', (10, 9), 'L'),
+ ]
+
+ def _check_dgmm_incx_minus_one_hip_skip_condition(self):
+ return (self.ordera, self.orderc, self.shape, self.side) in \
+ self._dgmm_incx_minus_one_hip_skip_condition
+
@testing.for_dtypes('fdFD')
def test_dgmm_incx_minus_one(self, dtype):
if self.orderc != 'F':
raise unittest.SkipTest()
+ if self._check_dgmm_incx_minus_one_hip_skip_condition():
+ raise unittest.SkipTest()
self._setup(dtype)
if self.side == 'L':
ref = cupy.diag(self.x[::-1]) @ self.a
