Changed power parameter in amdsmi_get_energy_count() to energy_accumulator

Issue linked here: https://github.com/ROCm/amdsmi/issues/38

Signed-off-by: gabrpham <Gabriel.Pham@amd.com>
Change-Id: I622236eb3f0144aefeb6c82d2713b4822bfeeb11


[ROCm/amdsmi commit: 95ca2b83a1]
This commit is contained in:
gabrpham
2024-08-29 17:13:21 -05:00
committed by Maisam Arif
parent 0560419474
commit 62d3348c9e
8 changed files with 36 additions and 29 deletions
+3 -4
View File
@@ -2382,14 +2382,13 @@ amdsmi_status_t amdsmi_set_gpu_pci_bandwidth(amdsmi_processor_handle processor_h
* @p power, and a pointer to a uint64_t @p timestamp, this function will write
* amount of energy consumed to the uint64_t pointed to by @p power,
* and the timestamp to the uint64_t pointed to by @p timestamp.
* The amdsmi_get_power_ave() is an average of a short time. This function
* accumulates all energy consumed.
* This function accumulates all energy consumed.
*
* @param[in] processor_handle a processor handle
* @param[in,out] counter_resolution resolution of the counter @p power in
* micro Joules
*
* @param[in,out] power a pointer to uint64_t to which the energy
* @param[in,out] energy_accumulator a pointer to uint64_t to which the energy
* counter will be written
* If this parameter is nullptr, this function will return
* ::AMDSMI_STATUS_INVAL if the function is supported with the provided,
@@ -2402,7 +2401,7 @@ amdsmi_status_t amdsmi_set_gpu_pci_bandwidth(amdsmi_processor_handle processor_h
* @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail
*/
amdsmi_status_t
amdsmi_get_energy_count(amdsmi_processor_handle processor_handle, uint64_t *power,
amdsmi_get_energy_count(amdsmi_processor_handle processor_handle, uint64_t *energy_accumulator,
float *counter_resolution, uint64_t *timestamp);
/** @} End PowerQuer */