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... | |
amdsmi_status_t | amdsmi_get_violation_status (amdsmi_processor_handle processor_handle, amdsmi_violation_status_t *info) |
Returns the violations for a processor. 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.
- Platform:
gpu_bm_linux
host
guest_windows
- Parameters
-
[in] processor_handle Device which to query [out] info Reference 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.
- Platform:
gpu_bm_linux
host
- Parameters
-
[in] processor_handle Device which to query [out] info Reference 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.
- Platform:
gpu_bm_linux
host
- Parameters
-
[in] processor_handle PF of a processor for which to query [out] enabled Reference 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.
- Platform:
gpu_bm_linux
host
- Parameters
-
[in] processor_handle Device which to query [in] clk_type Enum representing the clock type to query. [out] info Reference 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.
- Platform:
gpu_bm_linux
guest_1vf
guest_mvf
guest_windows
- Parameters
-
[in] processor_handle Device which to query [out] info Reference to vram information. Must be allocated by user.
- Returns
- amdsmi_status_t | AMDSMI_STATUS_SUCCESS on success, non-zero on fail
◆ amdsmi_get_violation_status()
amdsmi_status_t amdsmi_get_violation_status | ( | amdsmi_processor_handle | processor_handle, |
amdsmi_violation_status_t * | info | ||
) |
Returns the violations for a processor.
Warning: API will be slow due to polling driver for 2 samples. Require a minimum wait of 100ms between the 2 samples in order to calculate. Otherwise users would need to use amdsmi_get_gpu_metrics_info for BM. See that API's struct for calculations.
- Platform:
gpu_bm_linux
host
- Parameters
-
[in] processor_handle Device which to query [out] info Reference to all violation status details available. Must be allocated by user.
- Returns
- amdsmi_status_t | AMDSMI_STATUS_SUCCESS on success, non-zero on fail