SWDEV-450580 - Fix powercap set

Updates:
     * CLI - Added AMDSMIHelpers.convert_SI_unit() to help
       conversion of units
     * API - Reverted to uW for power cap limits
     * CLI - amd-smi static --limit now includes MIN_POWER
     * Tests now are all using uW units to keep W conversion
       to only happen in CLI
     * Python API now reflects same units as uW (what is seen
       in amdgpu driver)
     * CLI - amd-smi metric --power:
       Fixed power seen on gpu_metrics v1.3

Change-Id: I32d9ba78d0d8806772f0860f9a803a885b3f316a
Signed-off-by: Charis Poag <Charis.Poag@amd.com>
Bu işleme şunda yer alıyor:
Charis Poag
2024-04-04 10:06:47 -05:00
ebeveyn 051d5a4d42
işleme c24d66740e
9 değiştirilmiş dosya ile 212 ekleme ve 78 silme
-5
Dosyayı Görüntüle
@@ -1208,15 +1208,10 @@ amdsmi_get_power_cap_info(amdsmi_processor_handle processor_handle,
if ((status == AMDSMI_STATUS_SUCCESS) && !set_ret_success)
set_ret_success = true;
// Dividing by 1000000 to get measurement in Watts
(info->default_power_cap) /= 1000000;
status = rsmi_wrapper(rsmi_dev_power_cap_range_get, processor_handle, sensor_ind,
&(info->max_power_cap), &(info->min_power_cap));
// Dividing by 1000000 to get measurement in Watts
(info->max_power_cap) /= 1000000;
(info->min_power_cap) /= 1000000;
if ((status == AMDSMI_STATUS_SUCCESS) && !set_ret_success)
set_ret_success = true;
-2
Dosyayı Görüntüle
@@ -201,8 +201,6 @@ amdsmi_status_t smi_amdgpu_get_power_cap(amd::smi::AMDSmiGPUDevice* device, int
return AMDSMI_STATUS_API_FAILED;
}
// Dividing by 1000000 to get measurement in Watts
*cap /= 1000000;
return AMDSMI_STATUS_SUCCESS;
}