Xfail tests for ndarray indexing
@@ -78,9 +78,26 @@ from cupy import testing
@testing.gpu
class TestArrayIndexingParameterized(unittest.TestCase):
+ _getitem_hip_skip_condition = [
+ ((1, 0, 2), (2, 3, 4), None),
+ ((-1, 0, -2), (2, 3, 4), None),
+ ((1, 0, 2), (2, 3, 4), (2, 0, 1)),
+ ((-1, 0, -2), (2, 3, 4), (2, 0, 1)),
+ ((slice(None, None, None), None), (2,), None),
+ ((slice(-9, -10, -1),), (10,), None),
+ ((slice(-4, -5, -1),), (10,), None),
+ ((slice(-5, -6, -1),), (10,), None),
+ ]
+
+ def _check_getitem_hip_skip_condition(self):
+ return (self.indexes, self.shape, self.transpose) in \
+ self._getitem_hip_skip_condition
+
@testing.for_all_dtypes()
@testing.numpy_cupy_array_equal()
def test_getitem(self, xp, dtype):
+ if self._check_getitem_hip_skip_condition():
+ pytest.xfail('HIP may have a bug')
a = testing.shaped_arange(self.shape, xp, dtype)
if self.transpose:
a = a.transpose(self.transpose)
