cuda.bindings._v2.driver.MemPoolAttribute#

class cuda.bindings._v2.driver.MemPoolAttribute(value: int)#

CUDA memory pool attributes

See CUmemPool_attribute.

REUSE_FOLLOW_EVENT_DEPENDENCIES: 1

(value type = int) Allow cuMemAllocAsync to use memory asynchronously freed in another streams as long as a stream ordering dependency of the allocating stream on the free action exists. Cuda events and null stream interactions can create the required stream ordered dependencies. (default enabled)

REUSE_ALLOW_OPPORTUNISTIC: 2

(value type = int) Allow reuse of already completed frees when there is no dependency between the free and allocation. (default enabled)

REUSE_ALLOW_INTERNAL_DEPENDENCIES: 3

(value type = int) Allow cuMemAllocAsync to insert new stream dependencies in order to establish the stream ordering required to reuse a piece of memory released by cuMemFreeAsync (default enabled).

RELEASE_THRESHOLD: 4

(value type = cuuint64_t) Amount of reserved memory in bytes to hold onto before trying to release memory back to the OS. When more than the release threshold bytes of memory are held by the memory pool, the allocator will try to release memory back to the OS on the next call to stream, event or context synchronize. (default 0)

RESERVED_MEM_CURRENT: 5

(value type = cuuint64_t) Amount of backing memory currently allocated for the mempool.

RESERVED_MEM_HIGH: 6

(value type = cuuint64_t) High watermark of backing memory allocated for the mempool since the last time it was reset. High watermark can only be reset to zero.

USED_MEM_CURRENT: 7

(value type = cuuint64_t) Amount of memory from the pool that is currently in use by the application.

USED_MEM_HIGH: 8

(value type = cuuint64_t) High watermark of the amount of memory from the pool that was in use by the application since the last time it was reset. High watermark can only be reset to zero.

ALLOCATION_TYPE: 9

(value type = CUmemAllocationType) The allocation type of the mempool

EXPORT_HANDLE_TYPES: 10

(value type = CUmemAllocationHandleType) Available export handle types for the mempool. For imported pools this value is always CU_MEM_HANDLE_TYPE_NONE as an imported pool cannot be re-exported

LOCATION_ID: 11

(value type = int) The location id for the mempool. If the location type for this pool is CU_MEM_LOCATION_TYPE_INVISIBLE then ID will be CU_DEVICE_INVALID.

LOCATION_TYPE: 12

(value type = CUmemLocationType) The location type for the mempool. For imported memory pools where the device is not directly visible to the importing process or pools imported via fabric handles across nodes this will be CU_MEM_LOCATION_TYPE_INVISIBLE.

MAX_POOL_SIZE: 13

(value type = cuuint64_t) Maximum size of the pool in bytes, this value may be higher than what was initially passed to cuMemPoolCreate due to alignment requirements. A value of 0 indicates no maximum size. For CU_MEM_ALLOCATION_TYPE_MANAGED and IPC imported pools this value will be system dependent.

HW_DECOMPRESS_ENABLED: 14

(value type = int) Indicates whether the pool has hardware compresssion enabled

LOCALITY_DOMAIN_ID: 15

(value type = int) The locality domain ID for the mempool, if the mempool is localized to a locality domain. A value of -1 indicates that the mempool is not localized. Note: On devices with a single locality domain, mempools created with CU_MEM_LOCATION_TYPE_DEVICE_LOCALITY_DOMAIN and localityDomainId 0 are equivalent to full-device mempools created with CU_MEM_LOCATION_TYPE_DEVICE. The value of this attribute will be -1 for such mempools.