pub type CUmemPoolProps = CUmemPoolProps_v1;Expand description
Specifies the properties of allocations made from the pool.
Aliased Type§
#[repr(C)]pub struct CUmemPoolProps {
pub allocType: CUmemAllocationType_enum,
pub handleTypes: CUmemAllocationHandleType_enum,
pub location: CUmemLocation_st,
pub win32SecurityAttributes: *mut c_void,
pub maxSize: u64,
pub usage: u16,
pub gpuDirectRDMACapable: u8,
pub reserved: [u8; 53],
}Fields§
§allocType: CUmemAllocationType_enumAllocation type.
Currently must be specified as CUmemAllocationType::CU_MEM_ALLOCATION_TYPE_PINNED.
handleTypes: CUmemAllocationHandleType_enumHandle types that will be supported by allocations from the pool.
location: CUmemLocation_stLocation where allocations should reside.
win32SecurityAttributes: *mut c_voidWindows-specific LPSECURITYATTRIBUTES required when CUmemAllocationHandleType_enum::CU_MEM_HANDLE_TYPE_WIN32 is specified.
This security attribute defines the scope of which exported allocations may be transferred to other processes. In all other cases, this field is required to be zero.
maxSize: u64Maximum pool size.
When set to 0, defaults to a system dependent value.
usage: u16Bitmask indicating intended usage for the pool.
gpuDirectRDMACapable: u8Allocation hint for requesting GPUDirect RDMA capable memory.
On devices that support GPUDirect RDMA, this flag indicates that the memory will be used for GPUDirect RDMA. On platforms where the default RDMA path does not support localized allocations, this flag has the following effects:
- For MPS clients using MLOPart/locality domains, this flag has the effect of disabling localization for the pool. This allows the pool to be used for GPUDirect RDMA with the default RDMA path.
- For pools that are localized using CUDA locality domain APIs, using this flag will have no effect, but attempting to export the localized memory without forcing PCIe will return an error. To use GPUDirect RDMA with localized pools on platforms where the default RDMA path does not support localized allocations, handles must be acquired with the flag
CUmemRangeFlags_enum::CU_MEM_RANGE_FLAG_DMA_BUF_MAPPING_TYPE_PCIE. Note that CUDA memory pools are only compatible with dma_buf mappings.
reserved: [u8; 53]reserved for future use, must be 0.