[FrontEnd] Rename all frontends from "*_ngraph_frontend*" to "_ov_frontend*" (#8645)

* Renaming all frontends from "*_ngraph_frontend*" to "_ov_frontend*"

Also Debug builds on Windows release frontends without "d" suffix will not be loaded

* Fix review comments and add wheels test debug prints

* More debug prints

* Load by absolute path and remove debug prints
This commit is contained in:
Mikhail Nosov 2021-11-18 09:26:13 +03:00 committed by GitHub
parent 517cf8dff6
commit 2245ea8be2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
52 changed files with 146 additions and 138 deletions

View File

@ -115,17 +115,20 @@ function(ie_add_plugin)
# fake dependencies to build in the following order:
# IE -> IE readers -> IE inference plugins -> IE-based apps
if(BUILD_SHARED_LIBS)
if(TARGET ir_ngraph_frontend)
add_dependencies(${IE_PLUGIN_NAME} ir_ngraph_frontend)
if(TARGET ir_ov_frontend)
add_dependencies(${IE_PLUGIN_NAME} ir_ov_frontend)
endif()
if(TARGET inference_engine_ir_v7_reader)
add_dependencies(${IE_PLUGIN_NAME} inference_engine_ir_v7_reader)
endif()
if(TARGET onnx_ngraph_frontend)
add_dependencies(${IE_PLUGIN_NAME} onnx_ngraph_frontend)
if(TARGET onnx_ov_frontend)
add_dependencies(${IE_PLUGIN_NAME} onnx_ov_frontend)
endif()
if(TARGET paddlepaddle_ngraph_frontend)
add_dependencies(${IE_PLUGIN_NAME} paddlepaddle_ngraph_frontend)
if(TARGET paddlepaddle_ov_frontend)
add_dependencies(${IE_PLUGIN_NAME} paddlepaddle_ov_frontend)
endif()
if(TARGET tensorflow_ov_frontend)
add_dependencies(${IE_PLUGIN_NAME} tensorflow_ov_frontend)
endif()
endif()

View File

@ -28,11 +28,11 @@
#
# ngraph::frontend_manager - nGraph frontend manager
#
# ngraph_onnx_ngraph_frontend_FOUND - True if the system has onnx_ngraph_frontend library
# ngraph::onnx_ngraph_frontend - ONNX FrontEnd target (optional)
# ngraph_onnx_ov_frontend_FOUND - True if the system has onnx_ov_frontend library
# ngraph::onnx_ov_frontend - ONNX FrontEnd target (optional)
#
# ngraph_paddlepaddle_frontend_FOUND - True if the system has PDPD frontend
# ngraph::paddlepaddle_ngraph_frontend - nGraph PDPD frontend (optional)
# ngraph::paddlepaddle_ov_frontend - nGraph PDPD frontend (optional)
#
@PACKAGE_INIT@
@ -58,38 +58,38 @@ if(TARGET openvino::frontend::manager AND NOT TARGET ngraph::frontend_manager)
INTERFACE_LINK_LIBRARIES openvino::frontend::manager)
endif()
if(TARGET openvino::frontend::onnx AND NOT TARGET ngraph::onnx_ngraph_frontend)
add_library(ngraph::onnx_ngraph_frontend INTERFACE IMPORTED)
set_target_properties(ngraph::onnx_ngraph_frontend PROPERTIES
if(TARGET openvino::frontend::onnx AND NOT TARGET ngraph::onnx_ov_frontend)
add_library(ngraph::onnx_ov_frontend INTERFACE IMPORTED)
set_target_properties(ngraph::onnx_ov_frontend PROPERTIES
INTERFACE_LINK_LIBRARIES openvino::frontend::onnx)
endif()
if(TARGET openvino::frontend::paddlepaddle AND NOT TARGET ngraph::paddlepaddle_ngraph_frontend)
add_library(ngraph::paddlepaddle_ngraph_frontend INTERFACE IMPORTED)
set_target_properties(ngraph::paddlepaddle_ngraph_frontend PROPERTIES
if(TARGET openvino::frontend::paddlepaddle AND NOT TARGET ngraph::paddlepaddle_ov_frontend)
add_library(ngraph::paddlepaddle_ov_frontend INTERFACE IMPORTED)
set_target_properties(ngraph::paddlepaddle_ov_frontend PROPERTIES
INTERFACE_LINK_LIBRARIES openvino::frontend::paddlepaddle)
endif()
if(TARGET openvino::frontend::tensorflow AND NOT TARGET ngraph::tensorflow_ngraph_frontend)
add_library(ngraph::tensorflow_ngraph_frontend INTERFACE IMPORTED)
set_target_properties(ngraph::tensorflow_ngraph_frontend PROPERTIES
if(TARGET openvino::frontend::tensorflow AND NOT TARGET ngraph::tensorflow_ov_frontend)
add_library(ngraph::tensorflow_ov_frontend INTERFACE IMPORTED)
set_target_properties(ngraph::tensorflow_ov_frontend PROPERTIES
INTERFACE_LINK_LIBRARIES openvino::frontend::tensorflow)
endif()
set(ngraph_ngraph_FOUND ON)
set(NGRAPH_LIBRARIES ngraph::ngraph)
set(ngraph_onnx_ngraph_frontend_FOUND ${OpenVINO_Frontend_ONNX_FOUND})
set(ngraph_onnx_ov_frontend_FOUND ${OpenVINO_Frontend_ONNX_FOUND})
set(ngraph_onnx_importer_FOUND ${OpenVINO_Frontend_ONNX_FOUND})
if(ngraph_onnx_importer_FOUND)
set(ONNX_IMPORTER_LIBRARIES ngraph::onnx_ngraph_frontend)
set(ONNX_IMPORTER_LIBRARIES ngraph::onnx_ov_frontend)
# ngraph::onnx_importer target and variables are deprecated
# but need to create a dummy target for BW compatibility
if(NOT TARGET ngraph::onnx_importer)
add_library(ngraph::onnx_importer INTERFACE IMPORTED)
set_target_properties(ngraph::onnx_importer PROPERTIES
INTERFACE_LINK_LIBRARIES ngraph::onnx_ngraph_frontend)
INTERFACE_LINK_LIBRARIES ngraph::onnx_ov_frontend)
endif()
endif()

View File

@ -40,13 +40,13 @@ This library contains the classes to:
Starting from 2022.1 release, OpenVINO Runtime introduced a concept of frontend plugins. Such plugins can be automatically dynamically loaded by OpenVINO Runtime dynamically depending on file format:
* Linux* OS:
- `libir_ngraph_frontend.so` to read a network from IR
- `libpaddlepaddle_ngraph_frontend.so` to read a network from PaddlePaddle model format
- `libonnx_ngraph_frontend.so` to read a network from ONNX model format
- `libir_ov_frontend.so` to read a network from IR
- `libpaddlepaddle_ov_frontend.so` to read a network from PaddlePaddle model format
- `libonnx_ov_frontend.so` to read a network from ONNX model format
* Windows* OS:
- `ir_ngraph_frontend.dll` to read a network from IR
- `paddlepaddle_ngraph_frontend.dll` to read a network from PaddlePaddle model format
- `onnx_ngraph_frontend.dll` to read a network from ONNX model format
- `ir_ov_frontend.dll` to read a network from IR
- `paddlepaddle_ov_frontend.dll` to read a network from PaddlePaddle model format
- `onnx_ov_frontend.dll` to read a network from ONNX model format
### Device-Specific Plugin Libraries

View File

@ -62,7 +62,7 @@ The example below demonstrates how to unregister an operator from the destructor
## Requirements for Building with CMake
A program that uses the `register_operator` functionality requires `openvino::core` and `openvino::frontend::onnx` libraries in addition to the OpenVINO Inference Runtime.
The `onnx_ngraph_frontend` is a component of the `OpenVINO` package , so `find_package(OpenVINO REQUIRED COMPONENTS ONNX)` can find both.
The `onnx_ov_frontend` is a component of the `OpenVINO` package , so `find_package(OpenVINO REQUIRED COMPONENTS ONNX)` can find both.
Those libraries need to be passed to the `target_link_libraries` command in the CMakeLists.txt file.
See CMakeLists.txt below for reference:

View File

@ -45,13 +45,13 @@ This library contains the classes to:
Starting from 2022.1 release, OpenVINO Runtime introduced a concept of frontend plugins. Such plugins can be automatically dynamically loaded by OpenVINO Runtime dynamically depending on file format:
* Unix* OS:
- `libir_ngraph_frontend.so` to read a network from IR
- `libpaddlepaddle_ngraph_frontend.so` to read a network from PaddlePaddle model format
- `libonnx_ngraph_frontend.so` to read a network from ONNX model format
- `libir_ov_frontend.so` to read a network from IR
- `libpaddlepaddle_ov_frontend.so` to read a network from PaddlePaddle model format
- `libonnx_ov_frontend.so` to read a network from ONNX model format
* Windows* OS:
- `ir_ngraph_frontend.dll` to read a network from IR
- `paddlepaddle_ngraph_frontend.dll` to read a network from PaddlePaddle model format
- `onnx_ngraph_frontend.dll` to read a network from ONNX model format
- `ir_ov_frontend.dll` to read a network from IR
- `paddlepaddle_ov_frontend.dll` to read a network from PaddlePaddle model format
- `onnx_ov_frontend.dll` to read a network from ONNX model format
### Device-specific Plugin Libraries ###

View File

@ -46,7 +46,7 @@ if(OpenCV_FOUND)
endif()
if(NGRAPH_ONNX_FRONTEND_ENABLE)
target_link_libraries(${TARGET_NAME} PRIVATE onnx_ngraph_frontend)
target_link_libraries(${TARGET_NAME} PRIVATE onnx_ov_frontend)
endif()
if(NOT MSVC)

View File

@ -60,20 +60,20 @@ endif()
if(NGRAPH_IR_FRONTEND_ENABLE)
if(BUILD_SHARED_LIBS)
add_dependencies(ie_libraries ir_ngraph_frontend)
add_dependencies(ie_libraries ir_ov_frontend)
endif()
# use this one once CVS-69781 is fixed
# add_dependencies(inference_engine ir_ngraph_frontend)
# add_dependencies(inference_engine ir_ov_frontend)
endif()
if(NGRAPH_ONNX_FRONTEND_ENABLE)
add_dependencies(inference_engine onnx_ngraph_frontend)
add_dependencies(inference_engine onnx_ov_frontend)
endif()
if(NGRAPH_PDPD_FRONTEND_ENABLE)
add_dependencies(inference_engine paddlepaddle_ngraph_frontend)
add_dependencies(inference_engine paddlepaddle_ov_frontend)
endif()
if(NGRAPH_TF_FRONTEND_ENABLE)
add_dependencies(inference_engine tensorflow_ngraph_frontend)
add_dependencies(inference_engine tensorflow_ov_frontend)
endif()

View File

@ -33,7 +33,7 @@ set(DEPENDENCIES
)
if(NGRAPH_IR_FRONTEND_ENABLE)
list(APPEND DEPENDENCIES ir_ngraph_frontend)
list(APPEND DEPENDENCIES ir_ov_frontend)
endif()
if(ENABLE_IR_V7_READER)
@ -74,13 +74,13 @@ if(NGRAPH_ONNX_FRONTEND_ENABLE)
target_compile_definitions(${TARGET_NAME} PRIVATE
NGRAPH_ONNX_FRONTEND_ENABLE
ONNX_TEST_MODELS="${TEST_MODEL_ZOO}/onnx_reader/models/")
add_dependencies(${TARGET_NAME} onnx_ngraph_frontend)
add_dependencies(${TARGET_NAME} onnx_ov_frontend)
endif()
if(NGRAPH_PDPD_FRONTEND_ENABLE)
target_compile_definitions(${TARGET_NAME} PRIVATE
PADDLE_TEST_MODELS="${CMAKE_CURRENT_SOURCE_DIR}/paddle_reader/models/")
add_dependencies(${TARGET_NAME} paddlepaddle_ngraph_frontend)
add_dependencies(${TARGET_NAME} paddlepaddle_ov_frontend)
endif()
ie_faster_build(${TARGET_NAME}

View File

@ -11,7 +11,7 @@ addIeTargetTest(
${CMAKE_CURRENT_SOURCE_DIR}/include
$<TARGET_PROPERTY:inference_engine,INTERFACE_INCLUDE_DIRECTORIES>
DEPENDENCIES
ir_ngraph_frontend
ir_ov_frontend
LINK_LIBRARIES
PRIVATE
gflags

View File

@ -18,7 +18,7 @@ endif()
# remove once CVS-69781 is fixed
if(NGRAPH_IR_FRONTEND_ENABLE)
list(APPEND DEPENDENCIES ir_ngraph_frontend)
list(APPEND DEPENDENCIES ir_ov_frontend)
endif()
if (NGRAPH_ONNX_FRONTEND_ENABLE)

View File

@ -11,7 +11,7 @@ addIeTargetTest(
gtest
gtest_main
commonTestUtils
onnx_ngraph_frontend
onnx_ov_frontend
openvino::util
DEFINES
ONNX_MODELS_DIR=\"${TEST_MODEL_ZOO}/onnx_import\"

View File

@ -4,10 +4,10 @@
if(NOT ENABLE_PYTHON)
message(WARNING "Please enable IE & nGraph Python API (ie_api and offline_transformations_api) targets to enable Model Optimizer target")
else()
add_custom_target(model_optimizer DEPENDS ie_api offline_transformations_api ir_ngraph_frontend)
add_custom_target(model_optimizer DEPENDS ie_api offline_transformations_api ir_ov_frontend)
if(ENABLE_TESTS)
add_subdirectory(unit_tests/mock_mo_frontend/mock_mo_ngraph_frontend)
add_dependencies(model_optimizer mock_mo_ngraph_frontend)
add_subdirectory(unit_tests/mock_mo_frontend/mock_mo_ov_frontend)
add_dependencies(model_optimizer mock_mo_ov_frontend)
add_subdirectory(unit_tests/mock_mo_frontend/mock_mo_python_api)
add_dependencies(model_optimizer mock_mo_python_api)

View File

@ -91,7 +91,7 @@ class TestMainFrontend(unittest.TestCase):
def test_simple_convert(self, mock_argparse):
f = io.StringIO()
with redirect_stdout(f):
main(argparse.ArgumentParser(), fem, 'mock_mo_ngraph_frontend')
main(argparse.ArgumentParser(), fem, 'mock_mo_ov_frontend')
out = f.getvalue()
xml_file = re.search(r'\[ SUCCESS \] XML file: (.*)', out).\
@ -106,7 +106,7 @@ class TestMainFrontend(unittest.TestCase):
assert stat.supported == 0
# verify that meta info is added to XML file
with open(xml_file) as file:
assert 'mock_mo_ngraph_frontend' in file.read()
assert 'mock_mo_ov_frontend' in file.read()
@mock_needed
@patch('argparse.ArgumentParser.parse_args',
@ -131,14 +131,14 @@ class TestMainFrontend(unittest.TestCase):
# verify that meta info is added to XML file
with open(xml_file) as file:
assert 'mock_mo_ngraph_frontend' in file.read()
assert 'mock_mo_ov_frontend' in file.read()
@mock_needed
@patch('argparse.ArgumentParser.parse_args',
return_value=replaceArgsHelper(_input='newInput1,mock_input2'))
def test_override_inputs(self, mock_argparse):
main(argparse.ArgumentParser(), fem, 'mock_mo_ngraph_frontend')
main(argparse.ArgumentParser(), fem, 'mock_mo_ov_frontend')
stat = get_model_statistic()
# verify that 'override_all_inputs' was called
@ -150,7 +150,7 @@ class TestMainFrontend(unittest.TestCase):
@patch('argparse.ArgumentParser.parse_args',
return_value=replaceArgsHelper(output='newOut1,mock_output2'))
def test_override_outputs(self, mock_argparse):
main(argparse.ArgumentParser(), fem, 'mock_mo_ngraph_frontend')
main(argparse.ArgumentParser(), fem, 'mock_mo_ov_frontend')
stat = get_model_statistic()
# verify that 'override_all_outputs' was called
@ -163,7 +163,7 @@ class TestMainFrontend(unittest.TestCase):
return_value=replaceArgsHelper(_input='newIn1,newIn2',
output='newOut1,newOut2'))
def test_extract_subgraph(self, mock_argparse):
main(argparse.ArgumentParser(), fem, 'mock_mo_ngraph_frontend')
main(argparse.ArgumentParser(), fem, 'mock_mo_ov_frontend')
stat = get_model_statistic()
# verify that 'extract_subgraph' was called
@ -177,7 +177,7 @@ class TestMainFrontend(unittest.TestCase):
output='new_output2,mock_output1'))
def test_override_same_inputs(self, mock_argparse):
main(argparse.ArgumentParser(), fem, 'mock_mo_ngraph_frontend')
main(argparse.ArgumentParser(), fem, 'mock_mo_ov_frontend')
stat = get_model_statistic()
# verify that 'override_all_outputs' was called
@ -192,7 +192,7 @@ class TestMainFrontend(unittest.TestCase):
output='mock_output2,mock_output1'))
def test_override_same_outputs(self, mock_argparse):
main(argparse.ArgumentParser(), fem, 'mock_mo_ngraph_frontend')
main(argparse.ArgumentParser(), fem, 'mock_mo_ov_frontend')
stat = get_model_statistic()
# verify that 'override_all_inputs' was called
@ -206,7 +206,7 @@ class TestMainFrontend(unittest.TestCase):
return_value=replaceArgsHelper(_input='newIn1',
input_shape='[1,2,3,4]'))
def test_input_shape(self, mock_argparse):
main(argparse.ArgumentParser(), fem, 'mock_mo_ngraph_frontend')
main(argparse.ArgumentParser(), fem, 'mock_mo_ov_frontend')
stat = get_model_statistic()
# verify that 'set_partial_shape' was called
@ -217,7 +217,7 @@ class TestMainFrontend(unittest.TestCase):
@patch('argparse.ArgumentParser.parse_args',
return_value=replaceArgsHelper(_input='newIn1{i8}'))
def test_element_type(self, mock_argparse):
main(argparse.ArgumentParser(), fem, 'mock_mo_ngraph_frontend')
main(argparse.ArgumentParser(), fem, 'mock_mo_ov_frontend')
stat = get_model_statistic()
# verify that 'set_element_type' was called
@ -229,7 +229,7 @@ class TestMainFrontend(unittest.TestCase):
return_value=replaceArgsHelper(batch=123))
def test_set_batch_size(self, mock_argparse):
mock_return_partial_shape(PartialShape([-1, 2, 3, 4]))
main(argparse.ArgumentParser(), fem, 'mock_mo_ngraph_frontend')
main(argparse.ArgumentParser(), fem, 'mock_mo_ov_frontend')
stat = get_model_statistic()
# verify that 'set_element_type' was called
@ -246,7 +246,7 @@ class TestMainFrontend(unittest.TestCase):
# so MO shall not convert anything and produce specified error
mock_return_partial_shape(PartialShape([122, 2, 3, 4]))
with self.assertLogs() as logger:
main(argparse.ArgumentParser(), fem, 'mock_mo_ngraph_frontend')
main(argparse.ArgumentParser(), fem, 'mock_mo_ov_frontend')
stat = get_model_statistic()

