Xfail tests for manipulation dims under HIP/ROCm
@@ -4,6 +4,7 @@ import numpy
import pytest
import cupy
+from cupy.cuda import runtime
from cupy import testing
@@ -298,9 +299,20 @@ class TestBroadcast(unittest.TestCase):
assert broadcast_np.size == broadcast_cp.size
assert broadcast_np.nd == broadcast_cp.nd
+ _broadcast_arrays_hip_skip_condition= [
+ [(1,), (1,)],
+ [(2,), (2,)],
+ ]
+
+ def _check_broadcast_arrays_hip_skip_condition(self):
+ return self.shapes in self._broadcast_arrays_hip_skip_condition
+
@testing.for_all_dtypes()
@testing.numpy_cupy_array_equal()
def test_broadcast_arrays(self, xp, dtype):
+ if runtime.is_hip:
+ if self._check_broadcast_arrays_hip_skip_condition():
+ pytest.xfail('HIP/ROCm may have a bug')
arrays = [
testing.shaped_arange(s, xp, dtype) for s in self.shapes]
return xp.broadcast_arrays(*arrays)
