MCPcopy Create free account
hub / github.com/apache/arrow / test_pyarrow_memalloc

Function test_pyarrow_memalloc

python/pyarrow/tests/test_cuda_numba_interop.py:186–194  ·  view source on GitHub ↗
(c, dtype)

Source from the content-addressed store, hash-verified

184 ids=context_choice_ids)
185@pytest.mark.parametrize("dtype", dtypes, ids=dtypes)
186def test_pyarrow_memalloc(c, dtype):
187 ctx, nb_ctx = context_choices[c]
188 size = 10
189 arr, cbuf = make_random_buffer(size, target='device', dtype=dtype, ctx=ctx)
190
191 # wrap CudaBuffer with numba device array
192 mem = cbuf.to_numba()
193 darr = DeviceNDArray(arr.shape, arr.strides, arr.dtype, gpu_data=mem)
194 np.testing.assert_equal(darr.copy_to_host(), arr)
195
196
197@pytest.mark.parametrize("c", range(len(context_choice_ids)),

Callers

nothing calls this directly

Calls 1

make_random_bufferFunction · 0.70

Tested by

no test coverage detected