Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion cmake/developer_package/plugins/plugins.hpp.in
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

#include <map>
#include <string>
#include <filesystem>

#ifdef OPENVINO_STATIC_LIBRARY

Expand Down Expand Up @@ -33,7 +34,7 @@ struct Value {
#else

struct Value {
std::string m_plugin_path;
std::filesystem::path m_plugin_path;
std::map<std::string, std::string> m_default_config;
};

Expand Down
5 changes: 2 additions & 3 deletions src/common/util/src/file_util.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,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
Expand All @@ -418,8 +418,7 @@ std::filesystem::path ov::util::get_plugin_path(const std::filesystem::path& plu
if (plugin.is_absolute()) {
// 1st case
return 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 case
return std::filesystem::absolute(std::filesystem::weakly_canonical(rel_path / plugin));
} else {
Expand Down
2 changes: 1 addition & 1 deletion src/inference/src/dev/core_impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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};
Expand Down
Loading