View File

@ -42,7 +42,7 @@ class TestMainFrontend(unittest.TestCase):
clear_place_statistic()
clear_setup()
set_max_port_counts(10, 10)
self.fe = fem.load_by_framework('mock_mo_ngraph_frontend')
self.fe = fem.load_by_framework('mock_mo_ov_frontend')
self.model = self.fe.load('abc.bin')
# Mock model has 'tensor' tensor place

View File

@ -2,7 +2,7 @@
# SPDX-License-Identifier: Apache-2.0
#
set(TARGET_FE_NAME "mock_mo_ngraph_frontend")
set(TARGET_FE_NAME "mock_mo_ov_frontend")
file(GLOB_RECURSE LIBRARY_SRC ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp)
file(GLOB_RECURSE LIBRARY_HEADERS ${CMAKE_CURRENT_SOURCE_DIR}/*.hpp)

View File

@ -29,7 +29,7 @@ extern "C" MOCK_API FrontEndVersion GetAPIVersion()
extern "C" MOCK_API void* GetFrontEndData()
{
FrontEndPluginInfo* res = new FrontEndPluginInfo();
res->m_name = "mock_mo_ngraph_frontend";
res->m_name = "mock_mo_ov_frontend";
res->m_creator = []() { return std::make_shared<FrontEndMockPy>(); };
return res;

View File

@ -9,11 +9,11 @@
#include "ngraph/visibility.hpp"
// Defined if we are building the plugin DLL (instead of using it)
#ifdef mock_mo_ngraph_frontend_EXPORTS
#ifdef mock_mo_ov_frontend_EXPORTS
#define MOCK_API OPENVINO_CORE_EXPORTS
#else
#define MOCK_API OPENVINO_CORE_IMPORTS
#endif // mock_mo_ngraph_frontend_EXPORTS
#endif // mock_mo_ov_frontend_EXPORTS
// OK to have 'using' in mock header
@ -450,6 +450,6 @@ private:
std::string get_name() const override
{
m_stat.m_get_name++;
return "mock_mo_ngraph_frontend";
return "mock_mo_ov_frontend";
}
};

View File

@ -21,7 +21,7 @@ set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${PYTHON_BRIDGE_OUTPUT_DIRECTORY})
set(CMAKE_COMPILE_PDB_OUTPUT_DIRECTORY ${PYTHON_BRIDGE_OUTPUT_DIRECTORY})
set(CMAKE_PDB_OUTPUT_DIRECTORY ${PYTHON_BRIDGE_OUTPUT_DIRECTORY})
set(TARGET_FE_NAME "mock_mo_ngraph_frontend")
set(TARGET_FE_NAME "mock_mo_ov_frontend")
set(PYBIND_FE_NAME "mock_mo_python_api")
set(PYBIND_FE_SRC ${CMAKE_CURRENT_SOURCE_DIR}/mock_mo_python_api.cpp)

View File

@ -5,7 +5,7 @@
#include <pybind11/pybind11.h>
#include <pybind11/stl.h>
#include "../mock_mo_ngraph_frontend/mock_mo_frontend.hpp"
#include "../mock_mo_ov_frontend/mock_mo_frontend.hpp"
namespace py = pybind11;
using namespace ngraph;

View File

@ -3,6 +3,7 @@
#
set(FRONTEND_INSTALL_INCLUDE "runtime/include/ngraph/frontend")
set(FRONTEND_NAME_SUFFIX "_ov_frontend")
add_subdirectory(frontend_manager)

View File

@ -33,6 +33,10 @@ target_include_directories(${TARGET_NAME} PUBLIC
$<INSTALL_INTERFACE:${FRONTEND_INSTALL_INCLUDE}>)
target_include_directories(${TARGET_NAME} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src)
target_link_libraries(${TARGET_NAME} PRIVATE ${CMAKE_DL_LIBS} openvino::util PUBLIC ngraph)
set_property(SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/src/plugin_loader.cpp APPEND PROPERTY COMPILE_DEFINITIONS
FRONTEND_LIB_PREFIX="${CMAKE_SHARED_LIBRARY_PREFIX}"
FRONTEND_LIB_SUFFIX="${FRONTEND_NAME_SUFFIX}${IE_BUILD_POSTFIX}${CMAKE_SHARED_LIBRARY_SUFFIX}"
)
add_clang_format_target(${TARGET_NAME}_clang FOR_TARGETS ${TARGET_NAME})

View File

@ -30,7 +30,7 @@ using namespace ov::frontend;
# define DLOPEN(file_str) LoadLibrary(TEXT(file_str.c_str()))
# define DLSYM(obj, func) GetProcAddress(obj, func)
# define DLCLOSE(obj) FreeLibrary(obj)
# define DLERROR() ""
# define DLERROR() std::to_string(GetLastError())
#else
# define DLOPEN(file_str) dlopen(file_str.c_str(), RTLD_LAZY)
# define DLSYM(obj, func) dlsym(obj, func)
@ -43,20 +43,16 @@ static std::vector<std::string> list_files(const std::string& path) {
NGRAPH_SUPPRESS_DEPRECATED_START
std::vector<std::string> res;
try {
auto prefix = std::string(FRONTEND_LIB_PREFIX);
auto suffix = std::string(FRONTEND_LIB_SUFFIX);
ov::util::iterate_files(
path,
[&res](const std::string& file, bool is_dir) {
if (!is_dir && file.find("_ngraph_frontend") != std::string::npos) {
#ifdef _WIN32
std::string ext = ".dll";
#elif defined(__APPLE__)
std::string ext = ".dylib";
#else
std::string ext = ".so";
#endif
if (file.find(ext) != std::string::npos) {
res.push_back(file);
}
[&res, &prefix, &suffix](const std::string& file_path, bool is_dir) {
auto file = ov::util::get_file_name(file_path);
if (!is_dir && (prefix.empty() || file.compare(0, prefix.length(), prefix) == 0) &&
file.length() > suffix.length() &&
file.rfind(suffix) == (file.length() - std::string(suffix).length())) {
res.push_back(file_path);
}
},
// ilavreno: this is current solution for static runtime

View File

@ -2,7 +2,7 @@
# SPDX-License-Identifier: Apache-2.0
#
set(TARGET_NAME "ir_ngraph_frontend")
set(TARGET_NAME "ir_ov_frontend")
file(GLOB_RECURSE LIBRARY_SRC ${CMAKE_CURRENT_SOURCE_DIR}/src/*.cpp)
file(GLOB_RECURSE LIBRARY_HEADERS ${CMAKE_CURRENT_SOURCE_DIR}/src/*.hpp)

View File

@ -4,12 +4,14 @@
#pragma once
#include <openvino/core/visibility.hpp>
// Defined if we are building the plugin DLL (instead of using it)
#ifdef ir_ngraph_frontend_EXPORTS
#ifdef ir_ov_frontend_EXPORTS
# define IR_API OPENVINO_CORE_EXPORTS
#else
# define IR_API OPENVINO_CORE_IMPORTS
#endif // ir_ngraph_frontend_EXPORTS
#endif // ir_ov_frontend_EXPORTS
#define IR_ASSERT(ex, msg) \
{ \

View File

@ -2,7 +2,7 @@
# SPDX-License-Identifier: Apache-2.0
#
set(TARGET_NAME onnx_ngraph_frontend)
set(TARGET_NAME onnx_ov_frontend)
set(ONNX_OPSET_VERSION 13 CACHE INTERNAL "Supported version of ONNX operator set")
set(ONNX_FRONTEND_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/include)

View File

@ -6,7 +6,7 @@
#include <frontend_manager/frontend.hpp>
#ifdef onnx_ngraph_frontend_EXPORTS
#ifdef onnx_ov_frontend_EXPORTS
# define ONNX_FRONTEND_API OPENVINO_CORE_EXPORTS
#else
# define ONNX_FRONTEND_API OPENVINO_CORE_IMPORTS

View File

@ -4,7 +4,7 @@
#include "ngraph/visibility.hpp"
#ifdef onnx_ngraph_frontend_EXPORTS
#ifdef onnx_ov_frontend_EXPORTS
# define ONNX_IMPORTER_API OPENVINO_CORE_EXPORTS
#else
# define ONNX_IMPORTER_API OPENVINO_CORE_IMPORTS

View File

@ -2,7 +2,7 @@
# SPDX-License-Identifier: Apache-2.0
#
set(TARGET_NAME "paddlepaddle_ngraph_frontend")
set(TARGET_NAME "paddlepaddle_ov_frontend")
file(GLOB_RECURSE LIBRARY_SRC ${CMAKE_CURRENT_SOURCE_DIR}/src/*.cpp)
file(GLOB_RECURSE LIBRARY_HEADERS ${CMAKE_CURRENT_SOURCE_DIR}/src/*.hpp)
@ -51,7 +51,7 @@ set_source_files_properties(${PROTO_SRCS} ${PROTO_HDRS} PROPERTIES COMPILE_OPTIO
add_library(${TARGET_NAME} SHARED ${LIBRARY_SRC} ${LIBRARY_HEADERS} ${LIBRARY_PUBLIC_HEADERS} ${PROTO_SRCS} ${PROTO_HDRS})
add_library(openvino::frontend::paddlepaddle ALIAS ${TARGET_NAME})
add_dependencies(${TARGET_NAME} paddlepaddle_ngraph_frontend_proto)
add_dependencies(${TARGET_NAME} ${TARGET_NAME}_proto)
ov_ncc_naming_style(FOR_TARGET ${TARGET_NAME}
INCLUDE_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/include"

View File

@ -7,11 +7,11 @@
#include <frontend_manager/frontend_manager.hpp>
// Defined if we are building the plugin DLL (instead of using it)
#ifdef paddlepaddle_ngraph_frontend_EXPORTS
#ifdef paddlepaddle_ov_frontend_EXPORTS
# define PDPD_API OPENVINO_CORE_EXPORTS
#else
# define PDPD_API OPENVINO_CORE_IMPORTS
#endif // paddlepaddle_ngraph_frontend_EXPORTS
#endif // paddlepaddle_ov_frontend_EXPORTS
#define PDPD_ASSERT(ex, msg) \
{ \

View File

@ -2,7 +2,7 @@
# SPDX-License-Identifier: Apache-2.0
#
set(TARGET_NAME "tensorflow_ngraph_frontend")
set(TARGET_NAME "tensorflow_ov_frontend")
file(GLOB_RECURSE LIBRARY_SRC ${CMAKE_CURRENT_SOURCE_DIR}/src/*.cpp)
file(GLOB_RECURSE LIBRARY_HEADERS ${CMAKE_CURRENT_SOURCE_DIR}/src/*.hpp)
@ -51,7 +51,7 @@ set_source_files_properties(${PROTO_SRCS} ${PROTO_HDRS} PROPERTIES COMPILE_OPTIO
add_library(${TARGET_NAME} SHARED ${LIBRARY_SRC} ${LIBRARY_HEADERS} ${LIBRARY_PUBLIC_HEADERS} ${PROTO_SRCS} ${PROTO_HDRS})
add_library(openvino::frontend::tensorflow ALIAS ${TARGET_NAME})
add_dependencies(${TARGET_NAME} tensorflow_ngraph_frontend_proto)
add_dependencies(${TARGET_NAME} ${TARGET_NAME}_proto)
ov_ncc_naming_style(FOR_TARGET ${TARGET_NAME}
INCLUDE_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/include"

View File

@ -6,8 +6,8 @@
#include "frontend_manager/frontend_exceptions.hpp"
#ifdef tensorflow_ngraph_frontend_EXPORTS
#ifdef tensorflow_ov_frontend_EXPORTS
# define TF_API OPENVINO_CORE_EXPORTS
#else
# define TF_API OPENVINO_CORE_IMPORTS
#endif // tensorflow_ngraph_frontend_EXPORTS
#endif // tensorflow_ov_frontend_EXPORTS

View File

@ -614,9 +614,9 @@ if (OV_COMPILER_IS_CLANG)
endif()
if (NGRAPH_ONNX_FRONTEND_ENABLE)
get_target_property(ONNX_FRONTEND_SRC_DIR onnx_ngraph_frontend SOURCE_DIR)
get_target_property(ONNX_FRONTEND_SRC_DIR onnx_ov_frontend SOURCE_DIR)
target_include_directories(unit-test PRIVATE ${ONNX_FRONTEND_SRC_DIR}/src)
target_link_libraries(unit-test PRIVATE onnx_ngraph_frontend onnx_test_util)
target_link_libraries(unit-test PRIVATE onnx_ov_frontend onnx_test_util)
if (LINUX)
target_link_options(unit-test PRIVATE -Wl,--exclude-libs,ALL)
elseif(APPLE)
@ -625,7 +625,7 @@ if (NGRAPH_ONNX_FRONTEND_ENABLE)
endif()
if(NGRAPH_IR_FRONTEND_ENABLE)
add_dependencies(unit-test ir_ngraph_frontend)
add_dependencies(unit-test ir_ov_frontend)
endif()
install(TARGETS unit-test

View File

@ -16,23 +16,24 @@ if (NGRAPH_TF_FRONTEND_ENABLE)
endif()
set(SRC ${CMAKE_CURRENT_SOURCE_DIR}/mock_frontend.cpp)
add_library(mock1_ngraph_frontend SHARED ${SRC})
set(MOCK1_FE_NAME mock1_ov_frontend)
add_library(${MOCK1_FE_NAME} SHARED ${SRC})
target_compile_definitions(mock1_ngraph_frontend PRIVATE "-DMOCK_VARIANT=\"1\"")
target_compile_definitions(${MOCK1_FE_NAME} PRIVATE "-DMOCK_VARIANT=\"1\"")
target_include_directories(mock1_ngraph_frontend PRIVATE ".")
target_include_directories(${MOCK1_FE_NAME} PRIVATE ".")
target_link_libraries(mock1_ngraph_frontend PRIVATE frontend_manager)
add_dependencies(unit-test mock1_ngraph_frontend)
target_link_libraries(${MOCK1_FE_NAME} PRIVATE frontend_manager)
add_dependencies(unit-test ${MOCK1_FE_NAME})
add_clang_format_target(mock1_ngraph_frontend_clang FOR_TARGETS mock1_ngraph_frontend)
add_clang_format_target(${MOCK1_FE_NAME}_clang FOR_TARGETS ${MOCK1_FE_NAME})
if(BUILD_SHARED_LIBS OR NOT WIN32)
install(TARGETS mock1_ngraph_frontend
install(TARGETS ${MOCK1_FE_NAME}
RUNTIME DESTINATION ${IE_CPACK_RUNTIME_PATH} COMPONENT tests EXCLUDE_FROM_ALL
LIBRARY DESTINATION ${IE_CPACK_LIBRARY_PATH} COMPONENT tests EXCLUDE_FROM_ALL)
else()
install(TARGETS mock1_ngraph_frontend
install(TARGETS ${MOCK1_FE_NAME}
RUNTIME DESTINATION tests COMPONENT tests EXCLUDE_FROM_ALL
LIBRARY DESTINATION tests COMPONENT tests EXCLUDE_FROM_ALL)
endif()

View File

@ -7,11 +7,11 @@
#include "ngraph/visibility.hpp"
// Defined if we are building the plugin DLL (instead of using it)
#ifdef mock1_ngraph_frontend_EXPORTS
#ifdef mock1_ov_frontend_EXPORTS
# define MOCK_API OPENVINO_CORE_EXPORTS
#else
# define MOCK_API OPENVINO_CORE_IMPORTS
#endif // mock1_ngraph_frontend_EXPORTS
#endif // mock1_ov_frontend_EXPORTS
using namespace ngraph;
using namespace ov::frontend;

View File

@ -22,5 +22,5 @@ target_compile_definitions(${TARGET_NAME} PRIVATE -D TEST_ONNX_MODELS_DIRNAME=\"
set(MANIFEST ${CMAKE_CURRENT_SOURCE_DIR}/unit_test.manifest)
target_compile_definitions(${TARGET_NAME} PRIVATE -D MANIFEST=\"${MANIFEST}\")
add_dependencies(${TARGET_NAME} onnx_ngraph_frontend)
add_dependencies(${TARGET_NAME} onnx_ov_frontend)
add_dependencies(${TARGET_NAME} test_model_zoo)

View File

@ -55,7 +55,7 @@ else()
endif()
add_dependencies(${TARGET_NAME} paddlepaddle_test_models)
add_dependencies(${TARGET_NAME} paddlepaddle_ngraph_frontend)
add_dependencies(${TARGET_NAME} paddlepaddle_ov_frontend)
# Fuzzy tests for PaddlePaddle use IE_CPU engine
if (ENABLE_MKL_DNN)

View File

@ -8,7 +8,7 @@ file(GLOB_RECURSE SRC ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp)
add_executable(${TARGET_NAME} ${SRC})
target_link_libraries(${TARGET_NAME} PRIVATE frontend_shared_test_classes tensorflow_ngraph_frontend)
target_link_libraries(${TARGET_NAME} PRIVATE frontend_shared_test_classes tensorflow_ov_frontend)
add_clang_format_target(${TARGET_NAME}_clang FOR_TARGETS ${TARGET_NAME})
@ -63,6 +63,7 @@ else()
endif()
add_dependencies(${TARGET_NAME} tensorflow_test_models)
add_dependencies(${TARGET_NAME} tensorflow_ov_frontend)
get_target_property(TENSORFLOW_FRONTEND_SRC_DIR tensorflow_ngraph_frontend SOURCE_DIR)
get_target_property(TENSORFLOW_FRONTEND_SRC_DIR tensorflow_ov_frontend SOURCE_DIR)
target_include_directories(${TARGET_NAME} PRIVATE ${TENSORFLOW_FRONTEND_SRC_DIR}/src/pass/)

View File

@ -17,9 +17,9 @@ set(LIBRARY_OUTPUT_DIRECTORY_BIN ${CMAKE_LIBRARY_OUTPUT_DIRECTORY})
add_subdirectory(src)
if(NGRAPH_UNIT_TEST_ENABLE)
add_subdirectory(tests/mock/mock_py_ngraph_frontend)
add_dependencies(_pyngraph mock_py_ngraph_frontend)
set_target_properties(mock_py_ngraph_frontend PROPERTIES
add_subdirectory(tests/mock/mock_py_ov_frontend)
add_dependencies(_pyngraph mock_py_ov_frontend)
set_target_properties(mock_py_ov_frontend PROPERTIES
LIBRARY_OUTPUT_DIRECTORY ${LIBRARY_OUTPUT_DIRECTORY_BIN}
ARCHIVE_OUTPUT_DIRECTORY ${LIBRARY_OUTPUT_DIRECTORY_BIN}
COMPILE_PDB_OUTPUT_DIRECTORY ${LIBRARY_OUTPUT_DIRECTORY_BIN}

View File

@ -22,7 +22,7 @@ OPENVINO_ROOT_DIR = os.path.normpath(os.path.join(PYTHON_API_ROOT_DIR, "../../..
# Change current working directory to runtime/bindings/python
os.chdir(PYTHON_API_ROOT_DIR)
NGRAPH_LIBS = ["ngraph", "onnx_ngraph_frontend", "openvino"]
NGRAPH_LIBS = ["ngraph", "onnx_ov_frontend", "openvino"]
packages = [
"ngraph",

View File

@ -56,8 +56,8 @@ target_include_directories(_${PROJECT_NAME} PRIVATE "../")
target_link_libraries(_${PROJECT_NAME} PRIVATE openvino::core openvino::frontend::manager)
if(TARGET onnx_ngraph_frontend)
add_dependencies(_${PROJECT_NAME} onnx_ngraph_frontend)
if(TARGET onnx_ov_frontend)
add_dependencies(_${PROJECT_NAME} onnx_ov_frontend)
endif()

View File

@ -2,7 +2,7 @@
# SPDX-License-Identifier: Apache-2.0
#
set(TARGET_FE_NAME "mock_py_ngraph_frontend")
set(TARGET_FE_NAME "mock_py_ov_frontend")
file(GLOB_RECURSE LIBRARY_SRC ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp)
file(GLOB_RECURSE LIBRARY_HEADERS ${CMAKE_CURRENT_SOURCE_DIR}/*.hpp)

View File

@ -9,11 +9,11 @@
#include "ngraph/visibility.hpp"
// Defined if we are building the plugin DLL (instead of using it)
#ifdef mock_py_ngraph_frontend_EXPORTS
#ifdef mock_py_ov_frontend_EXPORTS
# define MOCK_API OPENVINO_CORE_EXPORTS
#else
# define MOCK_API OPENVINO_CORE_IMPORTS
#endif // mock1_ngraph_frontend_EXPORTS
#endif // mock_py_ov_frontend_EXPORTS
// OK to have 'using' in mock header

View File

@ -2,7 +2,7 @@
# SPDX-License-Identifier: Apache-2.0
#
set(TARGET_FE_NAME "mock_py_ngraph_frontend")
set(TARGET_FE_NAME "mock_py_ov_frontend")
set(PYBIND_FE_NAME "pybind_mock_frontend")
set(PYBIND_FE_SRC ${CMAKE_CURRENT_SOURCE_DIR}/pyngraph_mock_frontend_api.cpp)

View File

@ -5,7 +5,7 @@
#include <pybind11/pybind11.h>
#include <pybind11/stl.h>
#include "../mock_py_ngraph_frontend/mock_py_frontend.hpp"
#include "../mock_py_ov_frontend/mock_py_frontend.hpp"
namespace py = pybind11;
using namespace ngraph;

View File

@ -2,7 +2,7 @@
# SPDX-License-Identifier: Apache-2.0
#
set(TARGET_FE_NAME "mock_py_ngraph_frontend")
set(TARGET_FE_NAME "mock_py_ov_frontend")
file(GLOB_RECURSE LIBRARY_SRC ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp)
file(GLOB_RECURSE LIBRARY_HEADERS ${CMAKE_CURRENT_SOURCE_DIR}/*.hpp)

View File

@ -9,11 +9,11 @@
#include "ngraph/visibility.hpp"
// Defined if we are building the plugin DLL (instead of using it)
#ifdef mock_py_ngraph_frontend_EXPORTS
#ifdef mock_py_ov_frontend_EXPORTS
# define MOCK_API OPENVINO_CORE_EXPORTS
#else
# define MOCK_API OPENVINO_CORE_IMPORTS
#endif // mock1_ngraph_frontend_EXPORTS
#endif // mock_py_ov_frontend_EXPORTS
// OK to have 'using' in mock header

View File

@ -2,7 +2,7 @@
# SPDX-License-Identifier: Apache-2.0
#
set(TARGET_FE_NAME "mock_py_ngraph_frontend")
set(TARGET_FE_NAME "mock_py_ov_frontend")
set(PYBIND_FE_NAME "pybind_mock_frontend")
set(PYBIND_FE_SRC ${CMAKE_CURRENT_SOURCE_DIR}/pyngraph_mock_frontend_api.cpp)

View File

@ -5,7 +5,7 @@
#include <pybind11/pybind11.h>
#include <pybind11/stl.h>
#include "../mock_py_ngraph_frontend/mock_py_frontend.hpp"
#include "../mock_py_ov_frontend/mock_py_frontend.hpp"
namespace py = pybind11;
using namespace ngraph;

View File

@ -24,9 +24,9 @@
"runtime/lib/intel64/libMultiDevicePlugin.so",
"runtime/lib/intel64/libngraph.dylib",
"runtime/lib/intel64/libfrontend_manager.dylib",
"runtime/lib/intel64/libir_ngraph_frontend.dylib",
"runtime/lib/intel64/libonnx_ngraph_frontend.dylib",
"runtime/lib/intel64/libpaddlepaddle_ngraph_frontend.dylib",
"runtime/lib/intel64/libir_ov_frontend.dylib",
"runtime/lib/intel64/libonnx_ov_frontend.dylib",
"runtime/lib/intel64/libpaddlepaddle_ov_frontend.dylib",
"runtime/lib/intel64/plugins.xml",
"runtime/3rdparty/tbb"
]

View File

@ -30,9 +30,9 @@
"runtime/lib/intel64/libMultiDevicePlugin.so",
"runtime/lib/intel64/libngraph.so",
"runtime/lib/intel64/libfrontend_manager.so",
"runtime/lib/intel64/libir_ngraph_frontend.so",
"runtime/lib/intel64/libonnx_ngraph_frontend.so",
"runtime/lib/intel64/libpaddlepaddle_ngraph_frontend.so",
"runtime/lib/intel64/libir_ov_frontend.so",
"runtime/lib/intel64/libonnx_ov_frontend.so",
"runtime/lib/intel64/libpaddlepaddle_ov_frontend.so",
"runtime/lib/intel64/plugins.xml",
"runtime/3rdparty/tbb"
]

View File

@ -24,9 +24,9 @@
"runtime/bin/intel64/Release/MultiDevicePlugin.dll",
"runtime/bin/intel64/Release/ngraph.dll",
"runtime/bin/intel64/Release/frontend_manager.dll",
"runtime/bin/intel64/Release/ir_ngraph_frontend.dll",
"runtime/bin/intel64/Release/onnx_ngraph_frontend.dll",
"runtime/bin/intel64/Release/paddlepaddle_ngraph_frontend.dll",
"runtime/bin/intel64/Release/ir_ov_frontend.dll",
"runtime/bin/intel64/Release/onnx_ov_frontend.dll",
"runtime/bin/intel64/Release/paddlepaddle_ov_frontend.dll",
"runtime/bin/intel64/Release/plugins.xml",
"runtime/3rdparty/tbb"
]