-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added ControlRecommender interface #2799
base: dev
Are you sure you want to change the base?
Added ControlRecommender interface #2799
Conversation
Signed-off-by: Lowren Lawson <lowren.h.lawson@intel.com>
962abca
to
b135e3e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why not just?
/*
* Copyright (c) 2015 - 2022, Intel Corporation
* SPDX-License-Identifier: BSD-3-Clause
*/
#ifndef CONTROLRECOMMENDER_HPP_INCLUDE
#define CONTROLRECOMMENDER_HPP_INCLUDE
#include <memory>
#include <vector>
#include <string>
struct geopm_request_s;
namespace geopm
{
class ControlRecommender
{
public:
ControlRecommender() = default;
virtual ~ControlRecommender() = default;
static std::unique_ptr<ControlRecommender> make_unique(std::string algorithm, std::vector<geopm_request_s> control_requests);
virtual void update(void) = 0;
virtual std::vector<double> settings(void) = 0;
virtual void performance_bias(double bias) = 0;
};
}
#endif
Signed-off-by: Christopher M. Cantalupo <christopher.m.cantalupo@intel.com>
57ae0b9
to
5eeb7c8
Compare
Signed-off-by: Christopher M. Cantalupo <christopher.m.cantalupo@intel.com>
f21c3dd
to
dcac6d8
Compare
/// supported. The order of these requests | ||
/// reflects ordering of the returned values from | ||
/// the settings method. | ||
virtual std::vector<geopm_request_s> supported_requests(const std::vector<geopm_request_t> &attempted_requests) = 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
supported_requests -> set_configured_requests()
supported_requests const -> get_configured_requests() const
/// @param [in] bias Abstract number between 0 and 1: a | ||
/// value of 1 is most biased toward performance, | ||
/// and 0 is most biased towards energy efficiency. | ||
virtual void performance_bias(double bias) = 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This API is insufficient to enable an agent to express information that is gathered from the TreeComm. There is no way to have the ControlRecommender send data to other nodes via the TreeComm. This makes it difficult for distributed agent algorithms to fit into this API.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some additional context from that discussion:
In the meeting we discussed one solution may be for control recommenders to describe things that they'd send over TreeComm. We noted that TreeComm needs to know information about what it will communicate early in launch (i.e., how much space to allocate for samples and policies). If we go that direction, it might be worth evaluating whether there are any communication overhead aspects to consider (e.g., whether we also need to independently enable/disable communicators associated with different recommenders)
2cd441d
to
0859ce3
Compare
Signed-off-by: Lowren Lawson lowren.h.lawson@intel.com
Updated recommender class interface #2792 based upon review #2793