OpenVINO™ is an open source toolkit for optimizing and deploying AI inference
C++ aicomputer-visiondeep-learningdeploy-aidiffusion-modelsgenerative-aigood-first-issueinferencellm-inferencenatural-language-processingnlpopenvinooptimize-aiperformance-boostrecommendation-systemspeech-recognitionstable-diffusiontransformersyolo
[core] Migrate leftovers of Core ctor implementation (#33611)
Alicja Miloszewska32ac7e617ce0
diff --git a/cmake/developer_package/plugins/plugins.hpp.in b/cmake/developer_package/plugins/plugins.hpp.inindex dbbac66b887..173dc9a604a 100644--- a/cmake/developer_package/plugins/plugins.hpp.in+++ b/cmake/developer_package/plugins/plugins.hpp.in@@ -6,6 +6,7 @@#include <map>#include <string>+#include <filesystem>#ifdef OPENVINO_STATIC_LIBRARY@@ -33,7 +34,7 @@ struct Value {#elsestruct Value {- std::string m_plugin_path;+ std::filesystem::path m_plugin_path;std::map<std::string, std::string> m_default_config;};diff --git a/src/common/util/src/file_util.cpp b/src/common/util/src/file_util.cppindex e1784c5fe7b..f941b7f7b5e 100644--- a/src/common/util/src/file_util.cpp+++ b/src/common/util/src/file_util.cpp@@ -225,7 +225,7 @@ std::filesystem::path ov::util::get_compiled_plugin_path(const std::filesystem::}std::filesystem::path ov::util::get_plugin_path(const std::filesystem::path& plugin,- const std::filesystem::path& xml_dir,+ const std::filesystem::path& xml_path,bool as_abs_only) {// Assume `plugin` (from XML "location" record) contains only:// 1. /path/to/libexample.so absolute path@@ -236,8 +236,7 @@ std::filesystem::path ov::util::get_plugin_path(const std::filesystem::path& pluif (plugin.is_absolute()) {// 1st casereturn plugin;- } else if (const auto rel_path = get_directory((xml_dir.has_parent_path() ? xml_dir : "." / xml_dir));- plugin.has_parent_path()) {+ } else if (const auto rel_path = get_directory(xml_path); plugin.has_parent_path()) {// 2nd casereturn std::filesystem::absolute(std::filesystem::weakly_canonical(rel_path / plugin));} else {diff --git a/src/inference/src/dev/core_impl.cpp b/src/inference/src/dev/core_impl.cppindex ac5fea006ad..8dc14ffaba4 100644--- a/src/inference/src/dev/core_impl.cpp+++ b/src/inference/src/dev/core_impl.cpp@@ -589,7 +589,7 @@ void ov::CoreImpl::register_compile_time_plugins() {register_plugin_in_registry_unsafe(device_name, desc);}#else- const auto& plugin_path = ov::util::get_compiled_plugin_path(ov::util::make_path(plugin.second.m_plugin_path));+ const auto& plugin_path = ov::util::get_compiled_plugin_path(plugin.second.m_plugin_path);if (m_plugin_registry.find(device_name) == m_plugin_registry.end() && ov::util::file_exists(plugin_path)) {ov::AnyMap config = any_copy(plugin.second.m_default_config);PluginDescriptor desc{plugin_path, config};