code: def test_pass_cai_array():
      dtype = np.int32
      size = 1024
      np_array = np.arange(size, dtype=dtype)
      cai_array = CudaArrayInterfaceImpl(
          size, np_array.itemsize, np_array.dtype
      )
  
      mod = SourceModule(
          """
      __global__ void gpu_arange(int *x)
      {
        const int i = threadIdx.x;
        x[i] = i;
      }
      """
      )
  
      gpu_arange = mod.get_function("gpu_arange")
      gpu_arange(cai_array, grid=(1,), block=(size, 1, 1))
  
      host_array = np.empty_like(np_array)
      drv.memcpy_dtoh(host_array, cai_array.ptr)
      assert (host_array == np_array).all()
  
imports: import numpy
  import numpy.linalg
  from pycuda.tools import mark_cuda_test, dtype_to_ctype
  import pytest
  import pycuda.gpuarray
  import pycuda.driver
  from pycuda.compiler import SourceModule
label_desc: Use image node_id 2 for calling a global function with example usage: test_pass_cai_array() without return types