cuda.bindings._v2.driver.mem_alloc_v2#

cuda.bindings._v2.driver.mem_alloc_v2(size_t bytesize) → uint64_t#

Allocates device memory.

Allocates bytesize bytes of linear memory on the device and returns in *dptr a pointer to the allocated memory. The allocated memory is suitably aligned for any kind of variable. The memory is not cleared. If bytesize is 0, cuMemAlloc() returns CUDA_ERROR_INVALID_VALUE.

Parameters:

bytesize (size_t) – Requested allocation size in bytes.

Returns:

Returned device pointer.

Return type:

uint64_t

See also

cuMemAlloc_v2