Intel® Graphics Performance Analyzers (Intel® GPA)
Improve your game's performance by quickly specifying problem areas

How to get GPU power in Watt ?

euleramon
Novice
479 Views

Recently I've been studying how to get the GPU power consumption in Watt. Also, I used the System Analyzer of GPA tool kits to monitor GPU info. However, from the System Analyzer tool, I couldn't find any metrics relevant to GPU power consumption, like watt, voltage or current.

My goal is to write a program by some Intel API to monitor Intel GPU power (in Watt), like GPU-Z does.

Could someone give me some clues or roadmap to achieve that ? 
Thanks !

0 Kudos
1 Solution
sentientSpark_Intel
375 Views

You're welcome euleramon. I hope you might find some use from those tools.

As for Intel Power Gadget, I am not positive on the specifics, as it was suggested to me to share as a power consumption monitoring tool, but it seems to me that you are correct that it is a CPU power consumption monitoring tool, and if so my apologies. 

 

Sounds good, thank you for sharing your use case - I see that you would like to monitor power consumption when running Furmark®. I am not positive on the specifics of how GPU-Z® is obtaining the GPU power consumption information, but after consulting with a team here at Intel I can provide some links about the Intel Graphics Control Library here that may provide more insight, and will get back to you at a later day if I recieve any more specific information to support your use case.

 

The Intel Graphics Control Library

This provides Performance & Telemetry API's. Some of these include Engine/Fan/Telemetry/Frequency/Memory/Overclock/PCI/Power/Temperature information. This may help you in your use case.

 

https://github.com/intel/drivers.gpu.control-library

https://intel.github.io/drivers.gpu.control-library/ -> docs

 

Some code samples:https://github.com/intel/drivers.gpu.control-library/blob/master/Samples/Telemetry_Samples/Sample_TelemetryAPP.cpp

https://github.com/intel/drivers.gpu.control-library/blob/master/Samples/Power_Feature_Samples/PowerFeature_Sample_App.cpp

  • Contains this function: ctl_result_t ctlPowerGetEnergyCounter(ctl_pwr_handle_t hPower, ctl_power_energy_counter_t *pEnergy)
  • The parameters for this function are:
  1. pEnergy – [in,out] Will contain the latest snapshot of the energy counter and timestamp when the last counter value was measured.
  2. struct ctl_power_energy_counter_t - Energy counter snapshot.
    • How this energy counter snapshot is calculated:
    • Average power is calculated by taking two snapshots (s1, s2) and using the equation: PowerWatts = (s2.energy - s1.energy) / (s2.timestamp - s1.timestamp). In this equation, the variables are:
    • uint64_t energy - [out] The monotonic energy counter in microjoules.
    • uint64_t timestamp - [out] Microsecond timestamp when energy was captured. This timestamp should only be used to calculate delta time between snapshots of this structure. Never take the delta of this timestamp with the timestamp from a different structure since they are not guaranteed to have the same base. The absolute value of the timestamp is only valid during within the application and may be different on the next execution.

 

Sources:

https://intel.github.io/drivers.gpu.control-library/Control/api.html#ctlpowergetenergycounter

https://intel.github.io/drivers.gpu.control-library/Control/api.html#_CPPv426ctl_power_energy_counter_t

 

 

As for specific GPU power consumption measurements, for Intel Arc GPU’s, Arc Control can monitor voltage and power, though it may be only good for live monitoring without any logging functionality

You could also look into using HWiNFO - it's publicly available, can monitor power and core voltage on GPUs, and log to a *.csv

View solution in original post

0 Kudos
5 Replies
sentientSpark_Intel
442 Views

Hi Euleramon,

 

Thank you for your post!

Unfortunately we don't have any GPU power consumption metrics available in the Intel Graphics Performance Analyzer tool suite.

If you could provide more details about what you are trying to measure, that could help us better direct you to a tool that may be able to provide the metrics you are looking for.

Are the workloads you are running graphics applications, or compute applications? 

And are you hoping to measure power usage per draw call, power used per frame, or just trying to sample it from time to time?

 

The new Intel presentmon overlay has GPU Power stats that might be worth a try:

 https://game.intel.com/us/intel-presentmon/

 

And if you are interested specifically in measuring iGPU power consumption, there are some tools I can suggest that could potentially provide the metrics you are looking for. I haven't tried them myself but thought I'd share them just in case they work for you.

Intel Power Gadget, though discontinued, may serve your needs
https://www.intel.com/content/www/us/en/developer/articles/tool/power-gadget.html
https://www.intel.com/content/www/us/en/developer/articles/training/using-the-intel-power-gadget-30-api-on-windows.html

