GPU Monitoring

GPU Monitoring#

AMD SMI: GPU Monitoring
GPU Monitoring

Functions

amdsmi_status_t amdsmi_get_gpu_activity (amdsmi_processor_handle processor_handle, amdsmi_engine_usage_t *info)
 Returns the current usage of the GPU engines (GFX, MM and MEM). Each usage is reported as a percentage from 0-100%. It is not supported on virtual machine guest. More...
 
amdsmi_status_t amdsmi_get_power_info (amdsmi_processor_handle processor_handle, amdsmi_power_info_t *info)
 Returns the current power and voltage of the GPU. The voltage is in units of mV and the power in units of W. It is not supported on virtual machine guest. More...
 
amdsmi_status_t amdsmi_is_gpu_power_management_enabled (amdsmi_processor_handle processor_handle, bool *enabled)
 Returns is power management enabled. More...
 
amdsmi_status_t amdsmi_get_clock_info (amdsmi_processor_handle processor_handle, amdsmi_clk_type_t clk_type, amdsmi_clk_info_t *info)
 Returns the measurements of the clocks in the GPU for the GFX and multimedia engines and Memory. This call reports the averages over 1s in MHz. It is not supported on virtual machine guest. More...
 
amdsmi_status_t amdsmi_get_gpu_vram_usage (amdsmi_processor_handle processor_handle, amdsmi_vram_usage_t *info)
 Returns the VRAM usage (both total and used memory) in MegaBytes. More...
 

Detailed Description

Function Documentation

◆ amdsmi_get_gpu_activity()

amdsmi_status_t amdsmi_get_gpu_activity ( amdsmi_processor_handle  processor_handle,
amdsmi_engine_usage_t info 
)

Returns the current usage of the GPU engines (GFX, MM and MEM). Each usage is reported as a percentage from 0-100%. It is not supported on virtual machine guest.

Parameters
[in]processor_handleDevice which to query
[out]infoReference to the gpu engine usage structure. Must be allocated by user.
Returns
amdsmi_status_t | AMDSMI_STATUS_SUCCESS on success, non-zero on fail

◆ amdsmi_get_power_info()

amdsmi_status_t amdsmi_get_power_info ( amdsmi_processor_handle  processor_handle,
amdsmi_power_info_t info 
)

Returns the current power and voltage of the GPU. The voltage is in units of mV and the power in units of W. It is not supported on virtual machine guest.

Parameters
[in]processor_handleDevice which to query
[out]infoReference to the gpu power structure. Must be allocated by user.
Returns
amdsmi_status_t | AMDSMI_STATUS_SUCCESS on success, non-zero on fail

◆ amdsmi_is_gpu_power_management_enabled()

amdsmi_status_t amdsmi_is_gpu_power_management_enabled ( amdsmi_processor_handle  processor_handle,
bool *  enabled 
)

Returns is power management enabled.

Parameters
[in]processor_handlePF of a processor for which to query
[out]statusReference to bool. Must be allocated by user.
Returns
amdsmi_status_t | AMDSMI_STATUS_SUCCESS on success, non-zero on fail

◆ amdsmi_get_clock_info()

amdsmi_status_t amdsmi_get_clock_info ( amdsmi_processor_handle  processor_handle,
amdsmi_clk_type_t  clk_type,
amdsmi_clk_info_t info 
)

Returns the measurements of the clocks in the GPU for the GFX and multimedia engines and Memory. This call reports the averages over 1s in MHz. It is not supported on virtual machine guest.

Parameters
[in]processor_handleDevice which to query
[in]clk_typeEnum representing the clock type to query.
[out]infoReference to the gpu clock structure. Must be allocated by user.
Returns
amdsmi_status_t | AMDSMI_STATUS_SUCCESS on success, non-zero on fail

◆ amdsmi_get_gpu_vram_usage()

amdsmi_status_t amdsmi_get_gpu_vram_usage ( amdsmi_processor_handle  processor_handle,
amdsmi_vram_usage_t info 
)

Returns the VRAM usage (both total and used memory) in MegaBytes.

Parameters
[in]processor_handleDevice which to query
[out]infoReference to vram information. Must be allocated by user.
Returns
amdsmi_status_t | AMDSMI_STATUS_SUCCESS on success, non-zero on fail