gem5
v20.1.0.0
|
Functions | |
hsa_status_t HSA_API | hsa_init () |
Initialize the HSA runtime. More... | |
hsa_status_t HSA_API | hsa_shut_down () |
Shut down the HSA runtime. More... | |
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.
HSA_STATUS_SUCCESS | The function has been executed successfully. |
HSA_STATUS_ERROR_OUT_OF_RESOURCES | The HSA runtime failed to allocate the required resources. |
HSA_STATUS_ERROR_REFCOUNT_OVERFLOW | The HSA runtime reference count reaches INT32_MAX. |
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.
HSA_STATUS_SUCCESS | The function has been executed successfully. |
HSA_STATUS_ERROR_NOT_INITIALIZED | The HSA runtime has not been initialized. |