Going green: optimizing GPUs for energy efficiency through model-steered auto-tuning

Richard Schoonhoven, Bram Veenboer, Ben van Werkhoven, Kees Joost Batenburg

Abstract: Graphics Processing Units (GPUs) have revolutionized the computing landscape over the past decade. However, the growing energy demands of data centres and computing facilities equipped with GPUs come with significant capital and environmental costs. The energy consumption of GPU applications greatly depend on how well they are optimized. Auto-tuning is an effective and commonly applied technique of finding the optimal combination of algorithm, application, and hardware parameters to optimize performance of a GPU application. In this paper, we introduce new energy monitoring and optimization capabilities in Kernel Tuner, a generic auto-tuning tool for GPU applications. These capabilities enable us to investigate the difference between tuning for execution time and various approaches to improve energy efficiency, and investigate the differences in tuning difficulty. Additionally, our model for GPU power consumption greatly reduces the large tuning search space by providing clock frequencies for which a GPU is likely most energy efficient.

Introduction

In the world of High-Performance Computing (HPC) and AI, "performance" has traditionally meant one thing: execution time. However, as data centers consume massive amounts of electricity—the Summit supercomputer’s GPUs alone draw over 8 megawatts—the environmental and financial costs are becoming unsustainable.

The common wisdom is "race-to-idle": finish the task as fast as possible so the hardware can return to a low-power state. But this paper challenges that assumption. The authors address a critical gap: most existing GPU auto-tuners (tools that automatically find the best code settings) don't have built-in support for energy optimization. They set out to determine if tuning for energy is fundamentally different from tuning for speed and how to make that tuning process efficient enough for real-world use.

Methodology

The authors extended Kernel Tuner, a generic auto-tuning framework, with new "observers" that interface with hardware sensors (like NVIDIA’s NVML and the external PowerSensor2).

The architecture of the extended Kernel Tuner framework, highlighting the integration of energy-monitoring observers and backends.

The core innovation is a model-steered frequency tuning approach. Instead of blindly testing every possible combination of code parameters and clock speeds, they developed a mathematical model for GPU power consumption: $P_{load} \approx P_{idle} + \alpha \cdot f \cdot v^2$, where $f$ is frequency and $v$ is voltage. They specifically looked for the "ridge point": the frequency threshold below which voltage remains constant, but above which voltage (and thus power) increases quadratically. By identifying this point using just a few sample measurements, the tuner can ignore inefficient high-frequency ranges and focus on the most promising "green" configurations.

Experimental Setup

The researchers evaluated their approach using a diverse set of NVIDIA GPUs, including the RTX A4000, RTX A6000, Tesla A100, Tesla V100, and Titan RTX. The benchmarks included a highly tunable General Matrix Multiplication (GEMM) kernel and six computationally heavy kernels from the LOFAR (Low Frequency Array) radio telescope project, such as "gridders" and "correlators" used in astronomical imaging.

Key Insights and Results

The study's primary "aha moment" is that the fastest configuration is almost never the most energy-efficient. On a Tesla A100, the most efficient setting was 50.9% better than the "race-to-idle" approach, despite being 27.5% slower.

Compute performance vs. energy efficiency for GEMM on a Tesla A100. The red line indicates the Pareto front, showing the optimal trade-offs between speed and efficiency across different core frequencies.
  • Search Space Reduction: The model-steered approach reduced the auto-tuning search space by 77.8% to 82.4%, making it feasible to find green configurations in hours rather than days.
  • Massive Efficiency Gains: Across the radio astronomy kernels, they saw a mean energy efficiency gain of 42.0%. These gains came at a mean compute performance loss of 24.3%, which is often an acceptable trade-off for background processing tasks.
  • Frequency vs. Power Capping: The paper shows that manually fixing clock frequencies provides more predictable and often more efficient results than simply setting a "power limit" (power capping), which can cause the GPU to throttle unpredictably.

Limitations and Future Work

The current power model is relatively simple and does not yet account for memory-intensive kernels or temperature-dependent power leakage. Furthermore, many of the tuning features (like changing clock frequencies) require root privileges on Linux, which may not be available to all users in shared clusters. Future work aims to expand the model to include more hardware parameters and investigate how these "green" settings affect long-term hardware reliability.

Summary updated

BibTeX
@inproceedings{schoonhoven2022going,
  author = {Richard Schoonhoven and Bram Veenboer and Ben van Werkhoven and Kees Joost Batenburg},
  title = {{Going green: optimizing GPUs for energy efficiency through model-steered auto-tuning}},
  booktitle = {PMBS@SC},
  year = {2022},
  url = {https://openreview.net/forum?id=beizXQ22DQ},
}
Figure