From eaef130aa0a8f7b3cc92af76b33895159a5351ae Mon Sep 17 00:00:00 2001 From: "Raasz, Pawel" Date: Tue, 10 Dec 2024 12:59:49 +0000 Subject: [PATCH] Revert changes Signed-off-by: Raasz, Pawel --- src/inference/src/dev/core_impl.cpp | 7 +++++-- src/plugins/auto_batch/src/plugin.cpp | 11 +++-------- src/plugins/auto_batch/src/plugin.hpp | 3 --- src/plugins/hetero/src/plugin.cpp | 3 +-- src/plugins/intel_cpu/src/plugin.cpp | 4 ++-- .../behavior/compiled_model/compiled_model_base.hpp | 1 - 6 files changed, 11 insertions(+), 18 deletions(-) diff --git a/src/inference/src/dev/core_impl.cpp b/src/inference/src/dev/core_impl.cpp index 25dde8973d9356..50d3d9cc2b6610 100644 --- a/src/inference/src/dev/core_impl.cpp +++ b/src/inference/src/dev/core_impl.cpp @@ -714,6 +714,8 @@ ov::Plugin ov::CoreImpl::get_plugin(const std::string& pluginName) const { } } } + + // set global device-id independent settings to plugin plugin.set_property(desc.defaultConfig); }); } @@ -980,6 +982,7 @@ ov::AnyMap ov::CoreImpl::get_supported_property(const std::string& full_device_n if (device_priorities_it != return_properties.end()) { return_properties.erase(device_priorities_it); } + return return_properties; } @@ -998,7 +1001,7 @@ ov::AnyMap ov::CoreImpl::get_supported_property(const std::string& full_device_n // try to search against OV API 2.0' mutable supported_properties try { - for (auto&& property : ICore::get_property(device_name, ov::supported_properties)) { + for (auto&& property : ICore::get_property(device_name, ov::supported_properties, {})) { if (property.is_mutable()) { supported_config_keys.emplace_back(std::move(property)); } @@ -1008,7 +1011,7 @@ ov::AnyMap ov::CoreImpl::get_supported_property(const std::string& full_device_n // try to search against internal supported_properties try { - for (auto&& property : ICore::get_property(device_name, ov::internal::supported_properties)) { + for (auto&& property : ICore::get_property(device_name, ov::internal::supported_properties, {})) { if (property.is_mutable()) { supported_config_keys.emplace_back(std::move(property)); } diff --git a/src/plugins/auto_batch/src/plugin.cpp b/src/plugins/auto_batch/src/plugin.cpp index 3e1b35fe338612..53d79a00478aea 100644 --- a/src/plugins/auto_batch/src/plugin.cpp +++ b/src/plugins/auto_batch/src/plugin.cpp @@ -47,16 +47,11 @@ DeviceInformation Plugin::parse_batch_device(const std::string& device_with_batc return {std::move(deviceName), {{}}, static_cast(batch)}; } -DeviceInformation Plugin::parse_only_meta_device(const std::string& devices_batch_config, - const ov::AnyMap& user_config) const { +DeviceInformation Plugin::parse_meta_device(const std::string& devices_batch_config, + const ov::AnyMap& user_config) const { auto meta_device = parse_batch_device(devices_batch_config); meta_device.device_config = get_core()->get_supported_property(meta_device.device_name, user_config); - return meta_device; -} -DeviceInformation Plugin::parse_meta_device(const std::string& devices_batch_config, - const ov::AnyMap& user_config) const { - auto meta_device = parse_only_meta_device(devices_batch_config, user_config); // check that no irrelevant config-keys left for (const auto& k : user_config) { const auto& name = k.first; @@ -146,7 +141,7 @@ std::shared_ptr Plugin::compile_model(const std::shared_ptr< if (device_batch == full_properties.end()) { OPENVINO_THROW("ov::device::priorities key for AUTO BATCH is not set for BATCH device"); } - auto meta_device = parse_only_meta_device(device_batch->second.as(), properties); + auto meta_device = parse_meta_device(device_batch->second.as(), properties); const auto& device_name = meta_device.device_name; const auto& device_config = meta_device.device_config; diff --git a/src/plugins/auto_batch/src/plugin.hpp b/src/plugins/auto_batch/src/plugin.hpp index 8bfdb7c4e8385d..563ba4487ee3ec 100644 --- a/src/plugins/auto_batch/src/plugin.hpp +++ b/src/plugins/auto_batch/src/plugin.hpp @@ -65,9 +65,6 @@ class Plugin : public ov::IPlugin { static DeviceInformation parse_batch_device(const std::string& device_with_batch); private: - DeviceInformation parse_only_meta_device(const std::string& devices_batch_config, - const ov::AnyMap& user_config) const; - mutable ov::AnyMap m_plugin_config; }; } // namespace autobatch_plugin diff --git a/src/plugins/hetero/src/plugin.cpp b/src/plugins/hetero/src/plugin.cpp index 6d2740cfd05001..298be6fa201f4f 100644 --- a/src/plugins/hetero/src/plugin.cpp +++ b/src/plugins/hetero/src/plugin.cpp @@ -283,8 +283,7 @@ ov::Any ov::hetero::Plugin::get_property(const std::string& name, const ov::AnyM return decltype(ov::supported_properties)::value_type(std::move(supported_properties)); } else if (ov::internal::supported_properties == name) { return decltype(ov::internal::supported_properties)::value_type{ - ov::PropertyName{ov::internal::caching_properties.name(), ov::PropertyMutability::RO}, - }; + ov::PropertyName{ov::internal::caching_properties.name(), ov::PropertyMutability::RO}}; } else if (ov::device::full_name == name) { return decltype(ov::device::full_name)::value_type{get_device_name()}; } else if (ov::internal::caching_properties == name) { diff --git a/src/plugins/intel_cpu/src/plugin.cpp b/src/plugins/intel_cpu/src/plugin.cpp index 4e0f9f036e3c8e..e2d4ca7f1d7f60 100644 --- a/src/plugins/intel_cpu/src/plugin.cpp +++ b/src/plugins/intel_cpu/src/plugin.cpp @@ -452,8 +452,8 @@ ov::Any Plugin::get_ro_property(const std::string& name, const ov::AnyMap& optio ov::PropertyName{ov::internal::caching_with_mmap.name(), ov::PropertyMutability::RO}, #endif ov::PropertyName{ov::internal::exclusive_async_requests.name(), ov::PropertyMutability::RW}, - ov::PropertyName{ov::internal::compiled_model_runtime_properties.name(), ov::PropertyMutability::RO}, - }; + ov::PropertyName{ov::internal::compiled_model_runtime_properties.name(), + ov::PropertyMutability::RO}}; } else if (name == ov::device::full_name) { return decltype(ov::device::full_name)::value_type(deviceFullName); } else if (name == ov::available_devices) { diff --git a/src/tests/functional/plugin/shared/include/behavior/compiled_model/compiled_model_base.hpp b/src/tests/functional/plugin/shared/include/behavior/compiled_model/compiled_model_base.hpp index ae6ad2d3324ab8..74f6c4193bcf4c 100644 --- a/src/tests/functional/plugin/shared/include/behavior/compiled_model/compiled_model_base.hpp +++ b/src/tests/functional/plugin/shared/include/behavior/compiled_model/compiled_model_base.hpp @@ -628,7 +628,6 @@ TEST_P(OVCompiledModelBaseTest, canLoadCorrectNetworkToGetExecutableWithIncorrec for (const auto& confItem : configuration) { config.emplace(confItem.first, confItem.second); } - bool is_meta_devices = target_device.find("AUTO") != std::string::npos || target_device.find("MULTI") != std::string::npos || target_device.find("HETERO") != std::string::npos;