Fix COPY_INSTEAD_OF_MOVE
and AUTO_CAUSES_COPY
(#21267)
* Fix `AUTO_CAUSES_COPY` for hetero compiled_model * Fix `COPY_INSTEAD_OF_MOVE` * Fix `AUTO_CAUSES_COPY` in template comp_model
This commit is contained in:
parent
b027766b0a
commit
6dd448d9cc
@ -366,7 +366,7 @@ void ov::CoreImpl::register_plugin_in_registry_unsafe(const std::string& device_
|
||||
auto fallback = it->second.as<std::string>();
|
||||
// Change fallback name if fallback is configured to the HW plugin under the proxy with the same name
|
||||
if (defaultConfig.find(ov::device::priorities.name()) == defaultConfig.end()) {
|
||||
defaultConfig[ov::device::priorities.name()] = std::vector<std::string>{dev_name, fallback};
|
||||
defaultConfig[ov::device::priorities.name()] = std::vector<std::string>{dev_name, std::move(fallback)};
|
||||
} else {
|
||||
auto dev_order = defaultConfig[ov::device::priorities.name()].as<std::vector<std::string>>();
|
||||
auto begin_it = std::find(dev_order.begin(), dev_order.end(), dev_name);
|
||||
|
@ -412,9 +412,6 @@ void ov::hetero::CompiledModel::export_model(std::ostream& model_stream) const {
|
||||
|
||||
auto subnetworksNode = heteroNode.append_child("compiled_submodels");
|
||||
for (const auto& comp_model_desc : m_compiled_submodels) {
|
||||
auto sub_comp_model = comp_model_desc.compiled_model;
|
||||
OPENVINO_ASSERT(sub_comp_model);
|
||||
|
||||
auto subnetworkNode = subnetworksNode.append_child("compiled_submodel");
|
||||
subnetworkNode.append_attribute("device").set_value(comp_model_desc.device.c_str());
|
||||
}
|
||||
@ -431,6 +428,7 @@ void ov::hetero::CompiledModel::export_model(std::ostream& model_stream) const {
|
||||
model_stream << std::endl;
|
||||
|
||||
for (const auto& comp_model_desc : m_compiled_submodels) {
|
||||
OPENVINO_ASSERT(comp_model_desc.compiled_model);
|
||||
if (get_plugin()->get_core()->device_supports_model_caching(comp_model_desc.device)) {
|
||||
try {
|
||||
// Batch plugin reports property of low level plugin
|
||||
@ -441,7 +439,7 @@ void ov::hetero::CompiledModel::export_model(std::ostream& model_stream) const {
|
||||
} catch (ov::NotImplemented&) {
|
||||
}
|
||||
}
|
||||
auto model = comp_model_desc.model;
|
||||
auto& model = comp_model_desc.model;
|
||||
if (!model)
|
||||
OPENVINO_THROW("OpenVINO Model is empty");
|
||||
|
||||
|
@ -139,7 +139,7 @@ ov::Any ov::template_plugin::CompiledModel::get_property(const std::string& name
|
||||
return rw_properties;
|
||||
};
|
||||
if (ov::model_name == name) {
|
||||
auto model_name = m_model->get_friendly_name();
|
||||
auto& model_name = m_model->get_friendly_name();
|
||||
return decltype(ov::model_name)::value_type(model_name);
|
||||
} else if (ov::loaded_from_cache == name) {
|
||||
return m_loaded_from_cache;
|
||||
|
Loading…
Reference in New Issue
Block a user