Abstract
GPUs are widely used to accelerate the training of machine learning workloads. As modern machine learning models become increasingly larger, they require a longer time to train, leading to higher GPU energy consumption. This paper presents GPOEO, an online GPU energy optimization framework for machine learning training workloads. GPOEO dynamically determines the optimal energy configuration by employing novel techniques for online measurement, multi-objective prediction modeling, and search optimization. To characterize the target workload behavior, GPOEO utilizes GPU performance counters. To reduce the performance counter profiling overhead, it uses an analytical model to detect the training iteration change and only collects performance counter data when an iteration shift is detected. GPOEO employs multi-objective models based on gradient boosting and a local search algorithm to find a trade-off between execution time and energy consumption. We evaluate the GPOEO by applying it to 71 machine learning workloads from two AI benchmark suites running on an NVIDIA RTX3080Ti GPU. Compared with the NVIDIA default scheduling strategy, GPOEO delivers a mean energy saving of 16.2% with a modest average execution time increase of 5.1%.
Introduction
Training deep neural networks (DNNs) is notoriously energy-intensive, often requiring high-performance GPUs to run for days or weeks. While energy can be saved by downclocking the GPU’s Streaming Multiprocessor (SM) or memory, finding the "sweet spot" where energy savings are maximized without significantly degrading performance is a complex challenge.
Existing solutions typically fall into two categories: offline methods that require extensive pre-profiling, and coarse-grained online methods that rely on high-level metrics like GPU utilization. However, coarse metrics often fail to capture the subtle hardware interactions of different models—for instance, two models with 90% utilization might use entirely different hardware units like Tensor Cores versus standard floating-point units. Furthermore, existing online tools struggle with stable iteration detection, leading to inaccurate optimization.
The GPOEO Framework
GPOEO (GPU Online Energy Optimizer) is a "micro-intrusive" framework designed to address these limitations. It operates in two distinct phases: an offline training phase to build predictive models and an online optimization phase that adapts to the workload in real-time.
The framework employs several key techniques:
- Robust Period Detection: GPOEO identifies training iterations using Fast Fourier Transform (FFT) and a "Feature Sequence Similarity" algorithm based on Gaussian mixture models to filter noise and pinpoint exact iteration lengths.
- Fine-Grained Profiling: Instead of general utilization, it monitors over 1,100 hardware performance counters (e.g., IPC, cache miss rates, and specific instruction pipe activity) via NVIDIA’s CUPTI.
- Multi-Objective Modeling: The framework uses XGBoost models to predict how different clock configurations will affect both energy consumption and execution time.
- Online Local Search: A Golden Section Search algorithm refines the predicted optimal settings in real-time to find the actual best configuration.
Experimental Evaluation
The framework was evaluated using a massive suite of 71 machine learning workloads. This included 16 diverse applications from the AIBench suite (covering image classification, translation, and recommendation), 55 Graph Neural Network (GNN) workloads, and classical machine learning benchmarks like ThunderSVM to test non-periodical behavior.
Key Results and Analysis
GPOEO demonstrates significant improvements over existing baselines. A critical factor in its success is stability; while previous state-of-the-art tools like ODPP suffered from period detection errors as high as 23%, GPOEO reduces this error to under 2%, providing a stable foundation for all subsequent optimization.
Across the 71 workloads tested on an NVIDIA RTX 3080Ti, GPOEO achieved a mean energy saving of 16.2% with an average execution time increase of only 5.1%. As shown in the figure above, specific applications like CLB_MLP can see energy savings exceeding 26%. Compared to the ODPP baseline, GPOEO improved energy savings by 9.2% while simultaneously reducing the performance penalty by 5.0%. The framework itself is lightweight, with total time and energy overheads remaining under 4%.
Conclusion
GPOEO provides an effective online solution for GPU energy optimization in machine learning training. By combining robust iteration detection with fine-grained hardware profiling and multi-objective modeling, it achieves substantial energy savings with minimal performance impact. While currently tailored to NVIDIA architectures and requiring initial offline model training, it offers a robust path toward more sustainable deep learning research and production.
Summary updated