# Agnostic Energy Consumption Models for Heterogeneous GPUs in Cloud Computing
## 3 Power and Energy Models
### Input Selection  
The first GPU power models' inputs mainly rely upon hardware performance counters to evaluate them with other input criteria. Selecting appropriate model inputs can increase the model's accuracy. Each generation of GPU architecture has a different number of hardware performance counters than others. The nvprof tool can profile 98 \begin{table}
\begin{tabular}{c c c} \hline \hline
**Application** & **Source** & **Description** & **Size** \\ \hline Heartwall & Rodinia & Ultrasound image for heart wall tracking & 656 \(\times\) 744 frame \\ \hline Kmeans & Rodinia & Clustering algorithm & 494,020 objects and \\  & & 34 features \\ \hline Gaussian & Rodinia & Gaussian elimination technique for solving equations & 1024 \(\times\) 1024 \\ \hline Leukocyte & Rodinia & Microscopy tracking of white blood cells & 640 \(\times\) 480 frames \\  & & Needleman–Wunsch method for optimized & 6400 \(\times\) 6400 \\  & & DNA alignment & 4096 \(\times\) 4096 \\ \hline Hotspot & Rodinia & Simulation For estimating a processor temperature & 4096 \(\times\) 4096 \\ \hline Dwt2d & Rodinia & Two-dimensional discrete wavelet transform algorithm & 3900 \(\times\) 4200 pixels \\ \hline CFD & Rodinia & Computational fluid dynamic solver & 97,000 elements \\ \hline AlignedTypes & Cuda SDK & Memory aligned access implementation type & 49,999,872 bytes \\ \hline Binomial Options & Cuda SDK & The European pricing options between seller and buyer & 1024 options \\ \hline BlackScholes & Cuda SDK & The European pricing options using the & 8,000,000 options and \\  & & Black–Scholes model & 512 iterations \\ \hline Dxtc & Cuda SDK & DirectX texture compression algorithm & 512 \(\times\) 512 pixels \\ \hline ConvolutionSeparable & Cuda SDK & Convolution technique for image filtrations & 3072 \(\times\) 3072 pixels \\ \hline Histogram & Cuda SDK & Analysis tool for applications & 64 and 256 bins \\ \hline Transpose & Cuda SDK & Matrix transpose implementation & 1024 \(\times\) 1024 \\ \hline FDTD3d & Cuda SDK & Three-dimensional finite difference time domain model & 376 \(\times\) 376 \(\times\) 376 \\ \hline MergeSort & Cuda SDK & Merge sort implementation & 4,194,304 elements \\ \hline RadixSortThrust & Cuda SDK & Parallel radix sort implementation & 1,048,576 elements \\ \hline GuasirandomGenerator & Cuda SDK & Niederreiter quasirandom sequence implementation & 31,148,576 elements \\ \hline \hline \end{tabular}
\end{table} 
Table 1: _Cont._ \begin{table}
\begin{tabular}{c c c} \hline \hline
**Application** & **Source** & **Size** \\ \hline ConvolutionTexture & Cuda SDK & 3072 \(\times\) 1536 Pixels \\ \hline FastWalshTransform & Cuda SDK & 8,388,608 data length \\ \hline MontCarlo & Cuda SDK & 8192 options and 262,144 paths \\ \hline Nbody & Cuda SDK & 16,640 bodies \\ \hline Cutcp & Parboil & 96,603 atoms \\ \hline Histo & Parboil & 256 \(\times\) 8192 \\ \hline Mari-q & Parboil & 64 \(\times\) 64 \(\times\) 64 \\ \hline Bfs & Rodinia & 1,000,000 nodes \\ \hline Streamcluster & Rodinia & 65,536 points \\ \hline Srad\_2 & Rodinia & 8192 \(\times\) 8192 data points \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Testing set characteristics in the power model. and 111 performance metrics in the Fermi C2075 and Kepler K40c GPUs (Taiwan Semiconductor Manufacturing Company (TSMC), Hsinchu, Taiwan) [32]. Using all existing performance counters to feed the model can increase the model's accuracy. However, considering all existing performance counters as model inputs will increase the model's training complexity and the cost of data collection because of the overhead incurred by the usage of the profiling tools. Therefore, we develop the candidacy algorithm to find the performance counters that have a reasonable impact on power consumption in each GPU (Fermi and Kepler), as shown in Algorithm 1. It is difficult to statistically compute the significance between each performance counter and power consumption differing from zero in two different GPUs because of the large number of performance counters in each GPU.