Library Initialization#
Library Initialization
Functions | |
amdsmi_status_t | amdsmi_init (uint64_t init_flags) |
Initializes the library and the internal software structures. More... | |
amdsmi_status_t | amdsmi_shut_down (void) |
The library frees all associated with the library on the current process. More... | |
Detailed Description
Function Documentation
◆ amdsmi_init()
amdsmi_status_t amdsmi_init | ( | uint64_t | init_flags | ) |
Initializes the library and the internal software structures.
- Note
- The library will attempt to initialize all AMD GPU devices in the system with virtualization support, but this may fail if the library is called from a user without sufficient privileges. The library will attempt to initialize in privileged mode or initialize in non-privileged mode as a fallback. Privileged mode can modify the driver configuration.
- Parameters
-
[in] init_flags Bit flags that tell AMDSMI how to initialize. Values of amdsmi_init_flags_t enum may be OR'd together and passed through init_flags parameter to modify how AMDSMI initializes.
- Returns
- amdsmi_status_t | AMDSMI_STATUS_SUCCESS on success, non-zero on fail
◆ amdsmi_shut_down()
amdsmi_status_t amdsmi_shut_down | ( | void | ) |
The library frees all associated with the library on the current process.
- Returns
- amdsmi_status_t | AMDSMI_STATUS_SUCCESS on success, non-zero on fail