Fix leftovers after removing plugins.xml (#16487)
* Fixed comments * Rename ie_plugins to ov_plugins * Remove dependency from tests
This commit is contained in:
parent
6bf2fe11ae
commit
a205c675db
|
|
@ -2,7 +2,7 @@
|
|||
# SPDX-License-Identifier: Apache-2.0
|
||||
#
|
||||
|
||||
foreach(var IE_DEVICE_MAPPING OV_DYNAMIC IE_PLUGINS_HPP_HEADER IE_PLUGINS_HPP_HEADER_IN)
|
||||
foreach(var OV_DEVICE_MAPPING BUILD_SHARED_LIBS OV_PLUGINS_HPP_HEADER OV_PLUGINS_HPP_HEADER_IN)
|
||||
if(NOT DEFINED ${var})
|
||||
message(FATAL_ERROR "${var} is required, but not defined")
|
||||
endif()
|
||||
|
|
@ -10,11 +10,11 @@ endforeach()
|
|||
|
||||
# configure variables
|
||||
|
||||
set(IE_PLUGINS_DECLARATIONS "")
|
||||
set(IE_PLUGINS_MAP_DEFINITION
|
||||
set(OV_PLUGINS_DECLARATIONS "")
|
||||
set(OV_PLUGINS_MAP_DEFINITION
|
||||
" static const std::map<Key, Value> plugins_hpp = {")
|
||||
|
||||
foreach(dev_map IN LISTS IE_DEVICE_MAPPING)
|
||||
foreach(dev_map IN LISTS OV_DEVICE_MAPPING)
|
||||
string(REPLACE ":" ";" dev_map "${dev_map}")
|
||||
list(GET dev_map 0 mapped_dev_name)
|
||||
list(GET dev_map 1 actual_dev_name)
|
||||
|
|
@ -35,30 +35,30 @@ foreach(dev_map IN LISTS IE_DEVICE_MAPPING)
|
|||
set(dev_config "${dev_config}}")
|
||||
|
||||
|
||||
if(NOT OV_DYNAMIC)
|
||||
if(NOT BUILD_SHARED_LIBS)
|
||||
# common
|
||||
set(_IE_CREATE_PLUGIN_FUNC "CreatePluginEngine${actual_dev_name}")
|
||||
set(_IE_CREATE_EXTENSION_FUNC "CreateExtensionShared${actual_dev_name}")
|
||||
set(_OV_CREATE_PLUGIN_FUNC "CreatePluginEngine${actual_dev_name}")
|
||||
set(_OV_CREATE_EXTENSION_FUNC "CreateExtensionShared${actual_dev_name}")
|
||||
|
||||
# declarations
|
||||
set(IE_PLUGINS_DECLARATIONS "${IE_PLUGINS_DECLARATIONS}
|
||||
IE_DEFINE_PLUGIN_CREATE_FUNCTION_DECLARATION(${_IE_CREATE_PLUGIN_FUNC});")
|
||||
set(OV_PLUGINS_DECLARATIONS "${OV_PLUGINS_DECLARATIONS}
|
||||
IE_DEFINE_PLUGIN_CREATE_FUNCTION_DECLARATION(${_OV_CREATE_PLUGIN_FUNC});")
|
||||
if(${actual_dev_name}_AS_EXTENSION)
|
||||
set(IE_PLUGINS_DECLARATIONS "${IE_PLUGINS_DECLARATIONS}
|
||||
IE_DEFINE_EXTENSION_CREATE_FUNCTION_DECLARATION(${_IE_CREATE_EXTENSION_FUNC});")
|
||||
set(OV_PLUGINS_DECLARATIONS "${OV_PLUGINS_DECLARATIONS}
|
||||
IE_DEFINE_EXTENSION_CREATE_FUNCTION_DECLARATION(${_OV_CREATE_EXTENSION_FUNC});")
|
||||
else()
|
||||
set(_IE_CREATE_EXTENSION_FUNC "nullptr")
|
||||
set(_OV_CREATE_EXTENSION_FUNC "nullptr")
|
||||
endif()
|
||||
|
||||
set(IE_PLUGINS_MAP_DEFINITION "${IE_PLUGINS_MAP_DEFINITION}
|
||||
{ \"${mapped_dev_name}\", Value { ${_IE_CREATE_PLUGIN_FUNC}, ${_IE_CREATE_EXTENSION_FUNC}, ${dev_config} } },")
|
||||
set(OV_PLUGINS_MAP_DEFINITION "${OV_PLUGINS_MAP_DEFINITION}
|
||||
{ \"${mapped_dev_name}\", Value { ${_OV_CREATE_PLUGIN_FUNC}, ${_OV_CREATE_EXTENSION_FUNC}, ${dev_config} } },")
|
||||
else()
|
||||
set(IE_PLUGINS_MAP_DEFINITION "${IE_PLUGINS_MAP_DEFINITION}
|
||||
set(OV_PLUGINS_MAP_DEFINITION "${OV_PLUGINS_MAP_DEFINITION}
|
||||
{ \"${mapped_dev_name}\", Value { \"${actual_dev_name}\", ${dev_config} } },")
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
set(IE_PLUGINS_MAP_DEFINITION "${IE_PLUGINS_MAP_DEFINITION}
|
||||
set(OV_PLUGINS_MAP_DEFINITION "${OV_PLUGINS_MAP_DEFINITION}
|
||||
};\n")
|
||||
|
||||
configure_file("${IE_PLUGINS_HPP_HEADER_IN}" "${IE_PLUGINS_HPP_HEADER}" @ONLY)
|
||||
configure_file("${OV_PLUGINS_HPP_HEADER_IN}" "${OV_PLUGINS_HPP_HEADER}" @ONLY)
|
||||
|
|
|
|||
|
|
@ -281,9 +281,9 @@ function(ie_target_link_plugins TARGET_NAME)
|
|||
endfunction()
|
||||
|
||||
#
|
||||
# ie_generate_plugins_hpp()
|
||||
# ov_generate_plugins_hpp()
|
||||
#
|
||||
function(ie_generate_plugins_hpp)
|
||||
function(ov_generate_plugins_hpp)
|
||||
set(device_mapping)
|
||||
set(device_configs)
|
||||
set(as_extension)
|
||||
|
|
@ -321,22 +321,22 @@ function(ie_generate_plugins_hpp)
|
|||
endif()
|
||||
endforeach()
|
||||
|
||||
# add plugins to libraries including ie_plugins.hpp
|
||||
# add plugins to libraries including ov_plugins.hpp
|
||||
ie_target_link_plugins(openvino)
|
||||
if(TARGET inference_engine_s)
|
||||
ie_target_link_plugins(inference_engine_s)
|
||||
endif()
|
||||
|
||||
set(ie_plugins_hpp "${CMAKE_BINARY_DIR}/src/inference/ie_plugins.hpp")
|
||||
set(ov_plugins_hpp "${CMAKE_BINARY_DIR}/src/inference/ov_plugins.hpp")
|
||||
set(plugins_hpp_in "${IEDevScripts_DIR}/plugins/plugins.hpp.in")
|
||||
|
||||
add_custom_command(OUTPUT "${ie_plugins_hpp}"
|
||||
add_custom_command(OUTPUT "${ov_plugins_hpp}"
|
||||
COMMAND
|
||||
"${CMAKE_COMMAND}"
|
||||
-D "IE_DEVICE_MAPPING=${device_mapping}"
|
||||
-D "OV_DYNAMIC=${BUILD_SHARED_LIBS}"
|
||||
-D "IE_PLUGINS_HPP_HEADER_IN=${plugins_hpp_in}"
|
||||
-D "IE_PLUGINS_HPP_HEADER=${ie_plugins_hpp}"
|
||||
-D "BUILD_SHARED_LIBS=${BUILD_SHARED_LIBS}"
|
||||
-D "OV_DEVICE_MAPPING=${device_mapping}"
|
||||
-D "OV_PLUGINS_HPP_HEADER_IN=${plugins_hpp_in}"
|
||||
-D "OV_PLUGINS_HPP_HEADER=${ov_plugins_hpp}"
|
||||
${device_configs}
|
||||
${as_extension}
|
||||
-P "${IEDevScripts_DIR}/plugins/create_plugins_hpp.cmake"
|
||||
|
|
@ -344,13 +344,13 @@ function(ie_generate_plugins_hpp)
|
|||
"${plugins_hpp_in}"
|
||||
"${IEDevScripts_DIR}/plugins/create_plugins_hpp.cmake"
|
||||
COMMENT
|
||||
"Generate ie_plugins.hpp for build"
|
||||
"Generate ov_plugins.hpp for build"
|
||||
VERBATIM)
|
||||
|
||||
# for some reason dependency on source files does not work
|
||||
# so, we have to use explicit target and make it dependency for inference_engine
|
||||
add_custom_target(_ie_plugins_hpp DEPENDS ${ie_plugins_hpp})
|
||||
add_dependencies(inference_engine_obj _ie_plugins_hpp)
|
||||
add_custom_target(_ov_plugins_hpp DEPENDS ${ov_plugins_hpp})
|
||||
add_dependencies(inference_engine_obj _ov_plugins_hpp)
|
||||
|
||||
# add dependency for object files
|
||||
get_target_property(sources inference_engine_obj SOURCES)
|
||||
|
|
@ -367,5 +367,5 @@ function(ie_generate_plugins_hpp)
|
|||
endforeach()
|
||||
|
||||
# add dependency on header file generation for all inference_engine source files
|
||||
set_source_files_properties(${all_sources} PROPERTIES OBJECT_DEPENDS ${ie_plugins_hpp})
|
||||
set_source_files_properties(${all_sources} PROPERTIES OBJECT_DEPENDS ${ov_plugins_hpp})
|
||||
endfunction()
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@
|
|||
|
||||
#include "cpp_interfaces/interface/ie_iplugin_internal.hpp"
|
||||
|
||||
@IE_PLUGINS_DECLARATIONS@
|
||||
@OV_PLUGINS_DECLARATIONS@
|
||||
|
||||
struct Value {
|
||||
InferenceEngine::CreatePluginEngineFunc * m_create_plugin_func;
|
||||
|
|
@ -33,6 +33,6 @@ using PluginsStaticRegistry = std::map<Key, Value>;
|
|||
|
||||
|
||||
inline const std::map<Key, Value> getCompiledPluginsRegistry() {
|
||||
@IE_PLUGINS_MAP_DEFINITION@
|
||||
@OV_PLUGINS_MAP_DEFINITION@
|
||||
return plugins_hpp;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -169,9 +169,9 @@ ov_generate_dev_package_config()
|
|||
# with all imported developer targets
|
||||
register_extra_modules()
|
||||
|
||||
# for static libraries case we need to generate final ie_plugins.hpp
|
||||
# for static libraries case we need to generate final ov_plugins.hpp
|
||||
# with all the information about plugins
|
||||
ie_generate_plugins_hpp()
|
||||
ov_generate_plugins_hpp()
|
||||
|
||||
# used for static build
|
||||
ov_generate_frontends_hpp()
|
||||
|
|
|
|||
|
|
@ -36,15 +36,15 @@ if [ -e "$INSTALLDIR/runtime" ]; then
|
|||
export OpenVINO_DIR=$INSTALLDIR/runtime/cmake
|
||||
|
||||
system_type=$(ls "$INSTALLDIR/runtime/lib/")
|
||||
IE_PLUGINS_PATH=$INSTALLDIR/runtime/lib/$system_type
|
||||
OV_PLUGINS_PATH=$INSTALLDIR/runtime/lib/$system_type
|
||||
|
||||
if [[ "$OSTYPE" == "darwin"* ]]; then
|
||||
export DYLD_LIBRARY_PATH=${IE_PLUGINS_PATH}/Release:${IE_PLUGINS_PATH}/Debug${DYLD_LIBRARY_PATH:+:$DYLD_LIBRARY_PATH}
|
||||
export LD_LIBRARY_PATH=${IE_PLUGINS_PATH}/Release:${IE_PLUGINS_PATH}/Debug${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
|
||||
export PKG_CONFIG_PATH=${IE_PLUGINS_PATH}/Release/pkgconfig${PKG_CONFIG_PATH:+:$PKG_CONFIG_PATH}
|
||||
export DYLD_LIBRARY_PATH=${OV_PLUGINS_PATH}/Release:${OV_PLUGINS_PATH}/Debug${DYLD_LIBRARY_PATH:+:$DYLD_LIBRARY_PATH}
|
||||
export LD_LIBRARY_PATH=${OV_PLUGINS_PATH}/Release:${OV_PLUGINS_PATH}/Debug${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
|
||||
export PKG_CONFIG_PATH=${OV_PLUGINS_PATH}/Release/pkgconfig${PKG_CONFIG_PATH:+:$PKG_CONFIG_PATH}
|
||||
else
|
||||
export LD_LIBRARY_PATH=${IE_PLUGINS_PATH}${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
|
||||
export PKG_CONFIG_PATH=$IE_PLUGINS_PATH/pkgconfig${PKG_CONFIG_PATH:+:$PKG_CONFIG_PATH}
|
||||
export LD_LIBRARY_PATH=${OV_PLUGINS_PATH}${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
|
||||
export PKG_CONFIG_PATH=$OV_PLUGINS_PATH/pkgconfig${PKG_CONFIG_PATH:+:$PKG_CONFIG_PATH}
|
||||
fi
|
||||
|
||||
if [ -e "$INSTALLDIR/runtime/3rdparty/tbb" ]; then
|
||||
|
|
|
|||
|
|
@ -24,12 +24,9 @@ endif()
|
|||
# Create named folders for the sources within the .vcproj
|
||||
# Empty name lists them directly under the .vcproj
|
||||
|
||||
set(MIXED_SRC
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/src/file_util.cpp")
|
||||
|
||||
set_property(SOURCE ${MIXED_SRC}
|
||||
APPEND PROPERTY INCLUDE_DIRECTORIES
|
||||
$<TARGET_PROPERTY:ngraph_obj,INTERFACE_INCLUDE_DIRECTORIES>)
|
||||
set_source_files_properties(
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/src/file_util.cpp"
|
||||
PROPERTIES COMPILE_DEFINITIONS OpenVINO_VERSION="${OpenVINO_VERSION}")
|
||||
|
||||
source_group("src" FILES ${LIBRARY_SRC})
|
||||
source_group("include" FILES ${PUBLIC_HEADERS})
|
||||
|
|
|
|||
|
|
@ -12,7 +12,6 @@
|
|||
#include <fstream>
|
||||
#include <sstream>
|
||||
|
||||
#include "openvino/core/version.hpp"
|
||||
#include "openvino/util/common_util.hpp"
|
||||
|
||||
#ifdef _WIN32
|
||||
|
|
@ -512,7 +511,7 @@ ov::util::FilePath ov::util::get_compiled_plugin_path(const std::string& plugin)
|
|||
|
||||
// 1. in openvino-X.Y.Z folder relative to libopenvino.so
|
||||
std::ostringstream str;
|
||||
str << "openvino-" << OPENVINO_VERSION_MAJOR << "." << OPENVINO_VERSION_MINOR << "." << OPENVINO_VERSION_PATCH;
|
||||
str << "openvino-" << OpenVINO_VERSION;
|
||||
const auto sub_folder = str.str();
|
||||
|
||||
std::string abs_file_path = ov::util::path_join({ov_library_path, sub_folder, plugin});
|
||||
|
|
|
|||
|
|
@ -152,7 +152,7 @@ target_include_directories(${TARGET_NAME}_obj SYSTEM PRIVATE
|
|||
|
||||
target_include_directories(${TARGET_NAME}_obj PRIVATE
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/src"
|
||||
# for static ie_plugins.hpp
|
||||
# for static ov_plugins.hpp
|
||||
"${CMAKE_CURRENT_BINARY_DIR}"
|
||||
# for ie_ir_version.hpp
|
||||
$<$<TARGET_EXISTS:inference_engine_ir_v7_reader>:$<TARGET_PROPERTY:inference_engine_ir_v7_reader,SOURCE_DIR>>
|
||||
|
|
|
|||
|
|
@ -9,7 +9,6 @@
|
|||
#include "dev/converter_utils.hpp"
|
||||
#include "dev/core_impl.hpp"
|
||||
#include "ie_itt.hpp"
|
||||
#include "ie_plugins.hpp"
|
||||
#include "openvino/runtime/device_id_parser.hpp"
|
||||
#include "so_extension.hpp"
|
||||
|
||||
|
|
|
|||
|
|
@ -36,6 +36,7 @@
|
|||
#include "openvino/util/common_util.hpp"
|
||||
#include "openvino/util/file_util.hpp"
|
||||
#include "openvino/util/shared_object.hpp"
|
||||
#include "ov_plugins.hpp"
|
||||
#include "preprocessing/preprocessing.hpp"
|
||||
#include "xml_parse_utils.h"
|
||||
|
||||
|
|
@ -316,12 +317,12 @@ void ov::CoreImpl::register_compile_time_plugins() {
|
|||
std::lock_guard<std::mutex> lock(get_mutex());
|
||||
|
||||
const decltype(::getCompiledPluginsRegistry())& plugins = getCompiledPluginsRegistry();
|
||||
#ifdef OPENVINO_STATIC_LIBRARY
|
||||
for (const auto& plugin : plugins) {
|
||||
const auto& deviceName = plugin.first;
|
||||
if (deviceName.find('.') != std::string::npos) {
|
||||
OPENVINO_THROW("Device name must not contain dot '.' symbol");
|
||||
}
|
||||
#ifdef OPENVINO_STATIC_LIBRARY
|
||||
if (pluginRegistry.find(deviceName) == pluginRegistry.end()) {
|
||||
const auto& value = plugin.second;
|
||||
ov::AnyMap config = any_copy(value.m_default_config);
|
||||
|
|
@ -329,20 +330,16 @@ void ov::CoreImpl::register_compile_time_plugins() {
|
|||
pluginRegistry[deviceName] = desc;
|
||||
add_mutex(deviceName);
|
||||
}
|
||||
}
|
||||
#else
|
||||
for (const auto& plugin : plugins) {
|
||||
const auto& deviceName = plugin.first;
|
||||
const auto& pluginPath = ov::util::get_compiled_plugin_path(plugin.second.m_plugin_path);
|
||||
|
||||
if (pluginRegistry.find(deviceName) == pluginRegistry.end() && ov::util::file_exists(pluginPath)) {
|
||||
ov::AnyMap config = any_copy(plugin.second.m_default_config);
|
||||
PluginDescriptor desc{pluginPath, config};
|
||||
pluginRegistry[deviceName] = desc;
|
||||
add_mutex(deviceName);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
void ov::CoreImpl::register_plugins_in_registry(const std::string& xml_config_file, const bool& by_abs_path) {
|
||||
|
|
|
|||
|
|
@ -15,7 +15,6 @@
|
|||
#include "ie_cache_manager.hpp"
|
||||
#include "ie_extension.h"
|
||||
#include "ie_icore.hpp"
|
||||
#include "ie_plugins.hpp"
|
||||
#include "multi-device/multi_device_config.hpp"
|
||||
#include "openvino/core/any.hpp"
|
||||
#include "openvino/core/extension.hpp"
|
||||
|
|
@ -23,7 +22,6 @@
|
|||
#include "openvino/runtime/common.hpp"
|
||||
#include "openvino/runtime/icompiled_model.hpp"
|
||||
#include "openvino/runtime/threading/executor_manager.hpp"
|
||||
#include "openvino/util/file_util.hpp"
|
||||
|
||||
namespace ov {
|
||||
|
||||
|
|
|
|||
|
|
@ -30,7 +30,6 @@
|
|||
#include "ie_network_reader.hpp"
|
||||
#include "ie_ngraph_utils.hpp"
|
||||
#include "ie_plugin_config.hpp"
|
||||
#include "ie_plugins.hpp"
|
||||
#include "ie_remote_context.hpp"
|
||||
#include "ngraph/graph_util.hpp"
|
||||
#include "ngraph/ngraph.hpp"
|
||||
|
|
|
|||
|
|
@ -11,9 +11,6 @@ ov_add_test_target(
|
|||
template_extension
|
||||
LINK_LIBRARIES
|
||||
unitTestUtils
|
||||
INCLUDES
|
||||
# for static ie_plugins.hpp
|
||||
"${CMAKE_BINARY_DIR}/src/inference/"
|
||||
ADD_CLANG_FORMAT
|
||||
LABELS
|
||||
OV
|
||||
|
|
|
|||
Loading…
Reference in New Issue