Initialization and Shutdown

Initialization and Shutdown#

AMD SMI: Initialization and Shutdown
Initialization and Shutdown

Functions

amdsmi_status_t amdsmi_init (uint64_t init_flags)
 Initialize the AMD SMI library. More...
 
amdsmi_status_t amdsmi_shut_down (void)
 Shutdown the AMD SMI library. More...
 

Detailed Description

These functions are used for initialization of AMD SMI and clean up when done.

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.

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_flagsBit flags that tell SMI how to initialze. Values of amdsmi_init_flags_t may be OR'd together and passed through init_flags 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  )

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.

Returns
amdsmi_status_t | AMDSMI_STATUS_SUCCESS on success, non-zero on fail