fix: [rocm/amd_smi_lib] amdsmi_get_gpu_activity gfx/memory activity does not update

Checks and forces rereading gpu metrics unconditionally

Code changes related to the following:
  * Device::dev_log_gpu_metrics()
  * amdsmi_get_gpu_metrics_header_info()
    Removed unintentionally during work on 'header cleanup Remove non-unified headers'
  * Examples
  * Unit tests

Change-Id: I83710e173c0f7102d0b7f865c18474c979a95cd8
Signed-off-by: Oliveira, Daniel <daniel.oliveira@amd.com>


[ROCm/amdsmi commit: 78074d7d77]
このコミットが含まれているのは:
Oliveira, Daniel authored and Maisam Arif committed 2024-02-13 10:15:17 -06:00
1 親 b6f62bb651
コミット e9e246f23d
6ファイル変更
+334 -113

検索条件に一致するファイルはありません

+11
ファイルの表示
@@ -1108,6 +1108,17 @@ amdsmi_status_t amdsmi_get_gpu_ecc_status(amdsmi_processor_handle processor_han
reinterpret_cast<rsmi_ras_err_state_t*>(state));
}
amdsmi_status_t
amdsmi_get_gpu_metrics_header_info(amdsmi_processor_handle processor_handle,
amd_metrics_table_header_t *header_value)
{
AMDSMI_CHECK_INIT();
// nullptr api supported
return rsmi_wrapper(rsmi_dev_metrics_header_info_get, processor_handle,
reinterpret_cast<metrics_table_header_t*>(header_value));
}
amdsmi_status_t amdsmi_get_gpu_metrics_info(
amdsmi_processor_handle processor_handle,
amdsmi_gpu_metrics_t *pgpu_metrics) {