Skip to content

Commit 6b67cf3

Browse files
rename to power-frequency model
1 parent d631f5e commit 6b67cf3

File tree

3 files changed

+9
-7
lines changed

3 files changed

+9
-7
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ This project adheres to [Semantic Versioning](http://semver.org/).
66

77
### Added
88
- Support for using time_limit in simulation mode
9+
- Helper functions for energy tuning
10+
- Example to show ridge frequency and power-frequency model
911

1012
### Changed
1113
- Changed what timings are stored in cache files

examples/cuda/going_green_performance_model.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
#!/usr/bin/env python
22
"""
3-
This example demonstrates how to use the performance model presented in
3+
This example demonstrates how to use the power-frequency model presented in
44
55
* Going green: optimizing GPUs for energy efficiency through model-steered auto-tuning
66
R. Schoonhoven, B. Veenboer, B. van Werkhoven, K. J. Batenburg
77
International Workshop on Performance Modeling, Benchmarking and Simulation of High Performance Computer Systems (PMBS) at Supercomputing (SC22) 2022
88
99
to reduce the number of frequencies for GPU energy tuning.
1010
11-
In particular, this example creates a plot with the modeled-performance vs
11+
In particular, this example creates a plot with the modeled power consumption vs
1212
frequency curve, highlighting the ridge frequency and the frequency range
1313
selected by the user.
1414
@@ -59,7 +59,7 @@ def get_default_parser():
5959
parser = get_default_parser()
6060
args = parser.parse_args()
6161

62-
ridge_frequency, freqs, nvml_power, fitted_params, scaling = energy.create_performance_frequency_model(device=args.device,
62+
ridge_frequency, freqs, nvml_power, fitted_params, scaling = energy.create_power_frequency_model(device=args.device,
6363
n_samples=args.samples,
6464
verbose=True,
6565
nvidia_smi_fallback=args.nvidia_smi_fallback,

kernel_tuner/energy/energy.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ def estimated_power(X, clock_threshold, voltage_scale, clock_scale, power_max):
116116
return powers
117117

118118

119-
def fit_performance_frequency_model(freqs, nvml_power):
119+
def fit_power_frequency_model(freqs, nvml_power):
120120
""" Fit the performance frequency model based on frequency and power measurements """
121121

122122
nvml_gr_clocks = np.array(freqs)
@@ -149,10 +149,10 @@ def fit_performance_frequency_model(freqs, nvml_power):
149149
return clock_threshold + clock_min, fit_parameters, scale_parameters
150150

151151

152-
def create_performance_frequency_model(device=0, n_samples=10, verbose=False, nvidia_smi_fallback=None, use_locked_clocks=False):
152+
def create_power_frequency_model(device=0, n_samples=10, verbose=False, nvidia_smi_fallback=None, use_locked_clocks=False):
153153
""" Calculate the most energy-efficient clock frequency of device
154154
155-
This function uses a performance model to fit the performance-frequency curve
155+
This function uses a performance model to fit the power-frequency curve
156156
using a synthethic benchmarking kernel. The method has been described in:
157157
158158
* Going green: optimizing GPUs for energy efficiency through model-steered auto-tuning
@@ -186,7 +186,7 @@ def create_performance_frequency_model(device=0, n_samples=10, verbose=False, nv
186186
print("Clock frequencies:", freqs.tolist())
187187
print("Power consumption:", nvml_power.tolist())
188188

189-
ridge_frequency, fitted_params, scaling = fit_performance_frequency_model(freqs, nvml_power)
189+
ridge_frequency, fitted_params, scaling = fit_power_frequency_model(freqs, nvml_power)
190190

191191
if verbose:
192192
print(f"Modelled most energy efficient frequency: {ridge_frequency} MHz")

0 commit comments

Comments
 (0)