cuda.bindings._v2.driver.mem_get_mem_pool#
- cuda.bindings._v2.driver.mem_get_mem_pool(location, int type) intptr_t#
Gets the current memory pool for a memory location and of a particular allocation type.
The memory location can be of one of
CU_MEM_LOCATION_TYPE_DEVICE,CU_MEM_LOCATION_TYPE_HOSTorCU_MEM_LOCATION_TYPE_HOST_NUMA,CU_MEM_LOCATION_TYPE_HOST_NUMA, orCU_MEM_LOCATION_TYPE_DEVICE_LOCALITY_DOMAIN. The allocation type can be one ofCU_MEM_ALLOCATION_TYPE_PINNEDorCU_MEM_ALLOCATION_TYPE_MANAGED. When the allocation type isCU_MEM_ALLOCATION_TYPE_MANAGED, the location type can also beCU_MEM_LOCATION_TYPE_NONEto indicate no preferred location for the managed memory pool.CU_MEM_ALLOCATION_TYPE_MANAGEDcan not be used withCU_MEM_LOCATION_TYPE_DEVICE_LOCALITY_DOMAIN. In all other cases, the call returnsCUDA_ERROR_INVALID_VALUE. Returns the last pool provided tocuMemSetMemPoolorcuDeviceSetMemPoolfor this location and allocation type or the location’s default memory pool ifcuMemSetMemPoolorcuDeviceSetMemPoolfor that allocType and location has never been called. By default the current mempool of a location is the default mempool for a device. Otherwise the returned pool must have been set withcuDeviceSetMemPool.- Parameters:
location (intptr_t) – Memory location for which to query the current memory pool.
type (MemAllocationType) – Allocation type for which to query the current memory pool.
- Returns:
- Returned current memory pool for the given location and
allocation type.
- Return type:
intptr_t
See also
cuMemGetMemPool