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

[AUTO] Fix too much memory cost in auto #27871

Conversation

yangwang201911
Copy link
Contributor

@yangwang201911 yangwang201911 commented Dec 3, 2024

Details:

  • AUTO will only create the device plugins that is specified in the passing device candidate list.
  • AUTO will avoid keeping cloned model if cache blob exists.

Tickets:

@github-actions github-actions bot added category: inference OpenVINO Runtime library - Inference category: AUTO OpenVINO AUTO device selection plugin labels Dec 3, 2024
@github-actions github-actions bot added category: build OpenVINO cmake script / infra category: CPP API OpenVINO CPP API bindings category: NPU OpenVINO NPU plugin labels Dec 10, 2024
@yangwang201911 yangwang201911 force-pushed the ywang2/fix_too_much_memory_cost_in_AUTO branch from 75e47d7 to d8f0729 Compare December 13, 2024 02:32
@github-actions github-actions bot removed category: build OpenVINO cmake script / infra category: CPP API OpenVINO CPP API bindings category: NPU OpenVINO NPU plugin labels Dec 13, 2024
@github-actions github-actions bot added the category: CPP API OpenVINO CPP API bindings label Dec 13, 2024
Comment on lines +664 to +670
std::string compute_hash(const std::shared_ptr<const ov::Model>& model,
const std::string& device_name,
const ov::AnyMap& properties);
std::string compute_hash(const std::string& model_path,
const std::string& device_name,
const ov::AnyMap& properties);

Copy link
Contributor

Choose a reason for hiding this comment

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

Please describe scenarios how this new API is used.

Copy link
Contributor

Choose a reason for hiding this comment

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

Please add tests to cover new API calls

Copy link
Contributor Author

Choose a reason for hiding this comment

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

hi, sorry for the confusion. This draft PR is a temporary patch proposed to solve the customer issue and will not be applied into OV.

@@ -101,6 +101,8 @@ void AutoSchedule::init() {
auto load_device_task = [&](AutoCompileContext* context_ptr, const std::shared_ptr<ov::Model>& model) {
try_to_compile_model(*context_ptr, model);
if (context_ptr->m_is_load_success) {
// release cloned model here
const_cast<std::shared_ptr<ov::Model>&>(model).reset();
Copy link
Contributor

Choose a reason for hiding this comment

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

please change argument type instead of const cast

Copy link
Contributor

This PR will be closed in a week because of 2 weeks of no activity.

@github-actions github-actions bot added the Stale label Jan 25, 2025
Copy link
Contributor

github-actions bot commented Feb 1, 2025

This PR was closed because it has been stalled for 2 week with no activity.

@github-actions github-actions bot closed this Feb 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category: AUTO OpenVINO AUTO device selection plugin category: CPP API OpenVINO CPP API bindings category: inference OpenVINO Runtime library - Inference do_not_merge Stale
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants