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 core.register_plugin internal impl to fs:::path (#34519)
Alicja Miloszewska39a137288624
diff --git a/src/inference/src/cpp/core.cpp b/src/inference/src/cpp/core.cppindex 6afa50a6bfa..924be566d40 100644--- a/src/inference/src/cpp/core.cpp+++ b/src/inference/src/cpp/core.cpp@@ -271,13 +271,13 @@ std::vector<std::string> Core::get_available_devices() const {}void Core::register_plugin(const std::string& plugin, const std::string& device_name, const ov::AnyMap& properties) {- OV_CORE_CALL_STATEMENT(_impl->register_plugin(plugin, device_name, properties););+ register_plugin(ov::util::make_path(plugin), device_name, properties);}void Core::register_plugin(const std::filesystem::path& plugin_path,const std::string& device_name,const ov::AnyMap& properties) {- register_plugin(ov::util::path_to_string(plugin_path), device_name, properties);+ OV_CORE_CALL_STATEMENT(_impl->register_plugin(plugin_path, device_name, properties););}void Core::unload_plugin(const std::string& device_name) {diff --git a/src/inference/src/dev/core_impl.cpp b/src/inference/src/dev/core_impl.cppindex 96f0a406840..3fa58f6fed5 100644--- a/src/inference/src/dev/core_impl.cpp+++ b/src/inference/src/dev/core_impl.cpp@@ -1293,7 +1293,7 @@ void ov::CoreImpl::unload_plugin(const std::string& device_name) {m_plugins.erase(device_name);}-void ov::CoreImpl::register_plugin(const std::string& plugin,+void ov::CoreImpl::register_plugin(const std::filesystem::path& plugin,const std::string& device_name,const ov::AnyMap& properties) {std::lock_guard<std::mutex> lock(get_mutex());@@ -1308,7 +1308,7 @@ void ov::CoreImpl::register_plugin(const std::string& plugin,OPENVINO_THROW("Device name must not contain dot '.' symbol");}- PluginDescriptor desc{ov::util::get_plugin_path(ov::util::make_path(plugin)), properties};+ PluginDescriptor desc{ov::util::get_plugin_path(plugin), properties};register_plugin_in_registry_unsafe(device_name, desc);}diff --git a/src/inference/src/dev/core_impl.hpp b/src/inference/src/dev/core_impl.hppindex b28801f18ef..8aa644cd045 100644--- a/src/inference/src/dev/core_impl.hpp+++ b/src/inference/src/dev/core_impl.hpp@@ -272,7 +272,7 @@ public:* @param device_name A name of device* @param properties Plugin configuration*/- void register_plugin(const std::string& plugin, const std::string& device_name, const ov::AnyMap& properties);+ void register_plugin(const std::filesystem::path& plugin, const std::string& device_name, const ov::AnyMap& properties);/*** @brief Provides a list of plugin names in registry; physically such plugins may not be created