Skip to content
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

[GPU] POC for shared plugin config #28667

Open
wants to merge 43 commits into
base: master
Choose a base branch
from

Conversation

vladimir-paramuzov
Copy link
Contributor

Details:

  • Added common base class for plugin configuration and migration in GPU plugin.
  • New config defines options as typed members of config class which shall provide more efficient access to the value than AnyMap
  • Property setting is possible before finalization only which shall localize the point when config become immutable.
  • All config options may be read from environment as well as from json config file when OV is built w/ debug caps.
  • Debug and release options are defined and handled similarly now

@vladimir-paramuzov vladimir-paramuzov requested review from a team as code owners January 24, 2025 13:09
@github-actions github-actions bot added category: inference OpenVINO Runtime library - Inference category: Core OpenVINO Core (aka ngraph) category: GPU OpenVINO GPU plugin category: CPU OpenVINO CPU plugin category: build OpenVINO cmake script / infra labels Jan 24, 2025
@vladimir-paramuzov vladimir-paramuzov force-pushed the new_config_poc branch 2 times, most recently from ea3c7c1 to 1bc7a7b Compare January 27, 2025 06:06
Comment on lines 207 to 208
std::set<std::string> off = {"0", "false", "off", "no"};
std::set<std::string> on = {"1", "true", "on", "yes"};
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
std::set<std::string> off = {"0", "false", "off", "no"};
std::set<std::string> on = {"1", "true", "on", "yes"};
static const std::set<std::string> off = {"0", "false", "off", "no"};
static const std::set<std::string> on = {"1", "true", "on", "yes"};

Signed-off-by: Vladimir Paramuzov <[email protected]>
Signed-off-by: Vladimir Paramuzov <[email protected]>
Signed-off-by: Vladimir Paramuzov <[email protected]>
Signed-off-by: Vladimir Paramuzov <[email protected]>
Signed-off-by: Vladimir Paramuzov <[email protected]>
Signed-off-by: Vladimir Paramuzov <[email protected]>
Signed-off-by: Vladimir Paramuzov <[email protected]>
Signed-off-by: Vladimir Paramuzov <[email protected]>
Signed-off-by: Vladimir Paramuzov <[email protected]>
Signed-off-by: Vladimir Paramuzov <[email protected]>
Signed-off-by: Vladimir Paramuzov <[email protected]>
Signed-off-by: Vladimir Paramuzov <[email protected]>
Signed-off-by: Vladimir Paramuzov <[email protected]>
Signed-off-by: Vladimir Paramuzov <[email protected]>
Signed-off-by: Vladimir Paramuzov <[email protected]>
Signed-off-by: Vladimir Paramuzov <[email protected]>
Signed-off-by: Vladimir Paramuzov <[email protected]>
Signed-off-by: Vladimir Paramuzov <[email protected]>
Signed-off-by: Vladimir Paramuzov <[email protected]>
Signed-off-by: Vladimir Paramuzov <[email protected]>
Signed-off-by: Vladimir Paramuzov <[email protected]>
Signed-off-by: Vladimir Paramuzov <[email protected]>
Signed-off-by: Vladimir Paramuzov <[email protected]>
Signed-off-by: Vladimir Paramuzov <[email protected]>
Signed-off-by: Vladimir Paramuzov <[email protected]>
Signed-off-by: Vladimir Paramuzov <[email protected]>
Signed-off-by: Vladimir Paramuzov <[email protected]>
Signed-off-by: Vladimir Paramuzov <[email protected]>
Signed-off-by: Vladimir Paramuzov <[email protected]>
Signed-off-by: Vladimir Paramuzov <[email protected]>
@praasz praasz self-assigned this Jan 28, 2025
Signed-off-by: Vladimir Paramuzov <[email protected]>
Signed-off-by: Vladimir Paramuzov <[email protected]>
Signed-off-by: Vladimir Paramuzov <[email protected]>
Signed-off-by: Vladimir Paramuzov <[email protected]>
Signed-off-by: Vladimir Paramuzov <[email protected]>
Signed-off-by: Vladimir Paramuzov <[email protected]>
}
}

void handle_option(ConfigOptionBase* option) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
void handle_option(ConfigOptionBase* option) {
void handle_option(const ConfigOptionBase* option) {

Comment on lines +200 to +201
const std::set<std::string> off = {"0", "false", "off", "no"};
const std::set<std::string> on = {"1", "true", "on", "yes"};
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
const std::set<std::string> off = {"0", "false", "off", "no"};
const std::set<std::string> on = {"1", "true", "on", "yes"};
constexpr std::set<std::string> off = {"0", "false", "off", "no"};
constexpr std::set<std::string> on = {"1", "true", "on", "yes"};

// In the case of inner program, allow_new_shape_infer flag is setted by outside of program.
// So, do not check allow_new_shape_infer for inner program build
for (const auto& op : ops) {
if (auto multi_subgraph_op = ov::as_type_ptr<op::util::MultiSubGraphOp>(op)) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it possible to have nested subgraphs? This can be moved to process_op() for recurrent processing

}
if (!info.supports_immad || !is_llm)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Activation scaleing should be applied only if !is_llm:

Suggested change
if (!info.supports_immad || !is_llm)
if (!is_llm)


virtual void set_any(const ov::Any any) = 0;
virtual ov::Any get_any() const = 0;
virtual bool is_valid_value(ov::Any val) = 0;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
virtual bool is_valid_value(ov::Any val) = 0;
virtual bool is_valid_value(ov::Any val) const = 0;

@@ -6,6 +6,9 @@

#include <limits>
#include <string>
#include <string_view>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This include seems unused

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's actually used below: std::array<std::string_view, 4>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category: build OpenVINO cmake script / infra category: Core OpenVINO Core (aka ngraph) category: CPU OpenVINO CPU plugin category: GPU OpenVINO GPU plugin category: inference OpenVINO Runtime library - Inference
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants