diff --git a/.ci/azure/linux.yml b/.ci/azure/linux.yml index 4ed0a79a285..2773219c509 100644 --- a/.ci/azure/linux.yml +++ b/.ci/azure/linux.yml @@ -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 diff --git a/.ci/azure/linux_lohika.yml b/.ci/azure/linux_lohika.yml index 8d9e8e2b735..7e17b599bd4 100644 --- a/.ci/azure/linux_lohika.yml +++ b/.ci/azure/linux_lohika.yml @@ -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 diff --git a/.ci/azure/linux_onnxruntime.yml b/.ci/azure/linux_onnxruntime.yml index 9af22f43757..aea34597765 100644 --- a/.ci/azure/linux_onnxruntime.yml +++ b/.ci/azure/linux_onnxruntime.yml @@ -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) diff --git a/.ci/azure/mac.yml b/.ci/azure/mac.yml index bf61f09c8b2..f6bd7a58e94 100644 --- a/.ci/azure/mac.yml +++ b/.ci/azure/mac.yml @@ -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 diff --git a/.ci/azure/windows.yml b/.ci/azure/windows.yml index 9ada0e3b125..d7db2eab462 100644 --- a/.ci/azure/windows.yml +++ b/.ci/azure/windows.yml @@ -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 diff --git a/.ci/openvino-onnx/Dockerfile b/.ci/openvino-onnx/Dockerfile index 4a53fa16f87..dc35c16a643 100644 --- a/.ci/openvino-onnx/Dockerfile +++ b/.ci/openvino-onnx/Dockerfile @@ -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 diff --git a/cmake/coverage.cmake b/cmake/coverage.cmake index 8a793786095..c374d022a20 100644 --- a/cmake/coverage.cmake +++ b/cmake/coverage.cmake @@ -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/*") diff --git a/cmake/features.cmake b/cmake/features.cmake index 0167b3ee942..1d0353f9fbd 100644 --- a/cmake/features.cmake +++ b/cmake/features.cmake @@ -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) diff --git a/cmake/templates/OpenVINOConfig.cmake.in b/cmake/templates/OpenVINOConfig.cmake.in index 884ddf5cb1d..cf002cd0bd9 100644 --- a/cmake/templates/OpenVINOConfig.cmake.in +++ b/cmake/templates/OpenVINOConfig.cmake.in @@ -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}) diff --git a/cmake/test_model_zoo.cmake b/cmake/test_model_zoo.cmake index a9f6356826a..63446532639 100644 --- a/cmake/test_model_zoo.cmake +++ b/cmake/test_model_zoo.cmake @@ -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() diff --git a/docs/CMakeLists.txt b/docs/CMakeLists.txt index b0cbcdf899d..0eb202372e3 100644 --- a/docs/CMakeLists.txt +++ b/docs/CMakeLists.txt @@ -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) diff --git a/docs/nGraph_DG/nGraph_debug_capabilities.md b/docs/nGraph_DG/nGraph_debug_capabilities.md index 971db2eeaed..2c49e1f4b54 100644 --- a/docs/nGraph_DG/nGraph_debug_capabilities.md +++ b/docs/nGraph_DG/nGraph_debug_capabilities.md @@ -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: diff --git a/docs/snippets/CMakeLists.txt b/docs/snippets/CMakeLists.txt index 38f99354dd9..9cda8490a47 100644 --- a/docs/snippets/CMakeLists.txt +++ b/docs/snippets/CMakeLists.txt @@ -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() diff --git a/inference-engine/ie_bridges/python/wheel/setup.py b/inference-engine/ie_bridges/python/wheel/setup.py index de276d831d9..eb1a643586c 100644 --- a/inference-engine/ie_bridges/python/wheel/setup.py +++ b/inference-engine/ie_bridges/python/wheel/setup.py @@ -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, diff --git a/inference-engine/src/offline_transformations/src/pruning/pruning.cpp b/inference-engine/src/offline_transformations/src/pruning/pruning.cpp index 9d80dcb1403..3338f027b59 100644 --- a/inference-engine/src/offline_transformations/src/pruning/pruning.cpp +++ b/inference-engine/src/offline_transformations/src/pruning/pruning.cpp @@ -21,7 +21,7 @@ bool ngraph::pass::Pruning::run_on_function(std::shared_ptr f) { manager.register_pass(); manager.register_pass(); -#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& attributes) { @@ -56,7 +56,7 @@ bool ngraph::pass::Pruning::run_on_function(std::shared_ptr f) { manager.register_pass(); -#ifdef OPENVINO_DEBUG_ENABLE +#ifdef ENABLE_OPENVINO_DEBUG // Uncomment following line and change path to resulting svg file // manager.register_pass("/tmp/after.svg"); #endif diff --git a/inference-engine/tests/functional/inference_engine/CMakeLists.txt b/inference-engine/tests/functional/inference_engine/CMakeLists.txt index e3f7388aa31..b1fccae7f83 100644 --- a/inference-engine/tests/functional/inference_engine/CMakeLists.txt +++ b/inference-engine/tests/functional/inference_engine/CMakeLists.txt @@ -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) diff --git a/inference-engine/tests/functional/inference_engine/ir_serialization/custom_ops.cpp b/inference-engine/tests/functional/inference_engine/ir_serialization/custom_ops.cpp index 25a3a6e28e5..b2ec82f2d8d 100644 --- a/inference-engine/tests/functional/inference_engine/ir_serialization/custom_ops.cpp +++ b/inference-engine/tests/functional/inference_engine/ir_serialization/custom_ops.cpp @@ -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( - {}, std::string("template_extension") + IE_BUILD_POSTFIX); + return FileUtils::makePluginLibraryName({}, std::string("template_extension") + IE_BUILD_POSTFIX); } static std::string get_ov_extension_path() { - return FileUtils::makePluginLibraryName( - {}, std::string("template_ov_extension") + IE_BUILD_POSTFIX); + return FileUtils::makePluginLibraryName({}, 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( - get_extension_path())); + ie.AddExtension(std::make_shared(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( - get_extension_path())); + ie.AddExtension(std::make_shared(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( - get_extension_path()); + auto extension = std::make_shared(get_extension_path()); ie.AddExtension(extension); auto expected = ie.ReadNetwork(model); ngraph::pass::Manager manager; manager.register_pass( - 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(); @@ -160,37 +139,34 @@ TEST_F(CustomOpsSerializationTest, CustomOpNoExtensions) { auto expected = ie.ReadNetwork(model); ngraph::pass::Manager manager; manager.register_pass( - 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( - 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; } diff --git a/inference-engine/tests/functional/plugin/cpu/CMakeLists.txt b/inference-engine/tests/functional/plugin/cpu/CMakeLists.txt index 6535fca61e3..e60fc572283 100644 --- a/inference-engine/tests/functional/plugin/cpu/CMakeLists.txt +++ b/inference-engine/tests/functional/plugin/cpu/CMakeLists.txt @@ -11,7 +11,7 @@ target_link_libraries(cpuSpecificRtInfo PRIVATE ngraph) set(INCLUDES ${CMAKE_CURRENT_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) diff --git a/inference-engine/tests/functional/plugin/shared/CMakeLists.txt b/inference-engine/tests/functional/plugin/shared/CMakeLists.txt index de2e4b3692f..9136d627289 100644 --- a/inference-engine/tests/functional/plugin/shared/CMakeLists.txt +++ b/inference-engine/tests/functional/plugin/shared/CMakeLists.txt @@ -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() diff --git a/inference-engine/tests/unit/CMakeLists.txt b/inference-engine/tests/unit/CMakeLists.txt index fbda2f36430..e2204b7371d 100644 --- a/inference-engine/tests/unit/CMakeLists.txt +++ b/inference-engine/tests/unit/CMakeLists.txt @@ -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() diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index a98635a36a3..b04df6c713d 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -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() diff --git a/src/bindings/python/BUILDING.md b/src/bindings/python/BUILDING.md index e5956e08e9f..bc7b843b1e2 100644 --- a/src/bindings/python/BUILDING.md +++ b/src/bindings/python/BUILDING.md @@ -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" diff --git a/src/bindings/python/CMakeLists.txt b/src/bindings/python/CMakeLists.txt index 86df56bdb0d..8d1003710f7 100644 --- a/src/bindings/python/CMakeLists.txt +++ b/src/bindings/python/CMakeLists.txt @@ -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 diff --git a/src/bindings/python/setup.py b/src/bindings/python/setup.py index 6262ff4f9ce..3b2b0407746 100644 --- a/src/bindings/python/setup.py +++ b/src/bindings/python/setup.py @@ -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) diff --git a/src/bindings/python/src/pyopenvino/pyopenvino.cpp b/src/bindings/python/src/pyopenvino/pyopenvino.cpp index 7f5181f59b5..8ef3d6530dc 100644 --- a/src/bindings/python/src/pyopenvino/pyopenvino.cpp +++ b/src/bindings/python/src/pyopenvino/pyopenvino.cpp @@ -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); diff --git a/src/common/util/include/openvino/util/log.hpp b/src/common/util/include/openvino/util/log.hpp index aca1e0150f5..ea671315978 100644 --- a/src/common/util/include/openvino/util/log.hpp +++ b/src/common/util/include/openvino/util/log.hpp @@ -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__), \ diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt index 48bc4b6d698..93913b0d132 100644 --- a/src/core/CMakeLists.txt +++ b/src/core/CMakeLists.txt @@ -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 $) # Defines macro in C++ to load backend plugin -target_include_directories(ngraph PUBLIC $ +target_include_directories(ngraph PUBLIC $ PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src) # Add an alias so that library can be used inside the build tree, e.g. when testing diff --git a/src/core/builder/CMakeLists.txt b/src/core/builder/CMakeLists.txt index 118a0e79053..672d831b429 100644 --- a/src/core/builder/CMakeLists.txt +++ b/src/core/builder/CMakeLists.txt @@ -24,7 +24,7 @@ ie_faster_build(${TARGET_NAME} target_include_directories(${TARGET_NAME} PUBLIC $ - $) + $) if(NOT BUILD_SHARED_LIBS) target_compile_definitions(${TARGET_NAME} PUBLIC OPENVINO_STATIC_LIBRARY) diff --git a/src/core/include/ngraph/log.hpp b/src/core/include/ngraph/log.hpp index 80f529f78a3..7227404f61f 100644 --- a/src/core/include/ngraph/log.hpp +++ b/src/core/include/ngraph/log.hpp @@ -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__), \ diff --git a/src/core/include/ngraph/ngraph.hpp b/src/core/include/ngraph/ngraph.hpp index 63b440f5985..45108e821d9 100644 --- a/src/core/include/ngraph/ngraph.hpp +++ b/src/core/include/ngraph/ngraph.hpp @@ -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 diff --git a/src/core/reference/CMakeLists.txt b/src/core/reference/CMakeLists.txt index 860e7124787..6c9daaefe50 100644 --- a/src/core/reference/CMakeLists.txt +++ b/src/core/reference/CMakeLists.txt @@ -34,7 +34,7 @@ endif() target_include_directories(${TARGET_NAME} PUBLIC $ - $) + $) link_system_libraries(${TARGET_NAME} PRIVATE xbyak) diff --git a/src/core/shape_inference/CMakeLists.txt b/src/core/shape_inference/CMakeLists.txt index f769ae59d3e..321abd5b4ac 100644 --- a/src/core/shape_inference/CMakeLists.txt +++ b/src/core/shape_inference/CMakeLists.txt @@ -20,7 +20,7 @@ add_library(${TARGET_NAME} STATIC ${LIBRARY_SRC} ${PUBLIC_HEADERS}) target_include_directories(${TARGET_NAME} PUBLIC $ - $) + $) if(NOT BUILD_SHARED_LIBS) target_compile_definitions(${TARGET_NAME} PUBLIC OPENVINO_STATIC_LIBRARY) diff --git a/src/core/tests/CMakeLists.txt b/src/core/tests/CMakeLists.txt index 23df28547a9..dd52e8e5728 100644 --- a/src/core/tests/CMakeLists.txt +++ b/src/core/tests/CMakeLists.txt @@ -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 $ $ ${Protobuf_INCLUDE_DIRS}) - target_compile_definitions(unit-test + target_compile_definitions(ov_core_unit_tests PRIVATE $) - 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) diff --git a/src/core/tests/frontend/CMakeLists.txt b/src/core/tests/frontend/CMakeLists.txt index 157cfe31aba..cc66e049c86 100644 --- a/src/core/tests/frontend/CMakeLists.txt +++ b/src/core/tests/frontend/CMakeLists.txt @@ -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}) diff --git a/src/core/tests/pass/serialization/deterministicity.cpp b/src/core/tests/pass/serialization/deterministicity.cpp index 0afd4ee98a3..984f9004962 100644 --- a/src/core/tests/pass/serialization/deterministicity.cpp +++ b/src/core/tests/pass/serialization/deterministicity.cpp @@ -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"}); diff --git a/src/core/tests/pass/serialization/serialize.cpp b/src/core/tests/pass/serialization/serialize.cpp index cac86facd02..854fc2b7f9d 100644 --- a/src/core/tests/pass/serialization/serialize.cpp +++ b/src/core/tests/pass/serialization/serialize.cpp @@ -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, diff --git a/src/core/tests/runtime/ie/ie_executable.cpp b/src/core/tests/runtime/ie/ie_executable.cpp index bce24306031..ac70f83493d 100644 --- a/src/core/tests/runtime/ie/ie_executable.cpp +++ b/src/core/tests/runtime/ie/ie_executable.cpp @@ -128,7 +128,7 @@ runtime::ie::IE_Executable::IE_Executable(shared_ptr 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; diff --git a/src/frontends/CMakeLists.txt b/src/frontends/CMakeLists.txt index d8db4a68ed6..8f1830bf5a9 100644 --- a/src/frontends/CMakeLists.txt +++ b/src/frontends/CMakeLists.txt @@ -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() diff --git a/src/inference/CMakeLists.txt b/src/inference/CMakeLists.txt index cfa88db0b55..0e06c4b84c3 100644 --- a/src/inference/CMakeLists.txt +++ b/src/inference/CMakeLists.txt @@ -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") diff --git a/thirdparty/CMakeLists.txt b/thirdparty/CMakeLists.txt index 859b6f29c58..bab7bb35674 100644 --- a/thirdparty/CMakeLists.txt +++ b/thirdparty/CMakeLists.txt @@ -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() diff --git a/thirdparty/onnx/CMakeLists.txt b/thirdparty/onnx/CMakeLists.txt index 0bafecc72c5..42fbd1871f8 100644 --- a/thirdparty/onnx/CMakeLists.txt +++ b/thirdparty/onnx/CMakeLists.txt @@ -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)