K20Power is a power and energy profiler for GPU code running on K20-based GPUs. It automatically corrects for the slow ramp up and ramp down of the built-in power sensor, adapts to variations in the sampling frequency, records the full power profile, and computes the energy expended by the GPU while running kernel code.
Click on K20power10.cu and nvml.h to download the source code and the needed third-party header file. A description of the K20Power framework and its usage is available here. Note that K20Power is protected by this license and that by obtaining K20Power you agree to the terms and conditions set forth in this license.
The source code can be compiled into an executable called K20Power as follows:
nvcc -O3 -arch=sm_35 K20power.cu -o K20Power -lnvidia-ml
M. Burtscher, I. Zecena, and Z. Zong. "Measuring GPU Power with the K20 Built-in Sensor." Seventh Workshop on General Purpose Processing on Graphics Processing Units. March 2014. [pdf] [pptx] [video]
This work has been supported in part by the National Science Foundation as well as by equipment donations from Nvidia Corporation.