CUDA-enabled GPU Energy Measurement Controller. More...
#include <MeterPU.h>
Classes | |
struct | NVML_Energy_Device_Init |
class | Sampling_Thread_Controller |
Sampling Thread Controller. More... | |
Public Member Functions | |
void | init () |
Initialize a GPU device. More... | |
void | start () |
mark the start of a measurement phase/period. More... | |
void | stop () |
mark the end of a measurement phase/period. More... | |
void | calc () |
calculate the metric value between start() and stop(). More... | |
NVML_Energy::Energy_Unit | get_value () const |
Get calculated metric value, require calc() to be called already. More... | |
void | show_meter_reading () const |
Print the calculated metric value to standard output, requires an invocation of calc() already done. More... | |
Private Member Functions | |
DECLARE_CLASS_NAME ("NVML_Energy_Measurement_Controller") | |
const CPU_Time::Time_Unit & | get_start_time () const |
const CPU_Time::Time_Unit & | get_stop_time () const |
void | record_start_time () |
void | record_stop_time () |
CPU_Time::ResultType | diff () |
void | resetDir () |
void | dumpTimeEvent () |
template<class T1 , class T2 > | |
void | dumpTwoVectors (const std::string &filename, const std::string &header, const T1 &keys, const T2 &values) const |
void | dumpOriginalPowerData () const |
void | dumpCorrectedPowerData () |
void | removeRedundantSamplesByDistance (const CPU_Time::ResultType &time_distance_ms) |
void | correctPowerSamplesByBurtscherApproach () |
void | fillPowerValuesAtStartAndEnd () |
NVML_Energy::Energy_Unit | calTotalArea () |
NVML_Energy::Energy_Unit | calTotalArea (NVML_Energy<>::Hp_Power_DB_Type const &power_db, NVML_Energy<>::Time_DB_Type const &time_db) |
NVML_Energy::Energy_Unit | calAreaForOneTrapezoid (NVML_Energy<>::Time_Unit start_time, NVML_Energy<>::Time_Unit end_time, NVML_Energy<>::Hp_Power_Unit start_power, NVML_Energy<>::Hp_Power_Unit end_power) |
CUDA-enabled GPU Energy Measurement Controller.
It internally use NVML nvmlDeviceGetPowerUsage(), note that not all CUDA-enabled GPU support this functionality, please check your GPU specification.
To calculate the energy value based on power samples obtained by NVML, it implement the techniques described in the following paper:
[1] Martin Burtscher, Ivan Zecena, and Ziliang Zong. 2014. Measuring GPU Power with the K20 Built-in Sensor. In Proceedings of Workshop on General Purpose Processing Using GPUs (GPGPU-7). ACM, New York, NY, USA, Pages 28 , 9 pages. DOI=10.1145/2576779.2576783 http://doi.acm.org/10.1145/2576779.2576783
|
inlineprivate |
|
inlinevirtual |
calculate the metric value between start() and stop().
Implements MeterPU::Measurement_Controller.
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
private |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
inline |
Get calculated metric value, require calc() to be called already.
|
inline |
Initialize a GPU device.
This function make if possible to initialize different CUDA GPUs if many exists.
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
inlinevirtual |
Print the calculated metric value to standard output, requires an invocation of calc() already done.
Implements MeterPU::Measurement_Controller.
|
inlinevirtual |
mark the start of a measurement phase/period.
Implements MeterPU::Measurement_Controller.
|
inlinevirtual |
mark the end of a measurement phase/period.
Implements MeterPU::Measurement_Controller.
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |