geopm 3.1.1.dev410+g40bf96ed
GEOPM - Global Extensible Open Power Manager
Loading...
Searching...
No Matches
PowerBalancer.hpp
Go to the documentation of this file.
1/*
2 * Copyright (c) 2015 - 2024 Intel Corporation
3 * SPDX-License-Identifier: BSD-3-Clause
4 */
5
6#ifndef POWERBALANCER_HPP_INCLUDE
7#define POWERBALANCER_HPP_INCLUDE
8
9#include <memory>
10
11#include "geopm_public.h"
12
13namespace geopm
14{
19 class GEOPM_PUBLIC PowerBalancer
20 {
21 public:
23 PowerBalancer() = default;
25 virtual ~PowerBalancer() = default;
35 virtual void power_cap(double cap) = 0;
41 virtual double power_cap(void) const = 0;
45 virtual double power_limit(void) const = 0;
49 virtual void power_limit_adjusted(double limit) = 0;
60 virtual bool is_runtime_stable(double measured_runtime) = 0;
63 virtual double runtime_sample(void) const = 0;
69 virtual void calculate_runtime_sample(void) = 0;
77 virtual void target_runtime(double largest_runtime) = 0;
97 virtual bool is_target_met(double measured_runtime) = 0;
105 virtual double power_slack(void) = 0;
108 static std::unique_ptr<PowerBalancer> make_unique(double ctl_latency);
111 static std::shared_ptr<PowerBalancer> make_shared(double ctl_latency);
112 };
113}
114
115#endif
Stay within a power cap but redistribute power to optimize performance. An average per compute node p...
Definition PowerBalancer.hpp:20
virtual void power_cap(double cap)=0
Should be called at the start of application execution with the average power cap across compute node...
virtual ~PowerBalancer()=default
Destroy a IPowerBalancer object.
virtual void calculate_runtime_sample(void)=0
Sample the measured runtimes under the current power cap in the first phase of execution....
virtual double power_slack(void)=0
Query the difference between the last power cap setting and the current power limit....
virtual double runtime_sample(void) const =0
Return the expected execution time of an application epoch under the current power limit.
virtual double power_cap(void) const =0
The current power cap which cannot be exceeded without breaking contract that the average power budge...
virtual void target_runtime(double largest_runtime)=0
virtual bool is_runtime_stable(double measured_runtime)=0
Update the object with a runtime measured under the current power limit and test if the current runti...
PowerBalancer()=default
Construct a IPowerBalancer object.
virtual bool is_target_met(double measured_runtime)=0
During the second phase of execution the power limit is decreased until the epoch runtime on the comp...
virtual double power_limit(void) const =0
Returns the current power limit prescribed for this node.
virtual void power_limit_adjusted(double limit)=0
Notify power balancer that a new limit has been set with the governor.
Definition Accumulator.cpp:12