pub unsafe extern "C" fn cuMemPoolCreate(
pool: *mut CUmemoryPool,
poolProps: *const CUmemPoolProps,
) -> CUresult
Expand 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 ::CUmemPoolProps::CUmemLocation::type to ::CU_MEM_LOCATION_TYPE_HOST_NUMA and ::CUmemPoolProps::CUmemLocation::id must specify the NUMA ID of the host memory node. Specifying ::CU_MEM_LOCATION_TYPE_HOST_NUMA_CURRENT or ::CU_MEM_LOCATION_TYPE_HOST as the ::CUmemPoolProps::CUmemLocation::type will result in ::CUDA_ERROR_INVALID_VALUE. By default, the pool’s memory will be accessible from the device it is allocated on. In the case of pools created with ::CU_MEM_LOCATION_TYPE_HOST_NUMA, 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 ::CUmemPoolProps::maxSize. If set to 0, the maximum size of the pool will default to a system dependent value.
Applications can set ::CUmemPoolProps::handleTypes to ::CU_MEM_HANDLE_TYPE_FABRIC in order to create ::CUmemoryPool suitable for sharing within an IMEX domain. An IMEX domain is either an OS instance or a group of securely connected OS instances using the NVIDIA IMEX daemon. An IMEX channel is a global resource within the IMEX domain that represents a logical entity that aims to provide fine grained accessibility control for the participating processes. When exporter and importer CUDA processes have been granted access to the same IMEX channel, they can securely share memory. If the allocating process does not have access setup for an IMEX channel, attempting to export a ::CUmemoryPool with ::CU_MEM_HANDLE_TYPE_FABRIC will result in ::CUDA_ERROR_NOT_PERMITTED. The nvidia-modprobe CLI provides more information regarding setting up of IMEX channels.
\note Specifying CU_MEM_HANDLE_TYPE_NONE creates a memory pool that will not support IPC.
\returns ::CUDA_SUCCESS, ::CUDA_ERROR_NOT_INITIALIZED, ::CUDA_ERROR_INVALID_VALUE, ::CUDA_ERROR_OUT_OF_MEMORY, ::CUDA_ERROR_NOT_PERMITTED ::CUDA_ERROR_NOT_SUPPORTED
\sa ::cuDeviceSetMemPool, ::cuDeviceGetMemPool, ::cuDeviceGetDefaultMemPool, ::cuMemAllocFromPoolAsync, ::cuMemPoolExportToShareableHandle