Skip to content

Commit

Permalink
fix QueryModelWithInvalidDeviceIDThrows is fail for AUTO (openvinotoo…
Browse files Browse the repository at this point in the history
…lkit#23760)

### Details:
 - *fix QueryModelWithInvalidDeviceIDThrows is fail for AUTO*

### Tickets:
 - *CVS-130217*

---------

Co-authored-by: yanlan song <[email protected]>
  • Loading branch information
panhaiqi and songbell authored Apr 1, 2024
1 parent 6cca0d6 commit 6af05ba
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/plugins/auto/src/plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -472,6 +472,9 @@ ov::SupportedOpsMap Plugin::query_model(const std::shared_ptr<const ov::Model>&
auto priorities = full_property.find(ov::device::priorities.name());
if (priorities!= full_property.end() && !priorities->second.empty()) {
auto meta_devices = parse_meta_devices(priorities->second.as<std::string>(), full_property);
if (meta_devices.empty()) {
OPENVINO_THROW(get_device_name(), ": cannot parse valid device from ", priorities->second.as<std::string>());
}
std::unordered_set<std::string> supported_layers;
for (auto&& value : meta_devices) {
auto device_qm = get_core()->query_model(model, value.device_name, value.config);
Expand All @@ -486,6 +489,8 @@ ov::SupportedOpsMap Plugin::query_model(const std::shared_ptr<const ov::Model>&
for (auto&& iter : supported_layers) {
res[iter] = get_device_name();
}
} else {
OPENVINO_THROW(get_device_name(), ": device priority is missing for query model");
}
return res;
}
Expand Down

0 comments on commit 6af05ba

Please sign in to comment.