-
Notifications
You must be signed in to change notification settings - Fork 380
[NPUW][VLM][AUTO] Using Auto plugin for VLMs embeddings when running on NPU #3220
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
Changes from 4 commits
ecf7348
05b37ff
f7586ec
f92c507
ec41488
36c544f
9be2aaf
82705a0
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -8,6 +8,8 @@ | |||||||||||||||||||||||||||||||||||||||||
| #include "openvino/genai/visual_language/perf_metrics.hpp" | ||||||||||||||||||||||||||||||||||||||||||
| #include "openvino/genai/tokenizer.hpp" | ||||||||||||||||||||||||||||||||||||||||||
| #include "openvino/genai/text_streamer.hpp" | ||||||||||||||||||||||||||||||||||||||||||
| #include "openvino/runtime/properties.hpp" | ||||||||||||||||||||||||||||||||||||||||||
| #include "openvino/runtime/auto/properties.hpp" | ||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||
| #include "visual_language/vlm_config.hpp" | ||||||||||||||||||||||||||||||||||||||||||
| #include "visual_language/inputs_embedder.hpp" | ||||||||||||||||||||||||||||||||||||||||||
|
|
@@ -36,6 +38,14 @@ void update_npu_properties(const std::filesystem::path& models_dir, ov::AnyMap& | |||||||||||||||||||||||||||||||||||||||||
| break; | ||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||
| void npu_auto_default_properties(ov::AnyMap& device_properties) { | ||||||||||||||||||||||||||||||||||||||||||
| auto auto_propeties = utils::pop_or_default<ov::AnyMap>(device_properties, "AUTO", {}); | ||||||||||||||||||||||||||||||||||||||||||
| auto_propeties.insert(ov::device::priorities("GPU", "CPU")); | ||||||||||||||||||||||||||||||||||||||||||
| auto_propeties.insert(ov::intel_auto::enable_startup_fallback(false)); | ||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||
| auto_propeties.insert(ov::device::priorities("GPU", "CPU")); | |
| auto_propeties.insert(ov::intel_auto::enable_startup_fallback(false)); | |
| // Apply default device priorities only if the user did not specify them. | |
| const std::string priorities_name = ov::device::priorities.name(); | |
| if (auto_propeties.find(priorities_name) == auto_propeties.end() && | |
| auto_propeties.find("DEVICE_PRIORITIES") == auto_propeties.end()) { | |
| auto_propeties.insert(ov::device::priorities("GPU", "CPU")); | |
| } | |
| // Apply default startup fallback only if the user did not specify it. | |
| const std::string startup_fallback_name = ov::intel_auto::enable_startup_fallback.name(); | |
| if (auto_propeties.find(startup_fallback_name) == auto_propeties.end()) { | |
| auto_propeties.insert(ov::intel_auto::enable_startup_fallback(false)); | |
| } |
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.
insert doesn't modify if key already present
Outdated
Copilot
AI
Jan 26, 2026
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.
Corrected spelling of 'propeties' to 'properties'.
| auto auto_propeties = utils::pop_or_default<ov::AnyMap>(device_properties, "AUTO", {}); | |
| auto_propeties.insert(ov::device::priorities("GPU", "CPU")); | |
| auto_propeties.insert(ov::intel_auto::enable_startup_fallback(false)); | |
| device_properties["AUTO"] = auto_propeties; | |
| auto auto_properties = utils::pop_or_default<ov::AnyMap>(device_properties, "AUTO", {}); | |
| auto_properties.insert(ov::device::priorities("GPU", "CPU")); | |
| auto_properties.insert(ov::intel_auto::enable_startup_fallback(false)); | |
| device_properties["AUTO"] = auto_properties; |
Outdated
Copilot
AI
Jan 26, 2026
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.
Corrected spelling of 'auto_propeties' to 'auto_properties'.
| auto auto_propeties = utils::pop_or_default<ov::AnyMap>(device_properties, "AUTO", {}); | |
| auto_propeties.insert(ov::device::priorities("GPU", "CPU")); | |
| auto_propeties.insert(ov::intel_auto::enable_startup_fallback(false)); | |
| device_properties["AUTO"] = auto_propeties; | |
| auto auto_properties = utils::pop_or_default<ov::AnyMap>(device_properties, "AUTO", {}); | |
| auto_properties.insert(ov::device::priorities("GPU", "CPU")); | |
| auto_properties.insert(ov::intel_auto::enable_startup_fallback(false)); | |
| device_properties["AUTO"] = auto_properties; |
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.
Lets keep CPU by default but give a way (and document it) on how to put GPU in the config.
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.
The config isn't there yet. OVMS are working on fully exposing vision models