There is also the Thermal Analysis Tool
https://designintools.intel.com/intel-thermal-analysis-tool.html
https://www.techpowerup.com/download/intel-thermal-analysis-tool/

As well as Intel VTune

https://www.intel.com/content/www/us/en/docs/vtune-profiler/user-guide/2023-0/energy-analysis.html

Intel VTune's Community Forum

0 Kudos
euleramon
Novice
415 Views

Hi SentientSpark,

Thank you for the reply.

Actually I'm improving our diagnostic tool which can help to find the possible defect on any of our poorly designed PC with Intel(R) integrated GPU Graphics. We found that running Furmark(R) was able to crash the faulty PC which implies suspicious defect. Also, running Furmark(R) would raise the GPU power a lot by using GPU-Z(R) to observe the info. So, I'm wondering how GPU-Z can monitor the GPU power consumption. I thought Intel has provided the relevant sdk for retrieving the info.

euleramon_0-1719544928854.png


About Intel Power Gadget, as far as I know, it can be used to monitor CPU's power rather than GPU. Is it correct ?

I haven't studied the Thermal Analysis Tool. So, I will give it a try.

I appreciate your good news. Please also guide me the correct way to get GPU power consumption.

Thanks a lot !! 

0 Kudos
sentientSpark_Intel
376 Views

You're welcome euleramon. I hope you might find some use from those tools.

As for Intel Power Gadget, I am not positive on the specifics, as it was suggested to me to share as a power consumption monitoring tool, but it seems to me that you are correct that it is a CPU power consumption monitoring tool, and if so my apologies. 

 

Sounds good, thank you for sharing your use case - I see that you would like to monitor power consumption when running Furmark®. I am not positive on the specifics of how GPU-Z® is obtaining the GPU power consumption information, but after consulting with a team here at Intel I can provide some links about the Intel Graphics Control Library here that may provide more insight, and will get back to you at a later day if I recieve any more specific information to support your use case.

 

The Intel Graphics Control Library

This provides Performance & Telemetry API's. Some of these include Engine/Fan/Telemetry/Frequency/Memory/Overclock/PCI/Power/Temperature information. This may help you in your use case.

 

https://github.com/intel/drivers.gpu.control-library

https://intel.github.io/drivers.gpu.control-library/ -> docs

 

Some code samples:https://github.com/intel/drivers.gpu.control-library/blob/master/Samples/Telemetry_Samples/Sample_TelemetryAPP.cpp

https://github.com/intel/drivers.gpu.control-library/blob/master/Samples/Power_Feature_Samples/PowerFeature_Sample_App.cpp

  • Contains this function: ctl_result_t ctlPowerGetEnergyCounter(ctl_pwr_handle_t hPower, ctl_power_energy_counter_t *pEnergy)
  • The parameters for this function are:
  1. pEnergy – [in,out] Will contain the latest snapshot of the energy counter and timestamp when the last counter value was measured.
  2. struct ctl_power_energy_counter_t - Energy counter snapshot.
    • How this energy counter snapshot is calculated:
    • Average power is calculated by taking two snapshots (s1, s2) and using the equation: PowerWatts = (s2.energy - s1.energy) / (s2.timestamp - s1.timestamp). In this equation, the variables are:
    • uint64_t energy - [out] The monotonic energy counter in microjoules.
    • uint64_t timestamp - [out] Microsecond timestamp when energy was captured. This timestamp should only be used to calculate delta time between snapshots of this structure. Never take the delta of this timestamp with the timestamp from a different structure since they are not guaranteed to have the same base. The absolute value of the timestamp is only valid during within the application and may be different on the next execution.

 

Sources:

https://intel.github.io/drivers.gpu.control-library/Control/api.html#ctlpowergetenergycounter

https://intel.github.io/drivers.gpu.control-library/Control/api.html#_CPPv426ctl_power_energy_counter_t

 

 

As for specific GPU power consumption measurements, for Intel Arc GPU’s, Arc Control can monitor voltage and power, though it may be only good for live monitoring without any logging functionality

You could also look into using HWiNFO - it's publicly available, can monitor power and core voltage on GPUs, and log to a *.csv

0 Kudos
euleramon
Novice
294 Views

Hi SentientSpark,

Thank you for the abundant resources with detailed information. 
I believe they would be useful. It will take me some time to study.

Let me mark your answer as solution.
I will post any new question if needed.
Thanks for your help !

sentientSpark_Intel
233 Views

Sounds great, let me know if you have any further questions. And if I hear any more specific information to support your use case from the team I've consulted I'll will post it here.

Your welcome, and thanks for your post!

0 Kudos
Reply