Add amdsmi_get_gpu_busy_percent

This is required for GPU busy percent in RDC

Change-Id: Idf2ab72993ecc8227958e6eb47f36fc68c93759f
Signed-off-by: Galantsev, Dmitrii <dmitrii.galantsev@amd.com>


[ROCm/amdsmi commit: 955ceac78a]
This commit is contained in:
Galantsev, Dmitrii
2025-04-10 20:39:06 +00:00
committed by Arif, Maisam
parent 7653d44090
commit b1ec78b54b
6 changed files with 87 additions and 3 deletions
+19
View File
@@ -3737,6 +3737,25 @@ amdsmi_status_t amdsmi_set_gpu_fan_speed(amdsmi_processor_handle processor_handl
* @{
*/
/**
* @brief Get GPU busy percent from gpu_busy_percent sysfs file
*
* @ingroup tagClkPowerPerfQuery
*
* @platform{gpu_bm_linux}
*
* @details Given a processor handle @p processor_handle, this function returns GPU busy
* percentage.
*
* @param[in] processor_handle a processor handle
*
* @param[in,out] gpu_busy_percent Direct output from the gpu_busy_percent sysfs file
*
* @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail
*/
amdsmi_status_t amdsmi_get_gpu_busy_percent(amdsmi_processor_handle processor_handle,
uint32_t *gpu_busy_percent);
/**
* @brief Get coarse grain utilization counter of the specified device
*