DSO: A GPU Energy Efficiency Optimizer by Fusing Dynamic and Static Information

Qiang Wang, Laiyi Li, Weile Luo, Yijia Zhang, Bingqiang WangIwqos 2024

Abstract

Increased reliance on graphics processing units (GPUs) for high-intensity computing tasks raises challenges regarding energy consumption. To address this issue, dynamic voltage and frequency scaling (DVFS) has emerged as a promising technique for conserving energy while maintaining the quality of service (QoS) of GPU applications. However, existing solutions using DVFS are hindered by inefficiency or inaccuracy as they depend either on dynamic or static information respectively, which prevents them from being adopted to practical power management schemes. To this end, we propose a novel energy efficiency optimizer, called DSO, to explore a light weight solution that leverages both dynamic and static information to model and optimize the GPU energy efficiency. DSO firstly proposes a novel theoretical energy efficiency model which reflects the DVFS roofline phenomenon and considers the tradeoff between performance and energy. Then it applies machine learning techniques to predict the parameters of the above model with both GPU kernel runtime metrics and static code features. Experiments on modern DVFS-enabled GPUs indicate that DSO can enhance energy efficiency by 19% whilst maintaining performance within a 5% loss margin.

1. Introduction

The rapid growth of high-intensity computing, particularly in large-scale AI training, has led to significant GPU energy consumption. For instance, training a model like GPT-3 can consume as much electricity as 120 average households use in a year. While Dynamic Voltage and Frequency Scaling (DVFS) offers a way to balance performance and energy savings by trading a small amount of speed for significant power reduction, finding the optimal "sweet spot" is challenging. Existing methods typically rely on either slow dynamic profiling (e.g., nvprof), which is too expensive for production, or inaccurate static modeling (e.g., PTX analysis), which fails to account for runtime realities like cache hit rates. This paper introduces DSO (Dynamic and Static Optimizer), a lightweight solution that fuses both information sources to achieve high accuracy with minimal overhead.

2. Methodology

DSO is built upon a novel theoretical energy efficiency model that accounts for the "roofline" phenomenon in GPU execution, separating execution time into components sensitive to core versus memory frequency. The system architecture, shown in Figure 1, illustrates how DSO integrates various components to manage GPU power.

DSO System Architecture

The methodology involves three core pillars:

  • Information Fusion: DSO extracts 126 static features from PTX assembly code (instruction types, data types, and memory spaces) and combines them with real-time hardware metrics from NVIDIA’s Data Center GPU Manager (DCGM). DCGM provides a "pulse" of the GPU with negligible overhead compared to standard profilers.
  • Parameter Prediction: Instead of using a "black box" AI to predict execution time directly, a Multi-Layer Perceptron (MLP) predicts the physical parameters of the theoretical model. This approach makes the model more robust across diverse kernel types.
  • Optimization: A mathematical simplification (Theorem 1) reduces the complex search for optimal frequency settings into a one-variable optimization problem, enabling the system to find the best configuration almost instantly.

3. Experimental Setup

The model was trained on 138 GPU benchmarks covering a full spectrum of operational intensities. It was evaluated on 20 realistic benchmarks from the CUDA SDK 11.5 and the Rodinia benchmark suite, including DRAM-intensive and computation-heavy workloads. All experiments were conducted on NVIDIA Tesla V100 GPUs.

4. Results and Discussion

DSO demonstrates high predictive accuracy, achieving a Mean Average Precision Error (MAPE) of only 4.6% for execution time and 4.9% for power consumption. This significantly outperforms static-only models, which can exhibit errors as high as 16%.

A key feature of DSO is its ability to prioritize either energy savings or performance through a user-defined parameter, $\eta$. As shown in Figure 2, adjusting $\eta$ allows for a controlled trade-off. At the recommended setting of $\eta=0.8$, DSO achieves an average of 19% energy conservation while maintaining performance within a 5% loss margin.

Impact of parameter η on energy and execution time

Furthermore, the model exhibits strong "zero-shot" capability, performing well on unseen realistic benchmarks without requiring retraining for every new application.

5. Conclusion

DSO provides a practical, lightweight framework for GPU energy optimization. By fusing static code analysis with dynamic hardware metrics, it achieves significant energy savings with minimal performance impact. While currently validated on the NVIDIA Volta architecture, future work will explore extending this model to newer architectures like Ampere and Hopper, as well as incorporating variable memory frequency scaling.

Summary updated

BibTeX
@inproceedings{wang2024dso,
  author = {Qiang Wang and Laiyi Li and Weile Luo and Yijia Zhang and Bingqiang Wang},
  title = {{DSO: A GPU Energy Efficiency Optimizer by Fusing Dynamic and Static Information}},
  booktitle = {Iwqos},
  year = {2024},
}
Figure