Function kn_cuda_sys::bindings::cudaMemPoolCreate
source · pub unsafe extern "C" fn cudaMemPoolCreate(
memPool: *mut cudaMemPool_t,
poolProps: *const cudaMemPoolProps
) -> cudaError_tExpand description
\brief Creates a memory pool
Creates a CUDA memory pool and returns the handle in \p pool. The \p poolProps determines the properties of the pool such as the backing device and IPC capabilities.
To create a memory pool targeting a specific host NUMA node, applications must set ::cudaMemPoolProps::cudaMemLocation::type to ::cudaMemLocationTypeHostNuma and ::cudaMemPoolProps::cudaMemLocation::id must specify the NUMA ID of the host memory node. By default, the pool’s memory will be accessible from the device it is allocated on. In the case of pools created with ::cudaMemLocationTypeHostNuma, their default accessibility will be from the host CPU. Applications can control the maximum size of the pool by specifying a non-zero value for ::cudaMemPoolProps::maxSize. If set to 0, the maximum size of the pool will default to a system dependent value.
\note Specifying cudaMemHandleTypeNone creates a memory pool that will not support IPC.
\returns ::cudaSuccess, ::cudaErrorInvalidValue, ::cudaErrorNotSupported
\sa ::cuMemPoolCreate, ::cudaDeviceSetMemPool, ::cudaMallocFromPoolAsync, ::cudaMemPoolExportToShareableHandle, ::cudaDeviceGetDefaultMemPool, ::cudaDeviceGetMemPool