pub unsafe extern "C" fn hipMemPoolSetAttribute(
mem_pool: hipMemPool_t,
attr: hipMemPoolAttr,
value: *mut c_void,
) -> hipError_t
Expand description
@brief Sets attributes of a memory pool
Supported attributes are:
- @p hipMemPoolAttrReleaseThreshold: (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)
- @p hipMemPoolReuseFollowEventDependencies: (value type = int) Allow @p hipMallocAsync to use memory asynchronously freed in another stream as long as a stream ordering dependency of the allocating stream on the free action exists. HIP events and null stream interactions can create the required stream ordered dependencies. (default enabled)
- @p hipMemPoolReuseAllowOpportunistic: (value type = int) Allow reuse of already completed frees when there is no dependency between the free and allocation. (default enabled)
- @p hipMemPoolReuseAllowInternalDependencies: (value type = int) Allow @p hipMallocAsync to insert new stream dependencies in order to establish the stream ordering required to reuse a piece of memory released by @p hipFreeAsync (default enabled).
@param [in] mem_pool The memory pool to modify @param [in] attr The attribute to modify @param [in] value Pointer to the value to assign
@returns #hipSuccess, #hipErrorInvalidValue
@see hipMallocFromPoolAsync, hipMallocAsync, hipFreeAsync, hipMemPoolGetAttribute, hipMemPoolTrimTo, hipDeviceSetMemPool, hipMemPoolSetAccess, hipMemPoolGetAccess
@warning : This API is marked as beta, meaning, while this is feature complete, it is still open to changes and may have outstanding issues.
@note This API is implemented on Linux, under development on Windows.