hipmempoolgetattribute Interface Reference

hipmempoolgetattribute Interface Reference#

HIPFORT API Reference: hipfort::hipmempoolgetattribute Interface Reference
hipfort::hipmempoolgetattribute Interface Reference

Gets attributes of a memory pool. More...

Public Member Functions

integer(kind(hipsuccess)) function hipmempoolgetattribute_ (mem_pool, attr, myvalue)
 

Detailed Description

Gets attributes of a memory pool.

Supported attributes are:

  • 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)
  • hipMemPoolReuseFollowEventDependencies: (value type = int) Allow 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)
  • hipMemPoolReuseAllowOpportunistic: (value type = int) Allow reuse of already completed frees when there is no dependency between the free and allocation. (default enabled)
  • hipMemPoolReuseAllowInternalDependencies: (value type = int) Allow hipMallocAsync to insert new stream dependencies in order to establish the stream ordering required to reuse a piece of memory released by hipFreeAsync (default enabled).
Parameters
[in]mem_poolThe memory pool to get attributes of
[in]attrThe attribute to get
[in]valueRetrieved value
Returns
hipSuccess, hipErrorInvalidValue
See also
hipMallocFromPoolAsync, hipMallocAsync, hipFreeAsync, hipMemPoolTrimTo, hipDeviceSetMemPool, hipMemPoolSetAttribute, hipMemPoolSetAccess, hipMemPoolGetAccess
Warning
This API is marked as Beta. While this feature is complete, it can change and might have outstanding issues.
Note
This API is implemented on Linux and is under development on Microsoft Windows.

Member Function/Subroutine Documentation

◆ hipmempoolgetattribute_()

integer(kind(hipsuccess)) function hipfort::hipmempoolgetattribute::hipmempoolgetattribute_ ( type(c_ptr), value  mem_pool,
integer(kind(hipmempoolreusefolloweventdependencies)), value  attr,
type(c_ptr), value  myvalue 
)

The documentation for this interface was generated from the following file: