This commit is contained in:
Wang, Yang authored and GitHub committed 2023-12-15 08:18:03 +01:00
1 parent d5b0f4d2d7
commit 825778308b
3 files changed
+6 -6

No files matched your search

+3 -3
View File
@@ -114,7 +114,7 @@ ov::AnyMap Plugin::pre_process_config(const ov::AnyMap& orig_config) const {
} else {
converted_val = legacy_val;
}
property.second = converted_val;
property.second = std::move(converted_val);
}
}
return properties;
@@ -541,7 +541,7 @@ std::shared_ptr<ov::ICompiledModel> Plugin::compile_model_impl(const std::string
LOG_INFO_TAG("device:%s, priority:%ld", iter->device_name.c_str(), iter->device_priority);
}
// clone the model, in case of reshape conflict
auto_s_context->m_model = cloned_model;
auto_s_context->m_model = std::move(cloned_model);
auto_s_context->m_model_path = model_path;
auto_s_context->m_device_priorities = support_devices;
auto_s_context->m_device_priorities_initial = std::move(support_devices);
@@ -815,7 +815,7 @@ std::string Plugin::get_device_list(const ov::AnyMap& properties) const {
});
return iter != devices.end();
};
auto device_with_default_id = [](std::string& device) {
auto device_with_default_id = [](std::string& device) -> std::string {
// AUTO assume the default device ID will be "0" for the single device.
return device.find(".") == std::string::npos ? device + ".0" : device;
};
+1 -1
View File
@@ -43,7 +43,7 @@ public:
int val_i = -1;
try {
// work around for negative value check (inconsistent behavior on windows/linux)
auto val = v.as<std::string>();
const auto& val = v.as<std::string>();
val_i = std::stoi(val);
if (val_i >= 0)
return true;
+2 -2
View File
@@ -49,7 +49,7 @@ DeviceInformation Plugin::parse_batch_device(const std::string& device_with_batc
OPENVINO_THROW("Batch value for '", deviceName, "' must be > 0, while ", batch, "is passed");
}
}
return {deviceName, {{}}, static_cast<uint32_t>(batch)};
return {std::move(deviceName), {{}}, static_cast<uint32_t>(batch)};
}
DeviceInformation Plugin::parse_meta_device(const std::string& devices_batch_config,
@@ -386,7 +386,7 @@ ov::SoPtr<ov::IRemoteContext> Plugin::get_default_context(const ov::AnyMap& remo
if (it == remote_properties.end())
OPENVINO_THROW("Value for ov::device::priorities is not set");
auto val = it->second.as<std::string>();
const auto& val = it->second.as<std::string>();
auto metaDevice = parse_meta_device(val, ov::AnyMap());
return get_core()->get_default_context(metaDevice.device_name);
}