Power Queries

Power Queries#

AMD SMI: Power Queries
Power Queries

Functions

amdsmi_status_t amdsmi_get_energy_count (amdsmi_processor_handle processor_handle, uint64_t *energy_accumulator, float *counter_resolution, uint64_t *timestamp)
 Get the energy accumulator counter of the processor with provided processor handle. It is not supported on virtual machine guest. More...
 

Detailed Description

These functions provide information about power usage.

Function Documentation

◆ amdsmi_get_energy_count()

amdsmi_status_t amdsmi_get_energy_count ( amdsmi_processor_handle  processor_handle,
uint64_t *  energy_accumulator,
float *  counter_resolution,
uint64_t *  timestamp 
)

Get the energy accumulator counter of the processor with provided processor handle. It is not supported on virtual machine guest.

Platform:
gpu_bm_linux

Given a processor handle processor_handle, a pointer to a uint64_t energy_accumulator, and a pointer to a uint64_t timestamp, this function will write amount of energy consumed to the uint64_t pointed to by energy_accumulator, and the timestamp to the uint64_t pointed to by timestamp. This function accumulates all energy consumed.

Parameters
[in]processor_handlea processor handle
[in,out]energy_accumulatora 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, and AMDSMI_STATUS_NOT_SUPPORTED if it is not supported with the provided arguments.
[in,out]counter_resolutionresolution of the counter energy_accumulator in micro Joules
[in,out]timestampa pointer to uint64_t to which the timestamp will be written. Resolution: 1 ns.
Returns
amdsmi_status_t | AMDSMI_STATUS_SUCCESS on success, non-zero on fail