gem5 v24.0.0.0
Loading...
Searching...
No Matches
Initialization and Shut Down

Functions

hsa_status_t HSA_API hsa_init ()
 Initialize the HSA runtime.
 
hsa_status_t HSA_API hsa_shut_down ()
 Shut down the HSA runtime.
 

Detailed Description

Function Documentation

◆ hsa_init()

hsa_status_t HSA_API hsa_init ( )

Initialize the HSA runtime.

Initializes the HSA runtime if it is not already initialized, and increases the reference counter associated with the HSA runtime for the current process. Invocation of any HSA function other than hsa_init results in undefined behavior if the current HSA runtime reference counter is less than one.

Return values
HSA_STATUS_SUCCESSThe function has been executed successfully.
HSA_STATUS_ERROR_OUT_OF_RESOURCESThe HSA runtime failed to allocate the required resources.
HSA_STATUS_ERROR_REFCOUNT_OVERFLOWThe HSA runtime reference count reaches INT32_MAX.

◆ hsa_shut_down()

hsa_status_t HSA_API hsa_shut_down ( )

Shut down the HSA runtime.

Decreases the reference count of the HSA runtime instance. When the reference count reaches 0, the HSA runtime is no longer considered valid but the application might call hsa_init to initialize the HSA runtime again.

Once the reference count of the HSA runtime reaches 0, all the resources associated with it (queues, signals, agent information, etc.) are considered invalid and any attempt to reference them in subsequent API calls results in undefined behavior. When the reference count reaches 0, the HSA runtime may release resources associated with it.

Return values
HSA_STATUS_SUCCESSThe function has been executed successfully.
HSA_STATUS_ERROR_NOT_INITIALIZEDThe HSA runtime has not been initialized.

Generated on Tue Jun 18 2024 16:24:08 for gem5 by doxygen 1.11.0