hipmemgetinfo Interface Reference

hipmemgetinfo Interface Reference#

hipFORT API Reference: hipfort::hipmemgetinfo Interface Reference
hipfort::hipmemgetinfo Interface Reference

Query memory info. More...

Public Member Functions

integer(c_int) function hipmemgetinfo_ (free, total)
 
integer(kind(hipsuccess)) function hipmemgetinfo_typed (free, total)
 

Detailed Description

Query memory info.

On ROCM, this function gets the actual free memory left on the current device, so supports the cases while running multi-workload (such as multiple processes, multiple threads, and multiple GPUs).

Warning
On Windows, the free memory only accounts for memory allocated by this process and may be optimistic.
Parameters
[out]free- Returns free memory on the current device in bytes
[out]total- Returns total allocatable memory on the current device in bytes
Returns
hipSuccess, hipErrorInvalidDevice, hipErrorInvalidValue

Member Function/Subroutine Documentation

◆ hipmemgetinfo_()

integer(c_int) function hipfort::hipmemgetinfo::hipmemgetinfo_ ( type(c_ptr), value  free,
type(c_ptr), value  total 
)

◆ hipmemgetinfo_typed()

integer(kind(hipsuccess)) function hipfort::hipmemgetinfo::hipmemgetinfo_typed ( integer(c_size_t), target  free,
integer(c_size_t), target  total 
)

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