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(kind(hipsuccess)) function hipmemgetinfo_ (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(kind(hipsuccess)) function hipfort::hipmemgetinfo::hipmemgetinfo_ ( integer(c_size_t)  free,
integer(c_size_t)  total 
)

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