Initialization and Shutdown#
Functions | |
| amdsmi_status_t | amdsmi_init (uint64_t init_flags) |
| Initialize the AMD SMI library. | |
| amdsmi_status_t | amdsmi_shut_down (void) |
| Shutdown the AMD SMI library. | |
Detailed Description
Function Documentation
◆ amdsmi_init()
| amdsmi_status_t amdsmi_init | ( | uint64_t | init_flags | ) |
Initialize the AMD SMI library.
- Platform:
gpu_bm_linux
host
cpu_bm
guest_1vf
guest_mvf
guest_windows
This function initializes the library and the internal data structures, including those corresponding to sources of information that SMI provides. Singleton Design, requires the same number of inits as shutdowns.
The init_flags decides which type of processor can be discovered by amdsmi_get_socket_handles(). AMDSMI_INIT_AMD_GPUS returns sockets with AMD GPUS, and AMDSMI_INIT_AMD_GPUS | AMDSMI_INIT_AMD_CPUS returns sockets with either AMD GPUS or CPUS. Currently, only AMDSMI_INIT_AMD_GPUS is supported.
- Parameters
-
[in] init_flags Bit flags that tell SMI how to initialze. Values of amdsmi_init_flags_t may be OR'd together and passed through init_flagsto 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 | ) |
Shutdown the AMD SMI library.
- Platform:
gpu_bm_linux
host
cpu_bm
guest_1vf
guest_mvf
guest_windows
This function shuts down the library and internal data structures and performs any necessary clean ups. Singleton Design, requires the same number of inits as shutdowns.
- Returns
- amdsmi_status_t | AMDSMI_STATUS_SUCCESS on success, non-zero on fail