def test_autojit_device(self):
        @hsa.jit(device=True)
        def inner(a, b):
            return a + b

        @hsa.jit
        def outer(A, B):
            i = hsa.get_global_id(0)
            if i < A.size:
                A[i] = inner(A[i], B[i])

        A = np.arange(10)
        Aorig = A.copy()
        B = np.arange(10)

        outer.forall(A.size)(A, B)
        self.assertFalse(np.all(Aorig == A))
        np.testing.assert_equal(Aorig + B, A)
dataset/ETHPy150Open numba/numba/numba/hsa/tests/hsapy/test_autojit.py/TestAutoJit.test_autojit_device/original