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

Function test_context

python/pyarrow/tests/test_cuda_numba_interop.py:51–59  ·  view source on GitHub ↗
(c)

Source from the content-addressed store, hash-verified

49@pytest.mark.parametrize("c", range(len(context_choice_ids)),
50 ids=context_choice_ids)
51def test_context(c):
52 ctx, nb_ctx = context_choices[c]
53 assert ctx.handle == nb_ctx.handle.value
54 assert ctx.handle == ctx.to_numba().handle.value
55 ctx2 = cuda.Context.from_numba(nb_ctx)
56 assert ctx.handle == ctx2.handle
57 size = 10
58 buf = ctx.new_buffer(size)
59 assert ctx.handle == buf.context.handle
60
61
62def make_random_buffer(size, target='host', dtype='uint8', ctx=None):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected