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>
Этот коммит содержится в:
Charis Poag committed 2024-05-02 10:13:39 -05:00
1 родитель 051d5a4d42
Коммит c24d66740e
9 files changed
+212 -78

No files matched your search

+7 -6
Просмотреть файл
@@ -522,11 +522,11 @@ typedef struct {
} amdsmi_pcie_info_t;
typedef struct {
uint64_t power_cap;
uint64_t default_power_cap;
uint64_t dpm_cap;
uint64_t min_power_cap;
uint64_t max_power_cap;
uint64_t power_cap; //!< current power cap (uW)
uint64_t default_power_cap; //!< default power cap (uW)
uint64_t dpm_cap; //!< dpm power cap (MHz)
uint64_t min_power_cap; //!< minimum power cap (uW)
uint64_t max_power_cap; //!< maximum power cap (uW)
uint64_t reserved[3];
} amdsmi_power_cap_info_t;
@@ -4615,7 +4615,8 @@ amdsmi_get_gpu_board_info(amdsmi_processor_handle processor_handle, amdsmi_board
/**
* @brief Returns the power caps as currently configured in the
* system. It is not supported on virtual machine guest
* system. Power in units of uW.
* It is not supported on virtual machine guest
*
* @platform{gpu_bm_linux} @platform{host}
*