Remove ngraph options (#9016)
* Renamed options * Fixed configs * Renamed unit tests * Fixed cmake generation * Fixed comments * Fixed comments
This commit is contained in:
parent
524491c170
commit
d502208f6e
|
|
@ -152,7 +152,7 @@ jobs:
|
|||
-DPYTHON_EXECUTABLE=/usr/bin/python3.8
|
||||
-DENABLE_WHEEL=ON
|
||||
-DENABLE_TESTS=ON
|
||||
-DNGRAPH_ONNX_FRONTEND_ENABLE=ON
|
||||
-DENABLE_OV_ONNX_FRONTEND=ON
|
||||
-DENABLE_FASTER_BUILD=ON
|
||||
-DENABLE_STRICT_DEPENDENCIES=OFF
|
||||
-DENABLE_REQUIREMENTS_INSTALL=OFF
|
||||
|
|
@ -242,9 +242,9 @@ jobs:
|
|||
displayName: 'Model Optimizer UT'
|
||||
continueOnError: false
|
||||
|
||||
- script: . $(SETUPVARS) && $(INSTALL_TEST_DIR)/unit-test --gtest_print_time=1 --gtest_filter=-*IE_GPU* --gtest_output=xml:TEST-NGraphUT.xml
|
||||
- script: . $(SETUPVARS) && $(INSTALL_TEST_DIR)/ov_core_unit_tests --gtest_print_time=1 --gtest_filter=-*IE_GPU* --gtest_output=xml:TEST-NGraphUT.xml
|
||||
workingDirectory: $(INSTALL_TEST_DIR)
|
||||
displayName: 'nGraph UT'
|
||||
displayName: 'OV Core UT'
|
||||
continueOnError: false
|
||||
|
||||
- script: . $(SETUPVARS) && $(INSTALL_TEST_DIR)/paddlepaddle_tests --gtest_print_time=1 --gtest_output=xml:TEST-PaddlePaddle.xml
|
||||
|
|
|
|||
|
|
@ -118,7 +118,7 @@ jobs:
|
|||
-DPYTHON_EXECUTABLE=/usr/bin/python3.8
|
||||
-DENABLE_WHEEL=ON
|
||||
-DENABLE_TESTS=ON
|
||||
-DNGRAPH_ONNX_FRONTEND_ENABLE=ON
|
||||
-DENABLE_OV_ONNX_FRONTEND=ON
|
||||
-DENABLE_FASTER_BUILD=ON
|
||||
-DENABLE_STRICT_DEPENDENCIES=OFF
|
||||
-DENABLE_REQUIREMENTS_INSTALL=OFF
|
||||
|
|
@ -158,9 +158,9 @@ jobs:
|
|||
displayName: 'Clean build dir'
|
||||
continueOnError: false
|
||||
|
||||
- script: . $(SETUPVARS) && $(INSTALL_TEST_DIR)/unit-test --gtest_print_time=1 --gtest_filter=-backend_api.config_unsupported:*IE_GPU* --gtest_output=xml:TEST-NGraphUT.xml
|
||||
- script: . $(SETUPVARS) && $(INSTALL_TEST_DIR)/ov_core_unit_tests --gtest_print_time=1 --gtest_filter=-backend_api.config_unsupported:*IE_GPU* --gtest_output=xml:TEST-NGraphUT.xml
|
||||
workingDirectory: $(INSTALL_TEST_DIR)
|
||||
displayName: 'nGraph UT'
|
||||
displayName: 'OV Core UT'
|
||||
continueOnError: false
|
||||
|
||||
- task: PublishTestResults@2
|
||||
|
|
|
|||
|
|
@ -101,8 +101,8 @@ jobs:
|
|||
-DENABLE_INTEL_GPU=OFF
|
||||
-DENABLE_PROFILING_ITT=OFF
|
||||
-DENABLE_SAMPLES=OFF
|
||||
-DNGRAPH_ONNX_FRONTEND_ENABLE=ON
|
||||
-DOPENVINO_DEBUG_ENABLE=OFF
|
||||
-DENABLE_OV_ONNX_FRONTEND=ON
|
||||
-DENABLE_OPENVINO_DEBUG=OFF
|
||||
$(REPO_DIR)
|
||||
workingDirectory: $(BUILD_DIR)
|
||||
|
||||
|
|
|
|||
|
|
@ -128,9 +128,9 @@ jobs:
|
|||
- script: ls -alR $(INSTALL_DIR)
|
||||
displayName: 'List install files'
|
||||
|
||||
- script: . $(SETUPVARS) && $(INSTALL_TEST_DIR)/unit-test --gtest_print_time=1 --gtest_filter=-backend_api.config_unsupported:*IE_GPU*:IE_CPU.onnx_model_sigmoid:IE_CPU/GRUSequenceOp.onnx_model_gru* --gtest_output=xml:TEST-NGraphUT.xml
|
||||
- script: . $(SETUPVARS) && $(INSTALL_TEST_DIR)/ov_core_unit_tests --gtest_print_time=1 --gtest_filter=-backend_api.config_unsupported:*IE_GPU*:IE_CPU.onnx_model_sigmoid:IE_CPU/GRUSequenceOp.onnx_model_gru* --gtest_output=xml:TEST-NGraphUT.xml
|
||||
workingDirectory: $(INSTALL_TEST_DIR)
|
||||
displayName: 'nGraph UT'
|
||||
displayName: 'OV Core UT'
|
||||
continueOnError: false
|
||||
|
||||
- script: . $(SETUPVARS) && $(INSTALL_TEST_DIR)/InferenceEngineUnitTests --gtest_print_time=1 --gtest_filter=-MKLDNNGraphStructureTests.TestNoRedundantReordersBeforeDWConvolution:TestConvolution/MKLDNNGraphConvolutionTests.TestsConvolution/0:TestConvolutionDefaultPrimitivesPriority/MKLDNNGraphConvolutionTests.TestsConvolution/0 --gtest_output=xml:TEST-InferenceEngineUnitTests.xml
|
||||
|
|
|
|||
|
|
@ -202,9 +202,9 @@ jobs:
|
|||
displayName: 'Clean build dir'
|
||||
continueOnError: false
|
||||
|
||||
- script: call $(SETUPVARS) && $(INSTALL_TEST_DIR)\unit-test --gtest_print_time=1 --gtest_filter=-*IE_GPU* --gtest_output=xml:TEST-NGraphUT.xml
|
||||
- script: call $(SETUPVARS) && $(INSTALL_TEST_DIR)\ov_core_unit_tests --gtest_print_time=1 --gtest_filter=-*IE_GPU* --gtest_output=xml:TEST-NGraphUT.xml
|
||||
workingDirectory: $(INSTALL_TEST_DIR)
|
||||
displayName: 'nGraph UT'
|
||||
displayName: 'OV Core UT'
|
||||
continueOnError: false
|
||||
|
||||
- script: call $(SETUPVARS) && $(INSTALL_TEST_DIR)\paddlepaddle_tests --gtest_print_time=1 --gtest_output=xml:TEST-PaddlePaddle.xml
|
||||
|
|
|
|||
|
|
@ -66,8 +66,8 @@ RUN cmake .. \
|
|||
-DENABLE_SAMPLES=OFF \
|
||||
-DENABLE_PYTHON=ON \
|
||||
-DPYTHON_EXECUTABLE=/usr/bin/python3 \
|
||||
-DNGRAPH_ONNX_FRONTEND_ENABLE=ON \
|
||||
-DOPENVINO_DEBUG_ENABLE=OFF \
|
||||
-DENABLE_OV_ONNX_FRONTEND=ON \
|
||||
-DENABLE_OPENVINO_DEBUG=OFF \
|
||||
-DCMAKE_INSTALL_PREFIX=/openvino/dist
|
||||
RUN make -j $(nproc) install
|
||||
|
||||
|
|
|
|||
|
|
@ -84,7 +84,7 @@ ie_coverage_extract(INPUT "openvino" OUTPUT "core"
|
|||
ie_coverage_genhtml(INFO_FILE "core"
|
||||
PREFIX "${OV_COVERAGE_BASE_DIRECTORY}")
|
||||
|
||||
if(NGRAPH_ONNX_FRONTEND_ENABLE)
|
||||
if(ENABLE_OV_ONNX_FRONTEND)
|
||||
ie_coverage_extract(INPUT "openvino" OUTPUT "onnx"
|
||||
PATTERNS "${OV_COVERAGE_BASE_DIRECTORY}/src/frontends/onnx/*"
|
||||
"${OV_COVERAGE_BASE_DIRECTORY}/src/frontends/onnx/*")
|
||||
|
|
|
|||
|
|
@ -162,33 +162,33 @@ else()
|
|||
set(protoc_available ON)
|
||||
endif()
|
||||
|
||||
ie_dependent_option(NGRAPH_ONNX_FRONTEND_ENABLE "Enable ONNX FrontEnd" ON "protoc_available" OFF)
|
||||
ie_dependent_option(NGRAPH_PDPD_FRONTEND_ENABLE "Enable PaddlePaddle FrontEnd" ON "protoc_available" OFF)
|
||||
ie_option(NGRAPH_IR_FRONTEND_ENABLE "Enable IR FrontEnd" ON)
|
||||
ie_dependent_option(NGRAPH_TF_FRONTEND_ENABLE "Enable TensorFlow FrontEnd" ON "protoc_available" OFF)
|
||||
ie_dependent_option(NGRAPH_USE_SYSTEM_PROTOBUF "Use system protobuf" OFF
|
||||
"NGRAPH_ONNX_FRONTEND_ENABLE OR NGRAPH_PDPD_FRONTEND_ENABLE OR NGRAPH_TF_FRONTEND_ENABLE;BUILD_SHARED_LIBS" OFF)
|
||||
ie_dependent_option(NGRAPH_UNIT_TEST_ENABLE "Enables ngraph unit tests" ON "ENABLE_TESTS;NOT ANDROID" OFF)
|
||||
ie_dependent_option(NGRAPH_UNIT_TEST_BACKENDS_ENABLE "Control the building of unit tests using backends" ON
|
||||
"NGRAPH_UNIT_TEST_ENABLE" OFF)
|
||||
ie_option(OPENVINO_DEBUG_ENABLE "Enable output for OPENVINO_DEBUG statements" OFF)
|
||||
ie_dependent_option(ENABLE_OV_ONNX_FRONTEND "Enable ONNX FrontEnd" ON "protoc_available" OFF)
|
||||
ie_dependent_option(ENABLE_OV_PDPD_FRONTEND "Enable PaddlePaddle FrontEnd" ON "protoc_available" OFF)
|
||||
ie_option(ENABLE_OV_IR_FRONTEND "Enable IR FrontEnd" ON)
|
||||
ie_dependent_option(ENABLE_OV_TF_FRONTEND "Enable TensorFlow FrontEnd" ON "protoc_available" OFF)
|
||||
ie_dependent_option(ENABLE_SYSTEM_PROTOBUF "Use system protobuf" OFF
|
||||
"ENABLE_OV_ONNX_FRONTEND OR ENABLE_OV_PDPD_FRONTEND OR ENABLE_OV_TF_FRONTEND;BUILD_SHARED_LIBS" OFF)
|
||||
ie_dependent_option(ENABLE_OV_CORE_UNIT_TESTS "Enables OpenVINO core unit tests" ON "ENABLE_TESTS;NOT ANDROID" OFF)
|
||||
ie_dependent_option(ENABLE_OV_CORE_BACKEND_UNIT_TESTS "Control the building of unit tests using backends" ON
|
||||
"ENABLE_OV_CORE_UNIT_TESTS" OFF)
|
||||
ie_option(ENABLE_OPENVINO_DEBUG "Enable output for OPENVINO_DEBUG statements" OFF)
|
||||
ie_option(ENABLE_REQUIREMENTS_INSTALL "Dynamic dependencies install" ON)
|
||||
|
||||
if(NOT BUILD_SHARED_LIBS AND NGRAPH_TF_FRONTEND_ENABLE)
|
||||
if(NOT BUILD_SHARED_LIBS AND ENABLE_OV_TF_FRONTEND)
|
||||
set(FORCE_FRONTENDS_USE_PROTOBUF ON)
|
||||
else()
|
||||
set(FORCE_FRONTENDS_USE_PROTOBUF OFF)
|
||||
endif()
|
||||
|
||||
# WA for ngraph python build on Windows debug
|
||||
list(REMOVE_ITEM IE_OPTIONS NGRAPH_UNIT_TEST_ENABLE NGRAPH_UNIT_TEST_BACKENDS_ENABLE)
|
||||
list(REMOVE_ITEM IE_OPTIONS ENABLE_OV_CORE_UNIT_TESTS ENABLE_OV_CORE_BACKEND_UNIT_TESTS)
|
||||
|
||||
#
|
||||
# Process featues
|
||||
#
|
||||
|
||||
if(NGRAPH_DEBUG_ENABLE)
|
||||
add_definitions(-DNGRAPH_DEBUG_ENABLE)
|
||||
if(ENABLE_OPENVINO_DEBUG)
|
||||
add_definitions(-DENABLE_OPENVINO_DEBUG)
|
||||
endif()
|
||||
|
||||
if (ENABLE_PROFILING_RAW)
|
||||
|
|
|
|||
|
|
@ -185,10 +185,10 @@ endif()
|
|||
|
||||
set(${CMAKE_FIND_PACKAGE_NAME}_Runtime_FOUND ON)
|
||||
|
||||
set(${CMAKE_FIND_PACKAGE_NAME}_ONNX_FOUND @NGRAPH_ONNX_FRONTEND_ENABLE@)
|
||||
set(${CMAKE_FIND_PACKAGE_NAME}_PaddlePaddle_FOUND @NGRAPH_PDPD_FRONTEND_ENABLE@)
|
||||
set(${CMAKE_FIND_PACKAGE_NAME}_TensorFlow_FOUND @NGRAPH_TF_FRONTEND_ENABLE@)
|
||||
set(${CMAKE_FIND_PACKAGE_NAME}_IR_FOUND @NGRAPH_IR_FRONTEND_ENABLE@)
|
||||
set(${CMAKE_FIND_PACKAGE_NAME}_ONNX_FOUND @ENABLE_OV_ONNX_FRONTEND@)
|
||||
set(${CMAKE_FIND_PACKAGE_NAME}_PaddlePaddle_FOUND @ENABLE_OV_PDPD_FRONTEND@)
|
||||
set(${CMAKE_FIND_PACKAGE_NAME}_TensorFlow_FOUND @ENABLE_OV_TF_FRONTEND@)
|
||||
set(${CMAKE_FIND_PACKAGE_NAME}_IR_FOUND @ENABLE_OV_IR_FRONTEND@)
|
||||
|
||||
set(${CMAKE_FIND_PACKAGE_NAME}_Frontend_ONNX_FOUND ${${CMAKE_FIND_PACKAGE_NAME}_ONNX_FOUND})
|
||||
set(${CMAKE_FIND_PACKAGE_NAME}_Frontend_PaddlePaddle_FOUND ${${CMAKE_FIND_PACKAGE_NAME}_PaddlePaddle_FOUND})
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ function(ov_model_convert SRC DST OUT)
|
|||
get_filename_component(name_we "${in_file}" NAME_WE)
|
||||
set(model_source_dir "${SRC}/${rel_dir}")
|
||||
|
||||
if(NOT NGRAPH_ONNX_FRONTEND_ENABLE AND ext MATCHES "^\\.(onnx|prototxt)$")
|
||||
if(NOT ENABLE_OV_ONNX_FRONTEND AND ext MATCHES "^\\.(onnx|prototxt)$")
|
||||
# don't copy / process ONNX / prototxt files
|
||||
continue()
|
||||
endif()
|
||||
|
|
@ -92,7 +92,7 @@ ov_model_convert("${OpenVINO_SOURCE_DIR}/${rel_path}"
|
|||
docs_onnx_out_files)
|
||||
|
||||
if(ENABLE_TESTS)
|
||||
if(NGRAPH_ONNX_FRONTEND_ENABLE AND ENABLE_REQUIREMENTS_INSTALL)
|
||||
if(ENABLE_OV_ONNX_FRONTEND AND ENABLE_REQUIREMENTS_INSTALL)
|
||||
find_package(PythonInterp 3 REQUIRED)
|
||||
|
||||
get_filename_component(PYTHON_EXEC_DIR ${PYTHON_EXECUTABLE} DIRECTORY)
|
||||
|
|
@ -136,7 +136,7 @@ if(ENABLE_TESTS)
|
|||
add_dependencies(test_model_zoo test_pip_prerequsites)
|
||||
endif()
|
||||
|
||||
if (NGRAPH_PDPD_FRONTEND_ENABLE AND NGRAPH_UNIT_TEST_ENABLE)
|
||||
if (ENABLE_OV_PDPD_FRONTEND AND ENABLE_OV_CORE_UNIT_TESTS)
|
||||
add_dependencies(test_model_zoo paddlepaddle_test_models)
|
||||
endif()
|
||||
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ if(NOT ENABLE_DOCKER)
|
|||
set(OpenVINO_DIR ${CMAKE_BINARY_DIR})
|
||||
endif()
|
||||
|
||||
if(NGRAPH_ONNX_FRONTEND_ENABLE)
|
||||
if(ENABLE_OV_ONNX_FRONTEND)
|
||||
add_subdirectory(onnx_custom_op)
|
||||
endif()
|
||||
add_subdirectory(template_extension)
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
nGraph representation provides an API to get detailed information about the graph structure.
|
||||
|
||||
To receive additional messages about applied graph modifications, rebuild the nGraph library with
|
||||
the `-DOPENVINO_DEBUG_ENABLE=ON` option.
|
||||
the `-DENABLE_OPENVINO_DEBUG=ON` option.
|
||||
|
||||
To visualize the nGraph function to the xDot format or to an image file, use the
|
||||
`ngraph::pass::VisualizeTree` graph transformation pass:
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ if(OpenCV_FOUND)
|
|||
target_link_libraries(${TARGET_NAME} PRIVATE opencv_core)
|
||||
endif()
|
||||
|
||||
if(NGRAPH_ONNX_FRONTEND_ENABLE)
|
||||
if(ENABLE_OV_ONNX_FRONTEND)
|
||||
target_link_libraries(${TARGET_NAME} PRIVATE onnx_ov_frontend)
|
||||
endif()
|
||||
|
||||
|
|
|
|||
|
|
@ -183,7 +183,7 @@ class CustomBuild(build):
|
|||
self.spawn(['cmake', '-H' + str(openvino_root_dir), '-B' + self.build_temp,
|
||||
'-DCMAKE_BUILD_TYPE={type}'.format(type=self.config),
|
||||
'-DENABLE_PYTHON=ON',
|
||||
'-DNGRAPH_ONNX_FRONTEND_ENABLE=ON'])
|
||||
'-DENABLE_OV_ONNX_FRONTEND=ON'])
|
||||
|
||||
self.announce('Building binaries', level=3)
|
||||
self.spawn(['cmake', '--build', self.build_temp,
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ bool ngraph::pass::Pruning::run_on_function(std::shared_ptr<Function> f) {
|
|||
manager.register_pass<InitMasks>();
|
||||
manager.register_pass<PropagateMasks>();
|
||||
|
||||
#ifdef OPENVINO_DEBUG_ENABLE
|
||||
#ifdef ENABLE_OPENVINO_DEBUG
|
||||
// VisualizeTree modifier helps to print Masks and mark nodes with masks
|
||||
/*
|
||||
auto modifier = [](const Node& node, std::vector<std::string>& attributes) {
|
||||
|
|
@ -56,7 +56,7 @@ bool ngraph::pass::Pruning::run_on_function(std::shared_ptr<Function> f) {
|
|||
|
||||
manager.register_pass<ShrinkWeights>();
|
||||
|
||||
#ifdef OPENVINO_DEBUG_ENABLE
|
||||
#ifdef ENABLE_OPENVINO_DEBUG
|
||||
// Uncomment following line and change path to resulting svg file
|
||||
// manager.register_pass<VisualizeTree>("/tmp/after.svg");
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ set(DEPENDENCIES
|
|||
test_model_zoo
|
||||
)
|
||||
|
||||
if(NGRAPH_IR_FRONTEND_ENABLE)
|
||||
if(ENABLE_OV_IR_FRONTEND)
|
||||
list(APPEND DEPENDENCIES ir_ov_frontend)
|
||||
endif()
|
||||
|
||||
|
|
@ -48,11 +48,11 @@ if(ENABLE_AUTO OR ENABLE_MULTI)
|
|||
list(APPEND DEPENDENCIES ov_auto_plugin)
|
||||
endif()
|
||||
|
||||
if (NOT NGRAPH_ONNX_FRONTEND_ENABLE)
|
||||
if (NOT ENABLE_OV_ONNX_FRONTEND)
|
||||
list(APPEND EXCLUDED_SOURCE_PATHS "${CMAKE_CURRENT_SOURCE_DIR}/onnx_reader")
|
||||
endif()
|
||||
|
||||
if (NOT NGRAPH_PDPD_FRONTEND_ENABLE)
|
||||
if (NOT ENABLE_OV_PDPD_FRONTEND)
|
||||
list(APPEND EXCLUDED_SOURCE_PATHS "${CMAKE_CURRENT_SOURCE_DIR}/paddle_reader")
|
||||
endif()
|
||||
|
||||
|
|
@ -70,14 +70,14 @@ addIeTargetTest(
|
|||
|
||||
set_ie_threading_interface_for(${TARGET_NAME})
|
||||
|
||||
if(NGRAPH_ONNX_FRONTEND_ENABLE)
|
||||
if(ENABLE_OV_ONNX_FRONTEND)
|
||||
target_compile_definitions(${TARGET_NAME} PRIVATE
|
||||
NGRAPH_ONNX_FRONTEND_ENABLE
|
||||
ENABLE_OV_ONNX_FRONTEND
|
||||
ONNX_TEST_MODELS="${TEST_MODEL_ZOO}/onnx_reader/models/")
|
||||
add_dependencies(${TARGET_NAME} onnx_ov_frontend)
|
||||
endif()
|
||||
|
||||
if(NGRAPH_PDPD_FRONTEND_ENABLE)
|
||||
if(ENABLE_OV_PDPD_FRONTEND)
|
||||
target_compile_definitions(${TARGET_NAME} PRIVATE
|
||||
PADDLE_TEST_MODELS="${CMAKE_CURRENT_SOURCE_DIR}/paddle_reader/models/")
|
||||
add_dependencies(${TARGET_NAME} paddlepaddle_ov_frontend)
|
||||
|
|
|
|||
|
|
@ -11,32 +11,29 @@
|
|||
#include "common_test_utils/file_utils.hpp"
|
||||
#include "common_test_utils/ngraph_test_utils.hpp"
|
||||
#include "ie_core.hpp"
|
||||
#include "openvino/runtime/core.hpp"
|
||||
#include "ngraph/ngraph.hpp"
|
||||
#include "openvino/runtime/core.hpp"
|
||||
#include "transformations/serialize.hpp"
|
||||
|
||||
#ifndef IR_SERIALIZATION_MODELS_PATH // should be already defined by cmake
|
||||
# error "IR_SERIALIZATION_MODELS_PATH is not defined"
|
||||
#error "IR_SERIALIZATION_MODELS_PATH is not defined"
|
||||
#endif
|
||||
|
||||
#ifndef IE_BUILD_POSTFIX // should be already defined by cmake
|
||||
# error "IE_BUILD_POSTFIX is not defined"
|
||||
#error "IE_BUILD_POSTFIX is not defined"
|
||||
#endif
|
||||
|
||||
static std::string get_extension_path() {
|
||||
return FileUtils::makePluginLibraryName<char>(
|
||||
{}, std::string("template_extension") + IE_BUILD_POSTFIX);
|
||||
return FileUtils::makePluginLibraryName<char>({}, std::string("template_extension") + IE_BUILD_POSTFIX);
|
||||
}
|
||||
|
||||
static std::string get_ov_extension_path() {
|
||||
return FileUtils::makePluginLibraryName<char>(
|
||||
{}, std::string("template_ov_extension") + IE_BUILD_POSTFIX);
|
||||
return FileUtils::makePluginLibraryName<char>({}, std::string("template_ov_extension") + IE_BUILD_POSTFIX);
|
||||
}
|
||||
|
||||
class CustomOpsSerializationTest : public ::testing::Test {
|
||||
protected:
|
||||
std::string test_name =
|
||||
::testing::UnitTest::GetInstance()->current_test_info()->name();
|
||||
std::string test_name = ::testing::UnitTest::GetInstance()->current_test_info()->name();
|
||||
std::string m_out_xml_path = test_name + ".xml";
|
||||
std::string m_out_bin_path = test_name + ".bin";
|
||||
|
||||
|
|
@ -47,13 +44,10 @@ protected:
|
|||
};
|
||||
|
||||
TEST_F(CustomOpsSerializationTest, CustomOpUser_MO) {
|
||||
const std::string model = CommonTestUtils::getModelFromTestModelZoo(
|
||||
IR_SERIALIZATION_MODELS_PATH "custom_op.xml");
|
||||
const std::string model = CommonTestUtils::getModelFromTestModelZoo(IR_SERIALIZATION_MODELS_PATH "custom_op.xml");
|
||||
|
||||
InferenceEngine::Core ie;
|
||||
ie.AddExtension(
|
||||
std::make_shared<InferenceEngine::Extension>(
|
||||
get_extension_path()));
|
||||
ie.AddExtension(std::make_shared<InferenceEngine::Extension>(get_extension_path()));
|
||||
|
||||
auto expected = ie.ReadNetwork(model);
|
||||
expected.serialize(m_out_xml_path, m_out_bin_path);
|
||||
|
|
@ -61,13 +55,12 @@ TEST_F(CustomOpsSerializationTest, CustomOpUser_MO) {
|
|||
|
||||
bool success;
|
||||
std::string message;
|
||||
std::tie(success, message) =
|
||||
compare_functions(result.getFunction(), expected.getFunction(), true);
|
||||
std::tie(success, message) = compare_functions(result.getFunction(), expected.getFunction(), true);
|
||||
|
||||
ASSERT_TRUE(success) << message;
|
||||
}
|
||||
|
||||
#ifdef NGRAPH_ONNX_FRONTEND_ENABLE
|
||||
#ifdef ENABLE_OV_ONNX_FRONTEND
|
||||
|
||||
// This test will not work because template_extension for ONNX registers
|
||||
// extension via `register_operator` function which registers operator
|
||||
|
|
@ -76,13 +69,10 @@ TEST_F(CustomOpsSerializationTest, CustomOpUser_MO) {
|
|||
#ifndef OPENVINO_STATIC_LIBRARY
|
||||
|
||||
TEST_F(CustomOpsSerializationTest, CustomOpUser_ONNXImporter) {
|
||||
const std::string model = CommonTestUtils::getModelFromTestModelZoo(
|
||||
IR_SERIALIZATION_MODELS_PATH "custom_op.onnx");
|
||||
const std::string model = CommonTestUtils::getModelFromTestModelZoo(IR_SERIALIZATION_MODELS_PATH "custom_op.onnx");
|
||||
|
||||
InferenceEngine::Core ie;
|
||||
ie.AddExtension(
|
||||
std::make_shared<InferenceEngine::Extension>(
|
||||
get_extension_path()));
|
||||
ie.AddExtension(std::make_shared<InferenceEngine::Extension>(get_extension_path()));
|
||||
|
||||
auto expected = ie.ReadNetwork(model);
|
||||
expected.serialize(m_out_xml_path, m_out_bin_path);
|
||||
|
|
@ -90,49 +80,39 @@ TEST_F(CustomOpsSerializationTest, CustomOpUser_ONNXImporter) {
|
|||
|
||||
bool success;
|
||||
std::string message;
|
||||
std::tie(success, message) =
|
||||
compare_functions(result.getFunction(), expected.getFunction(), true);
|
||||
std::tie(success, message) = compare_functions(result.getFunction(), expected.getFunction(), true);
|
||||
|
||||
ASSERT_TRUE(success) << message;
|
||||
}
|
||||
|
||||
#endif // OPENVINO_STATIC_LIBRARY
|
||||
#endif // OPENVINO_STATIC_LIBRARY
|
||||
|
||||
#endif // NGRAPH_ONNX_FRONTEND_ENABLE
|
||||
#endif // NGRAPH_ONNX_FRONTEND_ENABLE
|
||||
|
||||
TEST_F(CustomOpsSerializationTest, CustomOpTransformation) {
|
||||
const std::string model = CommonTestUtils::getModelFromTestModelZoo(
|
||||
IR_SERIALIZATION_MODELS_PATH "custom_op.xml");
|
||||
const std::string model = CommonTestUtils::getModelFromTestModelZoo(IR_SERIALIZATION_MODELS_PATH "custom_op.xml");
|
||||
|
||||
InferenceEngine::Core ie;
|
||||
auto extension =
|
||||
std::make_shared<InferenceEngine::Extension>(
|
||||
get_extension_path());
|
||||
auto extension = std::make_shared<InferenceEngine::Extension>(get_extension_path());
|
||||
ie.AddExtension(extension);
|
||||
auto expected = ie.ReadNetwork(model);
|
||||
ngraph::pass::Manager manager;
|
||||
manager.register_pass<ngraph::pass::Serialize>(
|
||||
m_out_xml_path, m_out_bin_path, extension->getOpSets(),
|
||||
ngraph::pass::Serialize::Version::IR_V10);
|
||||
m_out_xml_path, m_out_bin_path, extension->getOpSets(), ngraph::pass::Serialize::Version::IR_V10);
|
||||
manager.run_passes(expected.getFunction());
|
||||
auto result = ie.ReadNetwork(m_out_xml_path, m_out_bin_path);
|
||||
|
||||
bool success;
|
||||
std::string message;
|
||||
std::tie(success, message) =
|
||||
compare_functions(result.getFunction(), expected.getFunction(), true);
|
||||
std::tie(success, message) = compare_functions(result.getFunction(), expected.getFunction(), true);
|
||||
|
||||
ASSERT_TRUE(success) << message;
|
||||
}
|
||||
|
||||
class FrameworkNodeExtension : public InferenceEngine::IExtension {
|
||||
public:
|
||||
void GetVersion(const InferenceEngine::Version *&versionInfo) const noexcept override {
|
||||
static InferenceEngine::Version ExtensionDescription = {
|
||||
{1, 0},
|
||||
"1.0",
|
||||
"framework_node_ext"
|
||||
};
|
||||
void GetVersion(const InferenceEngine::Version*& versionInfo) const noexcept override {
|
||||
static InferenceEngine::Version ExtensionDescription = {{1, 0}, "1.0", "framework_node_ext"};
|
||||
|
||||
versionInfo = &ExtensionDescription;
|
||||
}
|
||||
|
|
@ -151,8 +131,7 @@ public:
|
|||
};
|
||||
|
||||
TEST_F(CustomOpsSerializationTest, CustomOpNoExtensions) {
|
||||
const std::string model = CommonTestUtils::getModelFromTestModelZoo(
|
||||
IR_SERIALIZATION_MODELS_PATH "custom_op.xml");
|
||||
const std::string model = CommonTestUtils::getModelFromTestModelZoo(IR_SERIALIZATION_MODELS_PATH "custom_op.xml");
|
||||
|
||||
InferenceEngine::Core ie;
|
||||
auto extension = std::make_shared<FrameworkNodeExtension>();
|
||||
|
|
@ -160,37 +139,34 @@ TEST_F(CustomOpsSerializationTest, CustomOpNoExtensions) {
|
|||
auto expected = ie.ReadNetwork(model);
|
||||
ngraph::pass::Manager manager;
|
||||
manager.register_pass<ngraph::pass::Serialize>(
|
||||
m_out_xml_path, m_out_bin_path, extension->getOpSets(),
|
||||
ngraph::pass::Serialize::Version::IR_V10);
|
||||
m_out_xml_path, m_out_bin_path, extension->getOpSets(), ngraph::pass::Serialize::Version::IR_V10);
|
||||
manager.run_passes(expected.getFunction());
|
||||
auto result = ie.ReadNetwork(m_out_xml_path, m_out_bin_path);
|
||||
|
||||
bool success;
|
||||
std::string message;
|
||||
std::tie(success, message) =
|
||||
compare_functions(result.getFunction(), expected.getFunction(), true, false, false, true, true);
|
||||
compare_functions(result.getFunction(), expected.getFunction(), true, false, false, true, true);
|
||||
|
||||
ASSERT_TRUE(success) << message;
|
||||
}
|
||||
|
||||
TEST_F(CustomOpsSerializationTest, CustomOpOVExtensions) {
|
||||
const std::string model = CommonTestUtils::getModelFromTestModelZoo(
|
||||
IR_SERIALIZATION_MODELS_PATH "custom_identity.xml");
|
||||
const std::string model =
|
||||
CommonTestUtils::getModelFromTestModelZoo(IR_SERIALIZATION_MODELS_PATH "custom_identity.xml");
|
||||
|
||||
ov::runtime::Core core;
|
||||
core.add_extension(get_ov_extension_path());
|
||||
auto expected = core.read_model(model);
|
||||
ngraph::pass::Manager manager;
|
||||
manager.register_pass<ngraph::pass::Serialize>(
|
||||
m_out_xml_path, m_out_bin_path,
|
||||
ngraph::pass::Serialize::Version::IR_V10);
|
||||
m_out_xml_path, m_out_bin_path, ngraph::pass::Serialize::Version::IR_V10);
|
||||
manager.run_passes(expected);
|
||||
auto result = core.read_model(m_out_xml_path, m_out_bin_path);
|
||||
|
||||
bool success;
|
||||
std::string message;
|
||||
std::tie(success, message) =
|
||||
compare_functions(result, expected, true, false, false, true, true);
|
||||
std::tie(success, message) = compare_functions(result, expected, true, false, false, true, true);
|
||||
|
||||
ASSERT_TRUE(success) << message;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ target_link_libraries(cpuSpecificRtInfo PRIVATE ngraph)
|
|||
set(INCLUDES ${CMAKE_CURRENT_SOURCE_DIR} $<TARGET_PROPERTY:MKLDNNPlugin,SOURCE_DIR>)
|
||||
set(DEPENDENCIES MKLDNNPlugin)
|
||||
set(LINK_LIBRARIES funcSharedTests cpuSpecificRtInfo)
|
||||
if (NGRAPH_ONNX_FRONTEND_ENABLE)
|
||||
if (ENABLE_OV_ONNX_FRONTEND)
|
||||
list(APPEND INCLUDES "${OpenVINO_SOURCE_DIR}/docs/onnx_custom_op")
|
||||
list(APPEND LINK_LIBRARIES onnx_custom_op)
|
||||
list(APPEND DEPENDENCIES template_extension onnx_custom_op)
|
||||
|
|
|
|||
|
|
@ -17,11 +17,11 @@ if(ENABLE_AUTO OR ENABLE_MULTI)
|
|||
endif()
|
||||
|
||||
# remove once CVS-69781 is fixed
|
||||
if(NGRAPH_IR_FRONTEND_ENABLE)
|
||||
if(ENABLE_OV_IR_FRONTEND)
|
||||
list(APPEND DEPENDENCIES ir_ov_frontend)
|
||||
endif()
|
||||
|
||||
if (NGRAPH_ONNX_FRONTEND_ENABLE)
|
||||
if (ENABLE_OV_ONNX_FRONTEND)
|
||||
list(APPEND DEPENDENCIES test_model_zoo)
|
||||
list(APPEND DEFINES TEST_MODELS="${TEST_MODEL_ZOO}/func_tests/models/")
|
||||
else()
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ if (ENABLE_MYRIAD)
|
|||
add_subdirectory(vpu)
|
||||
endif ()
|
||||
|
||||
if(NGRAPH_ONNX_FRONTEND_ENABLE)
|
||||
if(ENABLE_OV_ONNX_FRONTEND)
|
||||
add_subdirectory(frontends/onnx_import)
|
||||
endif()
|
||||
|
||||
|
|
|
|||
|
|
@ -26,21 +26,21 @@ add_subdirectory(inference)
|
|||
add_subdirectory(common)
|
||||
|
||||
|
||||
if(NGRAPH_IR_FRONTEND_ENABLE)
|
||||
if(ENABLE_OV_IR_FRONTEND)
|
||||
if(BUILD_SHARED_LIBS)
|
||||
add_dependencies(ov_runtime_libraries ir_ov_frontend)
|
||||
endif()
|
||||
# use this one once CVS-69781 is fixed
|
||||
# add_dependencies(inference_engine ir_ov_frontend)
|
||||
endif()
|
||||
if(NGRAPH_ONNX_FRONTEND_ENABLE)
|
||||
if(ENABLE_OV_ONNX_FRONTEND)
|
||||
add_dependencies(inference_engine onnx_ov_frontend)
|
||||
endif()
|
||||
|
||||
if(NGRAPH_PDPD_FRONTEND_ENABLE)
|
||||
if(ENABLE_OV_PDPD_FRONTEND)
|
||||
add_dependencies(inference_engine paddlepaddle_ov_frontend)
|
||||
endif()
|
||||
|
||||
if(NGRAPH_TF_FRONTEND_ENABLE)
|
||||
if(ENABLE_OV_TF_FRONTEND)
|
||||
add_dependencies(inference_engine tensorflow_ov_frontend)
|
||||
endif()
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ set the mentioned flags to `ON`. Note the `CMAKE_INSTALL_PREFIX`, which defaults
|
|||
-DENABLE_OPENCV=OFF \
|
||||
-DENABLE_VPU=OFF \
|
||||
-DENABLE_PYTHON=ON \
|
||||
-DNGRAPH_ONNX_FRONTEND_ENABLE=ON \
|
||||
-DENABLE_OV_ONNX_FRONTEND=ON \
|
||||
-DCMAKE_INSTALL_PREFIX="${OPENVINO_BASEDIR}/openvino_dist"
|
||||
|
||||
make -j 4
|
||||
|
|
@ -110,7 +110,7 @@ cmake .. ^
|
|||
-DENABLE_INTEL_GPU=OFF ^
|
||||
-DENABLE_OPENCV=OFF ^
|
||||
-DENABLE_VPU=OFF ^
|
||||
-DNGRAPH_ONNX_FRONTEND_ENABLE=ON ^
|
||||
-DENABLE_OV_ONNX_FRONTEND=ON ^
|
||||
-DENABLE_PYTHON=ON ^
|
||||
-DCMAKE_CXX_COMPILER="C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.27.29110\bin\Hostx64\x64"
|
||||
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ set(LIBRARY_OUTPUT_DIRECTORY_BIN ${CMAKE_LIBRARY_OUTPUT_DIRECTORY})
|
|||
|
||||
add_subdirectory(src)
|
||||
|
||||
if(NGRAPH_UNIT_TEST_ENABLE)
|
||||
if(ENABLE_OV_CORE_UNIT_TESTS)
|
||||
add_subdirectory(tests/mock/mock_py_ov_frontend)
|
||||
add_dependencies(pyopenvino mock_py_ov_frontend)
|
||||
set_target_properties(mock_py_ov_frontend PROPERTIES
|
||||
|
|
|
|||
|
|
@ -178,7 +178,7 @@ class BuildCMakeExt(build_ext):
|
|||
f"-DCMAKE_BUILD_TYPE={self.config}",
|
||||
f"-DInferenceEngineDeveloperPackage_DIR={ov_build_dir}",
|
||||
"-DENABLE_PYTHON=ON",
|
||||
"-DNGRAPH_ONNX_FRONTEND_ENABLE=ON"] + ext_args)
|
||||
"-DENABLE_OV_ONNX_FRONTEND=ON"] + ext_args)
|
||||
|
||||
self.announce("Building binaries", level=3)
|
||||
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@
|
|||
#include "pyopenvino/graph/node_factory.hpp"
|
||||
#include "pyopenvino/graph/node_input.hpp"
|
||||
#include "pyopenvino/graph/node_output.hpp"
|
||||
#if defined(NGRAPH_ONNX_FRONTEND_ENABLE)
|
||||
#if defined(ENABLE_OV_ONNX_FRONTEND)
|
||||
# include "pyopenvino/graph/onnx_import/onnx_import.hpp"
|
||||
#endif
|
||||
#include "pyopenvino/core/async_infer_queue.hpp"
|
||||
|
|
@ -86,7 +86,7 @@ PYBIND11_MODULE(pyopenvino, m) {
|
|||
regclass_graph_op_Parameter(m_op);
|
||||
regclass_graph_op_Result(m_op);
|
||||
|
||||
#if defined(NGRAPH_ONNX_FRONTEND_ENABLE)
|
||||
#if defined(ENABLE_OV_ONNX_FRONTEND)
|
||||
regmodule_graph_onnx_import(m);
|
||||
#endif
|
||||
regmodule_graph_op_util(m_op);
|
||||
|
|
|
|||
|
|
@ -110,7 +110,7 @@ void default_logger_handler_func(const std::string& s);
|
|||
::ov::util::default_logger_handler_func) \
|
||||
.stream()
|
||||
|
||||
#ifdef OPENVINO_DEBUG_ENABLE
|
||||
#ifdef ENABLE_OPENVINO_DEBUG
|
||||
# define OPENVINO_DEBUG \
|
||||
::ov::util::LogHelper(::ov::util::LOG_TYPE::_LOG_TYPE_DEBUG, \
|
||||
::ov::util::trim_file_name(PROJECT_ROOT_DIR, __FILE__), \
|
||||
|
|
|
|||
|
|
@ -2,9 +2,9 @@
|
|||
# SPDX-License-Identifier: Apache-2.0
|
||||
#
|
||||
|
||||
add_definitions(-DIN_NGRAPH_LIBRARY)
|
||||
add_definitions(-DIN_OV_CORE_LIBRARY)
|
||||
|
||||
set(NGRAPH_INCLUDE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/include)
|
||||
set(OV_CORE_INCLUDE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/include)
|
||||
|
||||
if(CMAKE_COMPILER_IS_GNUCXX)
|
||||
ie_add_compiler_flags(-Wmissing-declarations)
|
||||
|
|
@ -102,7 +102,7 @@ set_source_files_properties("${CMAKE_CURRENT_SOURCE_DIR}/src/pass/convert_precis
|
|||
PROPERTIES INCLUDE_DIRECTORIES $<TARGET_PROPERTY:inference_engine_transformations,INTERFACE_INCLUDE_DIRECTORIES>)
|
||||
|
||||
# Defines macro in C++ to load backend plugin
|
||||
target_include_directories(ngraph PUBLIC $<BUILD_INTERFACE:${NGRAPH_INCLUDE_PATH}>
|
||||
target_include_directories(ngraph PUBLIC $<BUILD_INTERFACE:${OV_CORE_INCLUDE_PATH}>
|
||||
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src)
|
||||
|
||||
# Add an alias so that library can be used inside the build tree, e.g. when testing
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ ie_faster_build(${TARGET_NAME}
|
|||
|
||||
target_include_directories(${TARGET_NAME} PUBLIC
|
||||
$<BUILD_INTERFACE:${BUILDER_INCLUDE_DIR}>
|
||||
$<BUILD_INTERFACE:${NGRAPH_INCLUDE_PATH}>)
|
||||
$<BUILD_INTERFACE:${OV_CORE_INCLUDE_PATH}>)
|
||||
|
||||
if(NOT BUILD_SHARED_LIBS)
|
||||
target_compile_definitions(${TARGET_NAME} PUBLIC OPENVINO_STATIC_LIBRARY)
|
||||
|
|
|
|||
|
|
@ -120,7 +120,7 @@ void default_logger_handler_func(const std::string& s);
|
|||
ngraph::default_logger_handler_func) \
|
||||
.stream()
|
||||
|
||||
#ifdef OPENVINO_DEBUG_ENABLE
|
||||
#ifdef ENABLE_OPENVINO_DEBUG
|
||||
# define NGRAPH_DEBUG \
|
||||
ngraph::LogHelper(ngraph::LOG_TYPE::_LOG_TYPE_DEBUG, \
|
||||
ngraph::trim_file_name(PROJECT_ROOT_DIR, __FILE__), \
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@
|
|||
#include "ngraph/deprecated.hpp"
|
||||
#include "ngraph/version.hpp"
|
||||
|
||||
#ifdef IN_NGRAPH_LIBRARY
|
||||
#ifdef IN_OV_CORE_LIBRARY
|
||||
# error("ngraph.hpp is for external use only")
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ endif()
|
|||
|
||||
target_include_directories(${TARGET_NAME} PUBLIC
|
||||
$<BUILD_INTERFACE:${REF_IMPL_INCLUDE_DIR}>
|
||||
$<BUILD_INTERFACE:${NGRAPH_INCLUDE_PATH}>)
|
||||
$<BUILD_INTERFACE:${OV_CORE_INCLUDE_PATH}>)
|
||||
|
||||
link_system_libraries(${TARGET_NAME} PRIVATE xbyak)
|
||||
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ add_library(${TARGET_NAME} STATIC ${LIBRARY_SRC} ${PUBLIC_HEADERS})
|
|||
|
||||
target_include_directories(${TARGET_NAME} PUBLIC
|
||||
$<BUILD_INTERFACE:${SHAPE_INFER_INCLUDE_DIR}>
|
||||
$<BUILD_INTERFACE:${NGRAPH_INCLUDE_PATH}>)
|
||||
$<BUILD_INTERFACE:${OV_CORE_INCLUDE_PATH}>)
|
||||
|
||||
if(NOT BUILD_SHARED_LIBS)
|
||||
target_compile_definitions(${TARGET_NAME} PUBLIC OPENVINO_STATIC_LIBRARY)
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
|
|||
endif()
|
||||
|
||||
add_definitions(-DSERIALIZED_ZOO=\"${TEST_MODEL_ZOO}/core/models\")
|
||||
set(NGRAPH_ONNX_NAMESPACE ngraph_onnx)
|
||||
set(OV_ONNX_NAMESPACE ngraph_onnx)
|
||||
|
||||
add_subdirectory(runtime)
|
||||
|
||||
|
|
@ -16,12 +16,12 @@ if(ENABLE_TESTS)
|
|||
add_definitions("-DTEST_FILES=\"${TEST_MODEL_ZOO}/core/files\"")
|
||||
add_subdirectory(util)
|
||||
add_subdirectory(engines_util)
|
||||
if (NGRAPH_ONNX_FRONTEND_ENABLE)
|
||||
if (ENABLE_OV_ONNX_FRONTEND)
|
||||
add_subdirectory(onnx_test_util)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(NOT NGRAPH_UNIT_TEST_ENABLE)
|
||||
if(NOT ENABLE_OV_CORE_UNIT_TESTS)
|
||||
message(STATUS "nGraph unit tests disabled")
|
||||
return()
|
||||
endif()
|
||||
|
|
@ -445,8 +445,8 @@ endif()
|
|||
|
||||
list(APPEND UNIT_TESTS_DEPENDENCIES template_ov_extension)
|
||||
|
||||
if (ENABLE_MKL_DNN AND NGRAPH_UNIT_TEST_BACKENDS_ENABLE)
|
||||
message(STATUS "NGRAPH_TESTS: IE:CPU enabled")
|
||||
if (ENABLE_MKL_DNN AND ENABLE_OV_CORE_BACKEND_UNIT_TESTS)
|
||||
message(STATUS "OV_CORE_TESTS: IE:CPU enabled")
|
||||
set(ACTIVE_BACKEND_LIST ${ACTIVE_BACKEND_LIST} "IE:CPU")
|
||||
if (ENABLE_STRICT_DEPENDENCIES)
|
||||
# For convinience add a runtime dependency to build along with this target.
|
||||
|
|
@ -455,8 +455,8 @@ if (ENABLE_MKL_DNN AND NGRAPH_UNIT_TEST_BACKENDS_ENABLE)
|
|||
endif()
|
||||
endif()
|
||||
|
||||
if (ENABLE_INTEL_GPU AND NGRAPH_UNIT_TEST_BACKENDS_ENABLE)
|
||||
message(STATUS "NGRAPH_TESTS: IE:GPU enabled")
|
||||
if (ENABLE_INTEL_GPU AND ENABLE_OV_CORE_BACKEND_UNIT_TESTS)
|
||||
message(STATUS "OV_CORE_TESTS: IE:GPU enabled")
|
||||
set(ACTIVE_BACKEND_LIST ${ACTIVE_BACKEND_LIST} "IE:GPU")
|
||||
if (ENABLE_STRICT_DEPENDENCIES)
|
||||
# For convinience add a runtime dependency to build along with this target.
|
||||
|
|
@ -465,7 +465,7 @@ if (ENABLE_INTEL_GPU AND NGRAPH_UNIT_TEST_BACKENDS_ENABLE)
|
|||
endif()
|
||||
endif()
|
||||
|
||||
if (NGRAPH_UNIT_TEST_BACKENDS_ENABLE)
|
||||
if (ENABLE_OV_CORE_BACKEND_UNIT_TESTS)
|
||||
list(APPEND SRC
|
||||
builder.cpp
|
||||
backend_api.cpp)
|
||||
|
|
@ -477,7 +477,7 @@ endif()
|
|||
# 2) They must be in the `test/backend` directory
|
||||
# 3) Include "util/test_control.hpp" in your cpp file
|
||||
# 4) add the line `static string s_manifest = "${MANIFEST}";` to your cpp file
|
||||
# 5) Use the `NGRAPH_TEST` macro in place of `TEST`.
|
||||
# 5) Use the `OV_CORE_TEST` macro in place of `TEST`.
|
||||
# All such files are configured via cmake which replaces all instances of cmake variables
|
||||
# such as ${BACKEND_NAME} with their values, such as CPU, GPU, or INTERPRETER.
|
||||
|
||||
|
|
@ -502,7 +502,7 @@ set(MULTI_TEST_SRC
|
|||
backend/zero_sized.in.cpp
|
||||
)
|
||||
|
||||
if (NGRAPH_ONNX_FRONTEND_ENABLE)
|
||||
if (ENABLE_OV_ONNX_FRONTEND)
|
||||
list(APPEND MULTI_TEST_SRC
|
||||
onnx/onnx_import.in.cpp
|
||||
onnx/onnx_import_com_microsoft.in.cpp
|
||||
|
|
@ -523,7 +523,7 @@ if (NGRAPH_ONNX_FRONTEND_ENABLE)
|
|||
onnx/onnx_transformations.cpp)
|
||||
endif()
|
||||
|
||||
if (NGRAPH_ONNX_FRONTEND_ENABLE)
|
||||
if (ENABLE_OV_ONNX_FRONTEND)
|
||||
list(APPEND SRC onnx/onnx_editor.cpp)
|
||||
list(APPEND MULTI_TEST_SRC
|
||||
onnx/onnx_test_utils.in.cpp
|
||||
|
|
@ -558,26 +558,26 @@ foreach(BACKEND_NAME ${ACTIVE_BACKEND_LIST})
|
|||
message(STATUS "Adding unit test for backend ${BACKEND_NAME}")
|
||||
endforeach()
|
||||
|
||||
add_executable(unit-test ${SRC})
|
||||
add_executable(ov_core_unit_tests ${SRC})
|
||||
|
||||
add_dependencies(unit-test template_extension)
|
||||
add_dependencies(ov_core_unit_tests template_extension)
|
||||
|
||||
target_include_directories(unit-test PRIVATE ".")
|
||||
target_include_directories(unit-test PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/runtime)
|
||||
target_include_directories(ov_core_unit_tests PRIVATE ".")
|
||||
target_include_directories(ov_core_unit_tests PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/runtime)
|
||||
|
||||
get_target_property(NGRAPH_SRC_DIR openvino::core SOURCE_DIR)
|
||||
target_include_directories(unit-test PRIVATE ${NGRAPH_SRC_DIR}/src)
|
||||
get_target_property(OV_CORE_SRC_DIR openvino::core SOURCE_DIR)
|
||||
target_include_directories(ov_core_unit_tests PRIVATE ${OV_CORE_SRC_DIR}/src)
|
||||
|
||||
target_compile_definitions(unit-test
|
||||
target_compile_definitions(ov_core_unit_tests
|
||||
PRIVATE
|
||||
SHARED_LIB_PREFIX="${CMAKE_SHARED_LIBRARY_PREFIX}"
|
||||
SHARED_LIB_SUFFIX="${IE_BUILD_POSTFIX}${CMAKE_SHARED_LIBRARY_SUFFIX}")
|
||||
|
||||
if(UNIT_TESTS_DEPENDENCIES)
|
||||
add_dependencies(unit-test ${UNIT_TESTS_DEPENDENCIES})
|
||||
add_dependencies(ov_core_unit_tests ${UNIT_TESTS_DEPENDENCIES})
|
||||
endif()
|
||||
|
||||
target_link_libraries(unit-test PRIVATE ngraph_test_util
|
||||
target_link_libraries(ov_core_unit_tests PRIVATE ngraph_test_util
|
||||
engines_test_util
|
||||
ngraph::builder
|
||||
openvino::util
|
||||
|
|
@ -592,39 +592,39 @@ target_link_libraries(unit-test PRIVATE ngraph_test_util
|
|||
|
||||
# Protobuf-lite does not support parsing files from prototxt format
|
||||
# Since most of the onnx models are stored in this format it have to be disabled
|
||||
if (NGRAPH_ONNX_FRONTEND_ENABLE)
|
||||
if (ENABLE_OV_ONNX_FRONTEND)
|
||||
# It's needed by onnx_import_library.cpp and onnx_import_exceptions.cpp tests to include onnx_pb.h.
|
||||
# Not linking statically to libprotobuf (linked into libonnx) avoids false-failing onnx_editor tests.
|
||||
target_include_directories(unit-test
|
||||
target_include_directories(ov_core_unit_tests
|
||||
SYSTEM PRIVATE
|
||||
$<TARGET_PROPERTY:onnx,INTERFACE_INCLUDE_DIRECTORIES>
|
||||
$<TARGET_PROPERTY:onnx_proto,INTERFACE_INCLUDE_DIRECTORIES>
|
||||
${Protobuf_INCLUDE_DIRS})
|
||||
target_compile_definitions(unit-test
|
||||
target_compile_definitions(ov_core_unit_tests
|
||||
PRIVATE $<TARGET_PROPERTY:onnx,INTERFACE_COMPILE_DEFINITIONS>)
|
||||
target_compile_definitions(unit-test PRIVATE NGRAPH_ONNX_FRONTEND_ENABLE)
|
||||
target_compile_definitions(ov_core_unit_tests PRIVATE ENABLE_OV_ONNX_FRONTEND)
|
||||
endif()
|
||||
|
||||
if (OV_COMPILER_IS_CLANG)
|
||||
target_compile_options(unit-test PRIVATE -Wno-undef -Wno-reserved-id-macro)
|
||||
target_compile_options(ov_core_unit_tests PRIVATE -Wno-undef -Wno-reserved-id-macro)
|
||||
endif()
|
||||
|
||||
if (NGRAPH_ONNX_FRONTEND_ENABLE)
|
||||
if (ENABLE_OV_ONNX_FRONTEND)
|
||||
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_ov_frontend onnx_test_util)
|
||||
target_include_directories(ov_core_unit_tests PRIVATE ${ONNX_FRONTEND_SRC_DIR}/src)
|
||||
target_link_libraries(ov_core_unit_tests PRIVATE onnx_ov_frontend onnx_test_util)
|
||||
if (LINUX)
|
||||
target_link_options(unit-test PRIVATE -Wl,--exclude-libs,ALL)
|
||||
target_link_options(ov_core_unit_tests PRIVATE -Wl,--exclude-libs,ALL)
|
||||
elseif(APPLE)
|
||||
target_link_options(unit-test PRIVATE -Wl,-dead_strip)
|
||||
target_link_options(ov_core_unit_tests PRIVATE -Wl,-dead_strip)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(NGRAPH_IR_FRONTEND_ENABLE)
|
||||
add_dependencies(unit-test ir_ov_frontend)
|
||||
if(ENABLE_OV_IR_FRONTEND)
|
||||
add_dependencies(ov_core_unit_tests ir_ov_frontend)
|
||||
endif()
|
||||
|
||||
install(TARGETS unit-test
|
||||
install(TARGETS ov_core_unit_tests
|
||||
RUNTIME DESTINATION tests
|
||||
COMPONENT tests
|
||||
EXCLUDE_FROM_ALL)
|
||||
|
|
@ -632,4 +632,4 @@ install(TARGETS unit-test
|
|||
add_subdirectory(frontend)
|
||||
|
||||
# process models
|
||||
add_dependencies(unit-test test_model_zoo)
|
||||
add_dependencies(ov_core_unit_tests test_model_zoo)
|
||||
|
|
|
|||
|
|
@ -3,15 +3,15 @@
|
|||
#
|
||||
add_subdirectory(shared)
|
||||
|
||||
if (NGRAPH_PDPD_FRONTEND_ENABLE)
|
||||
if (ENABLE_OV_PDPD_FRONTEND)
|
||||
add_subdirectory(paddlepaddle)
|
||||
endif()
|
||||
|
||||
if (NGRAPH_ONNX_FRONTEND_ENABLE)
|
||||
if (ENABLE_OV_ONNX_FRONTEND)
|
||||
add_subdirectory(onnx)
|
||||
endif()
|
||||
|
||||
if (NGRAPH_TF_FRONTEND_ENABLE)
|
||||
if (ENABLE_OV_TF_FRONTEND)
|
||||
add_subdirectory(tensorflow)
|
||||
endif()
|
||||
|
||||
|
|
@ -24,7 +24,7 @@ target_compile_definitions(${MOCK1_FE_NAME} PRIVATE "-DMOCK_VARIANT=\"1\"")
|
|||
target_include_directories(${MOCK1_FE_NAME} PRIVATE ".")
|
||||
|
||||
target_link_libraries(${MOCK1_FE_NAME} PRIVATE frontend_common)
|
||||
add_dependencies(unit-test ${MOCK1_FE_NAME})
|
||||
add_dependencies(ov_core_unit_tests ${MOCK1_FE_NAME})
|
||||
|
||||
add_clang_format_target(${MOCK1_FE_NAME}_clang FOR_TARGETS ${MOCK1_FE_NAME})
|
||||
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ protected:
|
|||
}
|
||||
};
|
||||
|
||||
#ifdef NGRAPH_ONNX_FRONTEND_ENABLE
|
||||
#ifdef ENABLE_OV_ONNX_FRONTEND
|
||||
|
||||
TEST_F(SerializationDeterministicityTest, BasicModel) {
|
||||
const std::string model = ov::util::path_join({SERIALIZED_ZOO, "ir/add_abc.onnx"});
|
||||
|
|
|
|||
|
|
@ -77,7 +77,7 @@ INSTANTIATE_TEST_SUITE_P(
|
|||
std::make_tuple("if_diff_case.xml", "if_diff_case.bin"),
|
||||
std::make_tuple("if_body_without_parameters.xml", "if_body_without_parameters.bin")));
|
||||
|
||||
#ifdef NGRAPH_ONNX_FRONTEND_ENABLE
|
||||
#ifdef ENABLE_OV_ONNX_FRONTEND
|
||||
|
||||
INSTANTIATE_TEST_SUITE_P(ONNXSerialization,
|
||||
SerializationTest,
|
||||
|
|
|
|||
|
|
@ -128,7 +128,7 @@ runtime::ie::IE_Executable::IE_Executable(shared_ptr<Function> func, string devi
|
|||
}
|
||||
}
|
||||
|
||||
#ifdef OPENVINO_DEBUG_ENABLE
|
||||
#ifdef ENABLE_OPENVINO_DEBUG
|
||||
cout << "Nodes in test: ";
|
||||
for (const auto& node : func->get_ops()) {
|
||||
cout << node << endl;
|
||||
|
|
|
|||
|
|
@ -4,19 +4,19 @@
|
|||
|
||||
add_subdirectory(common)
|
||||
|
||||
if(NGRAPH_ONNX_FRONTEND_ENABLE)
|
||||
if(ENABLE_OV_ONNX_FRONTEND)
|
||||
add_subdirectory(onnx)
|
||||
endif()
|
||||
|
||||
if(NGRAPH_PDPD_FRONTEND_ENABLE)
|
||||
if(ENABLE_OV_PDPD_FRONTEND)
|
||||
add_subdirectory(paddlepaddle)
|
||||
endif()
|
||||
|
||||
if(NGRAPH_IR_FRONTEND_ENABLE)
|
||||
if(ENABLE_OV_IR_FRONTEND)
|
||||
add_subdirectory(ir)
|
||||
endif()
|
||||
|
||||
if(NGRAPH_TF_FRONTEND_ENABLE)
|
||||
if(ENABLE_OV_TF_FRONTEND)
|
||||
add_subdirectory(tensorflow)
|
||||
endif()
|
||||
|
||||
|
|
|
|||
|
|
@ -251,7 +251,7 @@ openvino_developer_export_targets(COMPONENT inference_engine TARGETS ${TARGET_NA
|
|||
# install TBB
|
||||
|
||||
list(APPEND core_components ngraph)
|
||||
list(APPEND PATH_VARS "IE_INCLUDE_DIR" "IE_NGRAPH_DIR"
|
||||
list(APPEND PATH_VARS "IE_INCLUDE_DIR" "OV_CORE_DIR"
|
||||
"IE_PARALLEL_CMAKE")
|
||||
|
||||
# define variables for InferenceEngineConfig.cmake
|
||||
|
|
@ -351,7 +351,7 @@ install(EXPORT OpenVINOTargets
|
|||
DESTINATION runtime/cmake
|
||||
COMPONENT core_dev)
|
||||
|
||||
set(IE_NGRAPH_DIR "${CMAKE_BINARY_DIR}/src/core")
|
||||
set(OV_CORE_DIR "${CMAKE_BINARY_DIR}/src/core")
|
||||
set(IE_INCLUDE_DIR "${PUBLIC_HEADERS_DIR}/ie")
|
||||
set(IE_PARALLEL_CMAKE "${OpenVINO_SOURCE_DIR}/cmake/ie_parallel.cmake")
|
||||
|
||||
|
|
@ -366,7 +366,7 @@ configure_package_config_file("${OpenVINO_SOURCE_DIR}/cmake/templates/OpenVINOCo
|
|||
PATH_VARS ${PATH_VARS})
|
||||
|
||||
set(IE_INCLUDE_DIR "include/ie")
|
||||
set(IE_NGRAPH_DIR ".")
|
||||
set(OV_CORE_DIR ".")
|
||||
set(IE_TBB_DIR "${IE_TBB_DIR_INSTALL}")
|
||||
set(IE_TBBBIND_DIR "${IE_TBBBIND_DIR_INSTALL}")
|
||||
set(IE_PARALLEL_CMAKE "cmake/ie_parallel.cmake")
|
||||
|
|
|
|||
|
|
@ -71,7 +71,7 @@ openvino_developer_export_targets(COMPONENT openvino_common TARGETS gflags)
|
|||
# Google Tests framework
|
||||
#
|
||||
|
||||
if(NGRAPH_UNIT_TEST_ENABLE OR ENABLE_TESTS)
|
||||
if(ENABLE_OV_CORE_UNIT_TESTS OR ENABLE_TESTS)
|
||||
add_subdirectory(gtest EXCLUDE_FROM_ALL)
|
||||
|
||||
openvino_developer_export_targets(COMPONENT inference_engine_tests
|
||||
|
|
@ -82,8 +82,8 @@ endif()
|
|||
# Protobuf
|
||||
#
|
||||
|
||||
if(NGRAPH_PDPD_FRONTEND_ENABLE OR NGRAPH_ONNX_FRONTEND_ENABLE OR NGRAPH_TF_FRONTEND_ENABLE)
|
||||
if(NGRAPH_USE_SYSTEM_PROTOBUF)
|
||||
if(ENABLE_OV_PDPD_FRONTEND OR ENABLE_OV_ONNX_FRONTEND OR ENABLE_OV_TF_FRONTEND)
|
||||
if(ENABLE_SYSTEM_PROTOBUF)
|
||||
set(Protobuf_USE_STATIC_LIBS ON)
|
||||
if(VERBOSE_BUILD)
|
||||
set(Protobuf_DEBUG ON)
|
||||
|
|
@ -111,7 +111,7 @@ if(NGRAPH_PDPD_FRONTEND_ENABLE OR NGRAPH_ONNX_FRONTEND_ENABLE OR NGRAPH_TF_FRONT
|
|||
# set public / interface compile options
|
||||
foreach(target IN LISTS Protobuf_LITE_LIBRARIES Protobuf_LIBRARIES)
|
||||
set(link_type PUBLIC)
|
||||
if(NGRAPH_USE_SYSTEM_PROTOBUF)
|
||||
if(ENABLE_SYSTEM_PROTOBUF)
|
||||
set(link_type INTERFACE)
|
||||
endif()
|
||||
if(CMAKE_COMPILER_IS_GNUCXX OR OV_COMPILER_IS_CLANG)
|
||||
|
|
@ -124,7 +124,7 @@ endif()
|
|||
# ONNX
|
||||
#
|
||||
|
||||
if(NGRAPH_ONNX_FRONTEND_ENABLE)
|
||||
if(ENABLE_OV_ONNX_FRONTEND)
|
||||
add_subdirectory(onnx)
|
||||
endif()
|
||||
|
||||
|
|
@ -191,7 +191,7 @@ endif()
|
|||
#
|
||||
# nlohmann json
|
||||
#
|
||||
if(ENABLE_SAMPLES OR NGRAPH_PDPD_FRONTEND_ENABLE OR NGRAPH_ONNX_FRONTEND_ENABLE OR NGRAPH_TF_FRONTEND_ENABLE)
|
||||
if(ENABLE_SAMPLES OR ENABLE_OV_PDPD_FRONTEND OR ENABLE_OV_ONNX_FRONTEND OR ENABLE_OV_TF_FRONTEND)
|
||||
add_subdirectory(nlohmann_json EXCLUDE_FROM_ALL)
|
||||
openvino_developer_export_targets(COMPONENT openvino_common TARGETS nlohmann_json)
|
||||
endif()
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
#------------------------------------------------------------------------------
|
||||
|
||||
set(CMAKE_INTERPROCEDURAL_OPTIMIZATION_RELEASE OFF)
|
||||
set(NGRAPH_ONNX_NAMESPACE ngraph_onnx)
|
||||
set(OV_ONNX_NAMESPACE ngraph_onnx)
|
||||
|
||||
if(NOT DEFINED ONNX_USE_MSVC_STATIC_RUNTIME)
|
||||
set(ONNX_USE_MSVC_STATIC_RUNTIME OFF)
|
||||
|
|
@ -20,7 +20,7 @@ else()
|
|||
endif()
|
||||
|
||||
set(ONNX_USE_PROTOBUF_SHARED_LIBS CACHE BOOL "Use dynamic protobuf by ONNX library" FORCE)
|
||||
set(ONNX_NAMESPACE ${NGRAPH_ONNX_NAMESPACE})
|
||||
set(ONNX_NAMESPACE ${OV_ONNX_NAMESPACE})
|
||||
set(ONNX_USE_LITE_PROTO ${ONNX_USE_LITE_PROTO_DEFAULT} CACHE BOOL "Use protobuf lite for ONNX library" FORCE)
|
||||
set(ONNX_ML ON CACHE BOOL "Use ONNX ML" FORCE)
|
||||
if(CMAKE_CROSSCOMPILING)
|
||||
|
|
|
|||
Loading…
Reference in New Issue