cuda.bindings._v2.driver.mem_get_default_mem_pool#

cuda.bindings._v2.driver.mem_get_default_mem_pool(location, int type) → intptr_t#

Returns the default memory pool for a given location and allocation type.

The memory location can be of one of CU_MEM_LOCATION_TYPE_DEVICE, CU_MEM_LOCATION_TYPE_HOST, CU_MEM_LOCATION_TYPE_HOST_NUMA, or CU_MEM_LOCATION_TYPE_DEVICE_LOCALITY_DOMAIN. The allocation type can be one of CU_MEM_ALLOCATION_TYPE_PINNED or CU_MEM_ALLOCATION_TYPE_MANAGED. When the allocation type is CU_MEM_ALLOCATION_TYPE_MANAGED, the location type can also be CU_MEM_LOCATION_TYPE_NONE to indicate no preferred location for the managed memory pool. CU_MEM_ALLOCATION_TYPE_MANAGED can not be used with CU_MEM_LOCATION_TYPE_DEVICE_LOCALITY_DOMAIN.

Parameters:
  • location (intptr_t) – Memory location for which to query the default memory pool.

  • type (MemAllocationType) – Allocation type for which to query the default memory pool.

Returns:

Returned default memory pool for the given location and

allocation type.

Return type:

intptr_t

See also

cuMemGetDefaultMemPool