From 27cbc1a969cb954710bb7d10fd276e18975c2b4f Mon Sep 17 00:00:00 2001 From: Ilya Lavrenov Date: Tue, 23 Aug 2022 01:39:23 +0400 Subject: [PATCH] Debian packages for frontends (#12649) * Created dedicated debian packages for frontends * Fixed Azure CI * Install TF FE with both names * Disabled 2 QN tests * Install python samples differently --- .ci/azure/linux.yml | 7 +- .ci/azure/linux_debian.yml | 14 ++- CMakeLists.txt | 1 + .../frontends/frontends.cmake | 19 +++- .../developer_package/packaging/debian.cmake | 3 +- cmake/packaging/debian.cmake | 94 ++++++++++++++++--- src/bindings/python/wheel/CMakeLists.txt | 3 +- src/bindings/python/wheel/setup.py | 24 +++++ src/common/itt/CMakeLists.txt | 2 +- src/frontends/tensorflow/CMakeLists.txt | 43 +++++---- .../intel_gna/optimizer/gna_pass_manager.cpp | 5 +- .../behavior/ov_plugin/core_integration.hpp | 2 +- .../behavior/plugin/core_integration.hpp | 2 +- thirdparty/CMakeLists.txt | 12 +-- thirdparty/ittapi/CMakeLists.txt | 2 +- 15 files changed, 180 insertions(+), 53 deletions(-) diff --git a/.ci/azure/linux.yml b/.ci/azure/linux.yml index 404557451ec..ff8200fa1e8 100644 --- a/.ci/azure/linux.yml +++ b/.ci/azure/linux.yml @@ -30,18 +30,21 @@ jobs: # PYTHON_STATIC_ARGS: # CMAKE_CPACK_GENERATOR: # SAMPLES_INSTALL_DIR: $(INSTALL_DIR)/samples + # PYTHON_SAMPLES_INSTALL_DIR: $(SAMPLES_INSTALL_DIR)/python # RUN_PREFIX: . $(SETUPVARS) -pyver 3.8 && # Debian: # CMAKE_BUILD_SHARED_LIBS: 'ON' # PYTHON_STATIC_ARGS: # CMAKE_CPACK_GENERATOR: 'DEB' - # SAMPLES_INSTALL_DIR: /usr/share/openvino-2022.3.0/samples + # SAMPLES_INSTALL_DIR: /usr/share/openvino/samples + # PYTHON_SAMPLES_INSTALL_DIR: $(INSTALL_DIR)/share/openvino/samples/python # RUN_PREFIX: LD_LIBRARY_PATH=$(INSTALL_TEST_DIR):$(INSTALL_DIR)/opencv/lib:$LD_LIBRARY_PATH Static: CMAKE_BUILD_SHARED_LIBS: 'OFF' PYTHON_STATIC_ARGS: -m "not dynamic_library and not template_plugin" CMAKE_CPACK_GENERATOR: SAMPLES_INSTALL_DIR: $(INSTALL_DIR)/samples + PYTHON_SAMPLES_INSTALL_DIR: $(SAMPLES_INSTALL_DIR)/python RUN_PREFIX: . $(SETUPVARS) -pyver 3.8 && maxParallel: 2 @@ -425,7 +428,7 @@ jobs: export PATH=$HOME/.local/bin:$PATH export IE_APP_PATH=$(INSTALL_DIR)/samples_bin export LD_LIBRARY_PATH=$IE_APP_PATH:$LD_LIBRARY_PATH - export IE_APP_PYTHON_PATH=$(SAMPLES_INSTALL_DIR)/python/ + export IE_APP_PYTHON_PATH=$(PYTHON_SAMPLES_INSTALL_DIR)/ export SHARE=$(INSTALL_TEST_DIR)/smoke_tests/samples_smoke_tests_data/ export WORKSPACE=$(INSTALL_DIR) $(RUN_PREFIX) python3 -m pytest $(INSTALL_TEST_DIR)/smoke_tests/ --env_conf $(INSTALL_TEST_DIR)/smoke_tests/env_config.yml -s --junitxml=$(INSTALL_TEST_DIR)/TEST-SamplesSmokeTests.xml diff --git a/.ci/azure/linux_debian.yml b/.ci/azure/linux_debian.yml index 1019b66c1f3..61ed3384ddc 100644 --- a/.ci/azure/linux_debian.yml +++ b/.ci/azure/linux_debian.yml @@ -45,7 +45,8 @@ jobs: INSTALL_DIR: $(WORK_DIR)/install_pkg INSTALL_TEST_DIR: $(INSTALL_DIR)/tests LAYER_TESTS_DIR: $(INSTALL_TEST_DIR)/layer_tests - SAMPLES_INSTALL_DIR: /usr/share/openvino-2022.3.0/samples + SAMPLES_INSTALL_DIR: /usr/share/openvino/samples + PYTHON_SAMPLES_INSTALL_DIR: $(INSTALL_DIR)/share/openvino/samples/python TMP_DIR: /mnt/tmp SHARE_DIR: /mount/cinfsshare/onnxtestdata CCACHE_DIR: $(SHARE_DIR)/ccache/master/linux @@ -194,6 +195,12 @@ jobs: - script: cmake -DCOMPONENT=python_wheels -DCMAKE_INSTALL_PREFIX=$(INSTALL_DIR) -P $(BUILD_DIR)/cmake_install.cmake displayName: 'Install wheel packages' + - script: cmake -DCOMPONENT=python_samples -DCMAKE_INSTALL_PREFIX=$(INSTALL_DIR) -P $(BUILD_DIR)/cmake_install.cmake + displayName: 'Install Python Samples' + + - script: cmake -DCOMPONENT=gna -DCMAKE_INSTALL_PREFIX=$(INSTALL_DIR) -P $(BUILD_DIR)/cmake_install.cmake + displayName: 'Install GNA plugin' + - script: cmake -DCOMPONENT=tests -DCMAKE_INSTALL_PREFIX=$(INSTALL_DIR) -P $(BUILD_LAYER_TESTS_DIR)/cmake_install.cmake displayName: 'Install Layer Tests' @@ -301,6 +308,7 @@ jobs: continueOnError: false - script: | + export LD_LIBRARY_PATH=$(INSTALL_TEST_DIR):$LD_LIBRARY_PATH export OV_FRONTEND_PATH=$(INSTALL_TEST_DIR) $(INSTALL_TEST_DIR)/tensorflow_tests --gtest_print_time=1 --gtest_output=xml:$(INSTALL_TEST_DIR)/TEST-Tensorflow.xml displayName: 'Tensorflow Frontend UT' @@ -389,7 +397,9 @@ jobs: export PATH=$HOME/.local/bin:$PATH export IE_APP_PATH=$(INSTALL_DIR)/samples_bin export LD_LIBRARY_PATH=$IE_APP_PATH:$LD_LIBRARY_PATH - export IE_APP_PYTHON_PATH=$(SAMPLES_INSTALL_DIR)/python/ + # for gna plugin + export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$(INSTALL_DIR)/lib/x86_64-linux-gnu:$(INSTALL_DIR)/lib/x86_64-linux-gnu/openvino-2022.3.0 + export IE_APP_PYTHON_PATH=$(PYTHON_SAMPLES_INSTALL_DIR)/ export SHARE=$(INSTALL_TEST_DIR)/smoke_tests/samples_smoke_tests_data/ export WORKSPACE=$(INSTALL_DIR) python3 -m pytest $(INSTALL_TEST_DIR)/smoke_tests/ --env_conf $(INSTALL_TEST_DIR)/smoke_tests/env_config.yml -s --junitxml=$(INSTALL_TEST_DIR)/TEST-SamplesSmokeTests.xml diff --git a/CMakeLists.txt b/CMakeLists.txt index 7de988ce732..66d768884ef 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -12,6 +12,7 @@ else() # we have to use CPACK_DEBIAN_PACKAGE_SHLIBDEPS_PRIVATE_DIRS variable cmake_minimum_required(VERSION 3.20) else() + # default choice cmake_minimum_required(VERSION 3.13) endif() endif() diff --git a/cmake/developer_package/frontends/frontends.cmake b/cmake/developer_package/frontends/frontends.cmake index e920cc1cd67..67b3e6757b0 100644 --- a/cmake/developer_package/frontends/frontends.cmake +++ b/cmake/developer_package/frontends/frontends.cmake @@ -232,18 +232,27 @@ macro(ov_add_frontend) if(NOT OV_FRONTEND_SKIP_INSTALL) if(BUILD_SHARED_LIBS) + # Note: + # we use 'framework' as component for deployment scenario, i.e. for libraries itself + # and use common 'core_dev' component for headers, cmake files and symlinks to versioned library + set(lib_component "${OV_FRONTEND_NAME}") + set(dev_component "${OV_CPACK_COMP_CORE_DEV}") + + # TODO: whether we need to do it configuralbe on Windows installer? + ie_cpack_add_component(${lib_component} HIDDEN) + if(OV_FRONTEND_LINKABLE_FRONTEND) set(export_set EXPORT OpenVINOTargets) set(archive_dest ARCHIVE DESTINATION ${OV_CPACK_ARCHIVEDIR} - COMPONENT ${OV_CPACK_COMP_CORE}) - set(namelink NAMELINK_COMPONENT ${OV_CPACK_COMP_CORE_DEV}) + COMPONENT ${lib_component}) + set(namelink NAMELINK_COMPONENT ${dev_component}) else() set(namelink NAMELINK_SKIP) endif() install(TARGETS ${TARGET_NAME} ${export_set} - RUNTIME DESTINATION ${OV_CPACK_RUNTIMEDIR} COMPONENT ${OV_CPACK_COMP_CORE} + RUNTIME DESTINATION ${OV_CPACK_RUNTIMEDIR} COMPONENT ${lib_component} ${archive_dest} - LIBRARY DESTINATION ${OV_CPACK_LIBRARYDIR} COMPONENT ${OV_CPACK_COMP_CORE} + LIBRARY DESTINATION ${OV_CPACK_LIBRARYDIR} COMPONENT ${lib_component} ${namelink}) else() ov_install_static_lib(${TARGET_NAME} ${OV_CPACK_COMP_CORE}) @@ -253,7 +262,7 @@ macro(ov_add_frontend) # install library development files install(DIRECTORY ${${TARGET_NAME}_INCLUDE_DIR}/openvino DESTINATION ${FRONTEND_INSTALL_INCLUDE}/ - COMPONENT ${OV_CPACK_COMP_CORE_DEV} + COMPONENT ${dev_component} FILES_MATCHING PATTERN "*.hpp") set_target_properties(${TARGET_NAME} PROPERTIES EXPORT_NAME frontend::${OV_FRONTEND_NAME}) diff --git a/cmake/developer_package/packaging/debian.cmake b/cmake/developer_package/packaging/debian.cmake index c04a65b1ed8..b573a86c63e 100644 --- a/cmake/developer_package/packaging/debian.cmake +++ b/cmake/developer_package/packaging/debian.cmake @@ -24,7 +24,7 @@ macro(ov_debian_cpack_set_dirs) # non-native stuff set(OV_CPACK_PYTHONDIR ${OV_CPACK_PLUGINSDIR}) - set(OV_CPACK_SHAREDIR ${CMAKE_INSTALL_DATADIR}/openvino-${OpenVINO_VERSION}) # internal + set(OV_CPACK_SHAREDIR ${CMAKE_INSTALL_DATADIR}/openvino) # internal set(OV_CPACK_SAMPLESDIR ${OV_CPACK_SHAREDIR}/samples) set(OV_CPACK_DEVREQDIR ${OV_CPACK_SHAREDIR}) unset(OV_CPACK_SHAREDIR) @@ -57,7 +57,6 @@ macro(ov_override_component_names) # merge all C / C++ samples as a single samples component set(OV_CPACK_COMP_CPP_SAMPLES "samples") set(OV_CPACK_COMP_C_SAMPLES "${OV_CPACK_COMP_CPP_SAMPLES}") - # set(OV_CPACK_COMP_PYTHON_SAMPLES "${OV_CPACK_COMP_CPP_SAMPLES}") # move requirements.txt to core-dev set(OV_CPACK_COMP_DEV_REQ_FILES "${OV_CPACK_COMP_CORE_DEV}") # move core_tools to core-dev diff --git a/cmake/packaging/debian.cmake b/cmake/packaging/debian.cmake index 13a6b7c7b97..f78a6da4181 100644 --- a/cmake/packaging/debian.cmake +++ b/cmake/packaging/debian.cmake @@ -45,14 +45,20 @@ macro(ov_cpack_settings) unset(CPACK_COMPONENTS_ALL) foreach(item IN LISTS cpack_components_all) # filter out some components, which are not needed to be wrapped to .deb package - if(# NOT ${item} MATCHES ".*(python).*" AND + if(# skip OpenVINO Pyhon API and samples + NOT item MATCHES "^${OV_CPACK_COMP_PYTHON_OPENVINO}_python.*" AND + NOT item STREQUAL OV_CPACK_COMP_PYTHON_SAMPLES AND # python wheels are not needed to be wrapped by debian packages NOT item STREQUAL OV_CPACK_COMP_PYTHON_WHEELS AND + # see ticket # 82605 + NOT item STREQUAL "gna" AND # even for case of system TBB we have installation rules for wheels packages # so, need to skip this explicitly NOT item MATCHES "^tbb(_dev)?$" AND # the same for pugixml NOT item STREQUAL "pugixml" AND + # TF component is not released + NOT item STREQUAL "tensorflow" AND # we have copyright file for debian package NOT item STREQUAL OV_CPACK_COMP_LICENSING AND # not appropriate components @@ -86,6 +92,10 @@ macro(ov_cpack_settings) # - 2022.1.1 does not have debian packages enabled, distributed only as archives 2022.1.0) + # + # core: base dependency for each component + # + # core set(CPACK_COMPONENT_CORE_DESCRIPTION "OpenVINO C / C++ Runtime libraries") set(CPACK_DEBIAN_CORE_PACKAGE_NAME "libopenvino-${cpack_name_ver}") @@ -96,19 +106,9 @@ macro(ov_cpack_settings) # We currently don't have versioning for openvino core library ov_debian_add_lintian_suppression(core - "shlib-without-versioned-soname" + # package-name-doesnt-match-sonames libopenvino202230 libopenvino-c20223 "package-name-doesnt-match-sonames") - # core_dev - set(CPACK_COMPONENT_CORE_DEV_DESCRIPTION "Intel(R) Distribution of OpenVINO(TM) Toolkit C / C++ Development files") - set(CPACK_COMPONENT_CORE_DEV_DEPENDS "core") - set(CPACK_DEBIAN_CORE_DEV_PACKAGE_NAME "libopenvino-dev-${cpack_name_ver}") - ov_debian_generate_conflicts(core_dev ${conflicting_versions}) - - ov_debian_add_lintian_suppression(core_dev - # CVS-79409: create man page for compile_tool - "binary-without-manpage") - # # Plugins # @@ -184,7 +184,7 @@ macro(ov_cpack_settings) endif() # intel-gna - if(ENABLE_INTEL_GNA) + if(ENABLE_INTEL_GNA AND "gna" IN_LIST CPACK_COMPONENTS_ALL) set(CPACK_COMPONENT_GNA_DESCRIPTION "IntelĀ® Gaussian Neural Accelerator") set(CPACK_COMPONENT_GNA_DEPENDS "core") set(CPACK_DEBIAN_GNA_PACKAGE_NAME "libopenvino-intel-gna-${cpack_name_ver}") @@ -206,6 +206,72 @@ macro(ov_cpack_settings) set(CPACK_DEBIAN_CORE_PACKAGE_RECOMMENDS "${pseudo_plugins_recommends}") endif() + # + # Frontends + # + + if(ENABLE_OV_IR_FRONTEND) + set(CPACK_COMPONENT_IR_DESCRIPTION "OpenVINO IR Frontend") + set(CPACK_COMPONENT_IR_DEPENDS "core") + set(CPACK_DEBIAN_IR_PACKAGE_NAME "libopenvino-ir-frontend-${cpack_name_ver}") + set(CPACK_DEBIAN_IR_PACKAGE_CONTROL_EXTRA "${def_postinst};${def_postrm}") + ov_debian_add_lintian_suppression(ir + # we have different package name strategy; it suggests libopenvino-ir-frontend202230 + "package-name-doesnt-match-sonames" + # IR FE should not linked directly by end users + "package-must-activate-ldconfig-trigger") + list(APPEND frontends ir) + endif() + + if(ENABLE_OV_ONNX_FRONTEND) + set(CPACK_COMPONENT_ONNX_DESCRIPTION "OpenVINO ONNX Frontend") + set(CPACK_COMPONENT_ONNX_DEPENDS "core") + set(CPACK_DEBIAN_ONNX_PACKAGE_NAME "libopenvino-onnx-frontend-${cpack_name_ver}") + # since we ONNX FE is linkable target, we need to call ldconfig (i.e. `def_triggers`) + set(CPACK_DEBIAN_ONNX_PACKAGE_CONTROL_EXTRA "${def_postinst};${def_postrm};${def_triggers}") + ov_debian_add_lintian_suppression(onnx + # we have different package name strategy; it suggests libopenvino-onnx-frontend202230 + "package-name-doesnt-match-sonames") + list(APPEND frontends onnx) + endif() + + if(ENABLE_OV_TF_FRONTEND AND "tensorflow" IN_LIST CPACK_COMPONENTS_ALL) + set(CPACK_COMPONENT_TENSORFLOW_DESCRIPTION "OpenVINO TensorFlow Frontend") + set(CPACK_COMPONENT_TENSORFLOW_DEPENDS "core") + set(CPACK_DEBIAN_TENSORFLOW_PACKAGE_NAME "libopenvino-tensorflow-frontend-${cpack_name_ver}") + # since we TF FE is linkable target, we need to call ldconfig (i.e. `def_triggers`) + set(CPACK_DEBIAN_TENSORFLOW_PACKAGE_CONTROL_EXTRA "${def_postinst};${def_postrm};${def_triggers}") + ov_debian_add_lintian_suppression(tensorflow + # we have different package name strategy; it suggests libopenvino-tensorflow-frontend202230 + "package-name-doesnt-match-sonames") + list(APPEND frontends tensorflow) + endif() + + if(ENABLE_OV_PADDLE_FRONTEND) + set(CPACK_COMPONENT_PADDLE_DESCRIPTION "OpenVINO Paddle Frontend") + set(CPACK_COMPONENT_PADDLE_DEPENDS "core") + set(CPACK_DEBIAN_PADDLE_PACKAGE_NAME "libopenvino-paddle-frontend-${cpack_name_ver}") + # since we PADDLE FE is linkable target, we need to call ldconfig (i.e. `def_triggers`) + set(CPACK_DEBIAN_PADDLE_PACKAGE_CONTROL_EXTRA "${def_postinst};${def_postrm};${def_triggers}") + ov_debian_add_lintian_suppression(paddle + # we have different package name strategy; it suggests libopenvino-paddle-frontend202230 + "package-name-doesnt-match-sonames") + list(APPEND frontends paddle) + endif() + + # + # core_dev: depends on core and frontends (since frontends don't want to provide its own dev packages) + # + + set(CPACK_COMPONENT_CORE_DEV_DESCRIPTION "Intel(R) Distribution of OpenVINO(TM) Toolkit C / C++ Development files") + set(CPACK_COMPONENT_CORE_DEV_DEPENDS "core;${frontends}") + set(CPACK_DEBIAN_CORE_DEV_PACKAGE_NAME "libopenvino-dev-${cpack_name_ver}") + ov_debian_generate_conflicts(core_dev ${conflicting_versions}) + + ov_debian_add_lintian_suppression(core_dev + # CVS-79409: create man page for compile_tool + "binary-without-manpage") + # # Python bindings # @@ -272,7 +338,7 @@ macro(ov_cpack_settings) # all openvino set(CPACK_COMPONENT_OPENVINO_DESCRIPTION "Intel(R) Distribution of OpenVINO(TM) Toolkit Libraries and Development files") - set(CPACK_COMPONENT_OPENVINO_DEPENDS "libraries_dev;samples;python_samples") + set(CPACK_COMPONENT_OPENVINO_DEPENDS "libraries_dev;samples") set(CPACK_DEBIAN_OPENVINO_PACKAGE_NAME "openvino-${cpack_name_ver}") ov_debian_generate_conflicts(openvino ${conflicting_versions}) ov_debian_add_lintian_suppression(openvino diff --git a/src/bindings/python/wheel/CMakeLists.txt b/src/bindings/python/wheel/CMakeLists.txt index da4b38d635c..b2144760587 100644 --- a/src/bindings/python/wheel/CMakeLists.txt +++ b/src/bindings/python/wheel/CMakeLists.txt @@ -9,6 +9,7 @@ set(pyversion python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}) set(WHEEL_VERSION "${OpenVINO_VERSION}" CACHE STRING "Version of this release" FORCE) set(WHEEL_BUILD "${OpenVINO_VERSION_BUILD}" CACHE STRING "Build number of this release" FORCE) + set(PYTHON_BRIDGE_CPACK_PATH "${OV_CPACK_PYTHONDIR}") set(PY_PACKAGES_DIR ${PYTHON_BRIDGE_CPACK_PATH}/${pyversion}) set(TBB_LIBS_DIR runtime/3rdparty/tbb/lib) @@ -22,7 +23,7 @@ set(PUGIXML_LIBS_DIR runtime/3rdparty/pugixml/lib) # set(openvino_wheel_deps ie_api) -foreach(_target ie_api constants _pyngraph pyopenvino ov_plugins py_ov_frontends) +foreach(_target ie_api constants _pyngraph pyopenvino ov_plugins ov_frontends py_ov_frontends) if(TARGET ${_target}) list(APPEND openvino_wheel_deps ${_target}) endif() diff --git a/src/bindings/python/wheel/setup.py b/src/bindings/python/wheel/setup.py index 1e5fd14c30e..1fbf78795a6 100644 --- a/src/bindings/python/wheel/setup.py +++ b/src/bindings/python/wheel/setup.py @@ -95,6 +95,30 @@ LIB_INSTALL_CFG = { "prefix": "libs.pugixml", "install_dir": PUGIXML_LIBS_DIR, }, + "ir_libs": { + "name": "ir", + "prefix": "libs.core", + "install_dir": OV_RUNTIME_LIBS_DIR, + "rpath": LIBS_RPATH, + }, + "paddle_libs": { + "name": "paddle", + "prefix": "libs.core", + "install_dir": OV_RUNTIME_LIBS_DIR, + "rpath": LIBS_RPATH, + }, + "onnx_libs": { + "name": "onnx", + "prefix": "libs.core", + "install_dir": OV_RUNTIME_LIBS_DIR, + "rpath": LIBS_RPATH, + }, + # uncomment once TF FE will be used in MO + # "tensorflow_libs": { # noqa: E800 + # "name": "tensorflow", # noqa: E800 + # "prefix": "libs.core", # noqa: E800 + # "install_dir": OV_RUNTIME_LIBS_DIR, # noqa: E800 + # }, # noqa: E800 } PY_INSTALL_CFG = { diff --git a/src/common/itt/CMakeLists.txt b/src/common/itt/CMakeLists.txt index d82f6963369..4008a846d29 100644 --- a/src/common/itt/CMakeLists.txt +++ b/src/common/itt/CMakeLists.txt @@ -33,7 +33,7 @@ endif() target_include_directories(${TARGET_NAME} PUBLIC $) -ov_install_static_lib(${TARGET_NAME} openvino_common) +ov_install_static_lib(${TARGET_NAME} ${OV_CPACK_COMP_CORE}) add_clang_format_target(${TARGET_NAME}_clang FOR_TARGETS ${TARGET_NAME}) openvino_developer_export_targets(COMPONENT openvino_common TARGETS openvino::itt) diff --git a/src/frontends/tensorflow/CMakeLists.txt b/src/frontends/tensorflow/CMakeLists.txt index 8bd3ba49d00..54f73c7255d 100644 --- a/src/frontends/tensorflow/CMakeLists.txt +++ b/src/frontends/tensorflow/CMakeLists.txt @@ -2,8 +2,12 @@ # SPDX-License-Identifier: Apache-2.0 # +if(NOT CPACK_GENERATOR STREQUAL "DEB") + set(linkable_frontend LINKABLE_FRONTEND) +endif() + ov_add_frontend(NAME tensorflow - LINKABLE_FRONTEND + ${linkable_frontend} SHUTDOWN_PROTOBUF FILEDESCRIPTION "FrontEnd to load and convert TensorFlow file format" LINK_LIBRARIES openvino::util openvino::runtime::dev) @@ -12,22 +16,29 @@ ov_add_frontend(NAME tensorflow set(target_name "${FRONTEND_NAME_PREFIX}tensorflow${FRONTEND_NAME_SUFFIX}") set_target_properties(${target_name} PROPERTIES OUTPUT_NAME openvino_tensorflow_fe) -function(ov_frontend_get_file_name target_name library_name) - set(LIB_PREFIX "${CMAKE_SHARED_LIBRARY_PREFIX}") - set(LIB_SUFFIX "${IE_BUILD_POSTFIX}${CMAKE_SHARED_LIBRARY_SUFFIX}${OpenVINO_VERSION_SUFFIX}") - - set("${library_name}" "${LIB_PREFIX}${target_name}${LIB_SUFFIX}" PARENT_SCOPE) -endfunction() - -ov_frontend_get_file_name(${target_name} output_name) - -# install with original name for tests component -install(FILES $ - DESTINATION tests - COMPONENT tests - RENAME ${output_name} - EXCLUDE_FROM_ALL) +if(NOT TARGET openvino::frontend::tensorflow) + add_library(openvino::frontend::tensorflow ALIAS ${target_name}) +endif() if(ENABLE_TESTS) + function(ov_frontend_get_file_name target_name library_name) + set(LIB_PREFIX "${CMAKE_SHARED_LIBRARY_PREFIX}") + set(LIB_SUFFIX "${IE_BUILD_POSTFIX}${CMAKE_SHARED_LIBRARY_SUFFIX}${OpenVINO_VERSION_SUFFIX}") + + set("${library_name}" "${LIB_PREFIX}${target_name}${LIB_SUFFIX}" PARENT_SCOPE) + endfunction() + + ov_frontend_get_file_name(${target_name} output_name) + + # install with original name for tests component + install(FILES $ + DESTINATION tests + COMPONENT tests + RENAME ${output_name} + EXCLUDE_FROM_ALL) + + install(TARGETS ${target_name} + LIBRARY DESTINATION tests COMPONENT tests EXCLUDE_FROM_ALL) + add_subdirectory(tests) endif() diff --git a/src/plugins/intel_gna/optimizer/gna_pass_manager.cpp b/src/plugins/intel_gna/optimizer/gna_pass_manager.cpp index f3a48e1a67c..b6acb07688a 100644 --- a/src/plugins/intel_gna/optimizer/gna_pass_manager.cpp +++ b/src/plugins/intel_gna/optimizer/gna_pass_manager.cpp @@ -2448,7 +2448,7 @@ void TransposeWeightsFromNCHWToNHWCPass::run() { } int PassManager::run(int index) { -#if defined PLOT +#if defined PLOT || defined ENABLE_V7_SERIALIZE auto dumpNetworkAfterPass = [&index, this] (std::shared_ptr pass) { std::string name = std::string("gna_passes_") + (index < 10 ? "0" : "") + std::to_string(index) + "_" + pass->getName(); #ifdef PLOT @@ -2456,6 +2456,9 @@ int PassManager::run(int index) { saveGraphToDot(network, out, [](const CNNLayerPtr layer, ordered_properties &printed_properties, ordered_properties &node_properties) {}); +#endif +#ifdef ENABLE_V7_SERIALIZE + network.serialize(name + ".xml", name + ".bin"); #endif }; #else diff --git a/src/tests/functional/plugin/shared/include/behavior/ov_plugin/core_integration.hpp b/src/tests/functional/plugin/shared/include/behavior/ov_plugin/core_integration.hpp index 462ec0a640b..b71225fe097 100644 --- a/src/tests/functional/plugin/shared/include/behavior/ov_plugin/core_integration.hpp +++ b/src/tests/functional/plugin/shared/include/behavior/ov_plugin/core_integration.hpp @@ -594,7 +594,7 @@ TEST_P(OVClassNetworkTestP, QueryNetworkHeteroActualNoThrow) { ASSERT_LT(0, res.size()); } -TEST_P(OVClassNetworkTestP, QueryNetworkMultiThrows) { +TEST_P(OVClassNetworkTestP, DISABLED_QueryNetworkMultiThrows) { ov::Core ie = createCoreWithTemplate(); ASSERT_THROW(ie.query_model(actualNetwork, CommonTestUtils::DEVICE_MULTI), ov::Exception); } diff --git a/src/tests/functional/plugin/shared/include/behavior/plugin/core_integration.hpp b/src/tests/functional/plugin/shared/include/behavior/plugin/core_integration.hpp index 18d5eb0ca3d..926fc7af32e 100644 --- a/src/tests/functional/plugin/shared/include/behavior/plugin/core_integration.hpp +++ b/src/tests/functional/plugin/shared/include/behavior/plugin/core_integration.hpp @@ -531,7 +531,7 @@ TEST_P(IEClassNetworkTestP, QueryNetworkHeteroActualNoThrow) { ASSERT_LT(0, res.supportedLayersMap.size()); } -TEST_P(IEClassNetworkTestP, QueryNetworkMultiThrows) { +TEST_P(IEClassNetworkTestP, DISABLED_QueryNetworkMultiThrows) { InferenceEngine::Core ie = BehaviorTestsUtils::createIECoreWithTemplate(); ASSERT_THROW(ie.QueryNetwork(actualCnnNetwork, CommonTestUtils::DEVICE_MULTI), InferenceEngine::Exception); } diff --git a/thirdparty/CMakeLists.txt b/thirdparty/CMakeLists.txt index d1dbd0a5708..83679967196 100644 --- a/thirdparty/CMakeLists.txt +++ b/thirdparty/CMakeLists.txt @@ -19,7 +19,7 @@ endif() add_subdirectory(xbyak EXCLUDE_FROM_ALL) openvino_developer_export_targets(COMPONENT openvino_common TARGETS xbyak) -ov_install_static_lib(xbyak openvino_common) +ov_install_static_lib(xbyak ${OV_CPACK_COMP_CORE}) # # zlib @@ -92,7 +92,7 @@ if(NOT TARGET openvino::pugixml) set_property(TARGET pugixml-static PROPERTY EXPORT_NAME pugixml) add_library(openvino::pugixml ALIAS pugixml-static) openvino_developer_export_targets(COMPONENT openvino_common TARGETS openvino::pugixml) - ov_install_static_lib(pugixml-static openvino_common) + ov_install_static_lib(pugixml-static ${OV_CPACK_COMP_CORE}) endfunction() ie_build_pugixml() @@ -115,8 +115,8 @@ endif() set_target_properties(ade fluid PROPERTIES FOLDER thirdparty) openvino_developer_export_targets(COMPONENT openvino_common TARGETS ade fluid) -ov_install_static_lib(ade openvino_common) -ov_install_static_lib(fluid openvino_common) +ov_install_static_lib(ade ${OV_CPACK_COMP_CORE}) +ov_install_static_lib(fluid ${OV_CPACK_COMP_CORE}) # # Gflags @@ -206,8 +206,8 @@ add_subdirectory(json) openvino_developer_export_targets(COMPONENT openvino_common TARGETS nlohmann_json nlohmann_json_schema_validator) -ov_install_static_lib(nlohmann_json openvino_common) -ov_install_static_lib(nlohmann_json_schema_validator openvino_common) +ov_install_static_lib(nlohmann_json ${OV_CPACK_COMP_CORE}) +ov_install_static_lib(nlohmann_json_schema_validator ${OV_CPACK_COMP_CORE}) # # Install diff --git a/thirdparty/ittapi/CMakeLists.txt b/thirdparty/ittapi/CMakeLists.txt index 5a7c017cd9b..7a0947ec9d6 100644 --- a/thirdparty/ittapi/CMakeLists.txt +++ b/thirdparty/ittapi/CMakeLists.txt @@ -24,6 +24,6 @@ if(ENABLE_PROFILING_ITT) $) openvino_developer_export_targets(COMPONENT openvino_common TARGETS ittnotify) - ov_install_static_lib(ittnotify openvino_common) + ov_install_static_lib(ittnotify ${OV_CPACK_COMP_CORE}) endif() endif()