From 610cdb495cdc7eda95bfa03824220272ca256e7f Mon Sep 17 00:00:00 2001 From: Anuj Mittal Date: Mon, 5 Apr 2021 14:25:10 +0800 Subject: openvino-inference-engine: upgrade 2021.2 -> 2021.3 Release notes: https://github.com/openvinotoolkit/openvino/releases/tag/2021.3 Remove a patch that isn't needed anymore and refresh the rest. Remove dependency on onednn as it's using a forked version. Signed-off-by: Anuj Mittal --- ...01-dont-install-licenses-and-version-file.patch | 30 ++-- ...ence-engine-use-system-installed-packages.patch | 195 ++++++++++++--------- .../0003-inference-engine-installation-fixes.patch | 154 ++++++++++------ .../0005-cldnn-fix-inclusion-of-headers.patch | 53 ------ .../opencv/openvino-inference-engine_2021.2.bb | 123 ------------- .../opencv/openvino-inference-engine_2021.3.bb | 123 +++++++++++++ 6 files changed, 342 insertions(+), 336 deletions(-) delete mode 100644 dynamic-layers/openembedded-layer/recipes-support/opencv/files/0005-cldnn-fix-inclusion-of-headers.patch delete mode 100644 dynamic-layers/openembedded-layer/recipes-support/opencv/openvino-inference-engine_2021.2.bb create mode 100644 dynamic-layers/openembedded-layer/recipes-support/opencv/openvino-inference-engine_2021.3.bb diff --git a/dynamic-layers/openembedded-layer/recipes-support/opencv/files/0001-dont-install-licenses-and-version-file.patch b/dynamic-layers/openembedded-layer/recipes-support/opencv/files/0001-dont-install-licenses-and-version-file.patch index 2a2c8b87..3130fb88 100644 --- a/dynamic-layers/openembedded-layer/recipes-support/opencv/files/0001-dont-install-licenses-and-version-file.patch +++ b/dynamic-layers/openembedded-layer/recipes-support/opencv/files/0001-dont-install-licenses-and-version-file.patch @@ -1,4 +1,4 @@ -From a60710c910e6c995aef9dd36757bf040bf24acf5 Mon Sep 17 00:00:00 2001 +From c6fa6f32077ab554839d6e1e5b46d0778c17b8b1 Mon Sep 17 00:00:00 2001 From: Anuj Mittal Date: Tue, 9 Jun 2020 11:35:59 +0800 Subject: [PATCH] don't install licenses and version @@ -12,19 +12,19 @@ Signed-off-by: Anuj Mittal 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ngraph/CMakeLists.txt b/ngraph/CMakeLists.txt -index 99f32a6181..b90aa382b9 100644 +index 6163c01e4a..74c479c071 100644 --- a/ngraph/CMakeLists.txt +++ b/ngraph/CMakeLists.txt -@@ -490,7 +490,7 @@ if (NGRAPH_EXPORT_TARGETS_ENABLE) - install(EXPORT ngraphTargets - FILE ngraphTargets.cmake - NAMESPACE ngraph:: -- DESTINATION ${NGRAPH_COMPONENT_PREFIX}cmake -+ DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/ngraph - COMPONENT ngraph) +@@ -353,7 +353,7 @@ if (NGRAPH_EXPORT_TARGETS_ENABLE) + install(EXPORT ngraphTargets + FILE ngraphTargets.cmake + NAMESPACE ngraph:: +- DESTINATION ${NGRAPH_COMPONENT_PREFIX}cmake ++ DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/ngraph + COMPONENT ngraph) + endif() - configure_package_config_file(${CMAKE_CURRENT_SOURCE_DIR}/cmake/share/ngraphConfig.cmake.in -@@ -503,7 +503,7 @@ if (NGRAPH_EXPORT_TARGETS_ENABLE) +@@ -367,7 +367,7 @@ if (NGRAPH_EXPORT_TARGETS_ENABLE) install(FILES ${CMAKE_CURRENT_BINARY_DIR}/ngraphConfig.cmake ${CMAKE_CURRENT_BINARY_DIR}/ngraphConfigVersion.cmake @@ -33,22 +33,22 @@ index 99f32a6181..b90aa382b9 100644 COMPONENT ngraph) endif() -@@ -518,5 +518,3 @@ add_subdirectory(test) +@@ -386,5 +386,3 @@ add_subdirectory(test) if (NGRAPH_PYTHON_BUILD_ENABLE) add_subdirectory(python) endif() - -install(FILES ${CMAKE_CURRENT_BINARY_DIR}/VERSION DESTINATION "${NGRAPH_COMPONENT_PREFIX}." COMPONENT ngraph) diff --git a/ngraph/test/runtime/CMakeLists.txt b/ngraph/test/runtime/CMakeLists.txt -index d27ea8090c..17a3843f7d 100644 +index 2943722acc..a2ccdd11de 100644 --- a/ngraph/test/runtime/CMakeLists.txt +++ b/ngraph/test/runtime/CMakeLists.txt -@@ -80,3 +80,5 @@ target_include_directories(ngraph_backend PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) +@@ -79,3 +79,5 @@ target_include_directories(ngraph_backend PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) add_subdirectory(interpreter) add_subdirectory(ie) + +install(TARGETS ngraph_backend DESTINATION ${NGRAPH_INSTALL_LIB}) -- -2.29.2 +2.30.2 diff --git a/dynamic-layers/openembedded-layer/recipes-support/opencv/files/0001-inference-engine-use-system-installed-packages.patch b/dynamic-layers/openembedded-layer/recipes-support/opencv/files/0001-inference-engine-use-system-installed-packages.patch index 1f64ce21..822ab1cc 100644 --- a/dynamic-layers/openembedded-layer/recipes-support/opencv/files/0001-inference-engine-use-system-installed-packages.patch +++ b/dynamic-layers/openembedded-layer/recipes-support/opencv/files/0001-inference-engine-use-system-installed-packages.patch @@ -1,6 +1,6 @@ -From a8b6a2e251c42a393218174c6737208760d2e1c1 Mon Sep 17 00:00:00 2001 +From ca4a2b824de61c182b46e28fce875370ce46d4e1 Mon Sep 17 00:00:00 2001 From: Anuj Mittal -Date: Wed, 10 Jun 2020 09:43:55 +0800 +Date: Thu, 8 Apr 2021 14:19:51 +0800 Subject: [PATCH] inference-engine: use system installed packages Use installed versions of ade, protobuf and tbb. @@ -9,34 +9,33 @@ Upstream-Status: Pending Signed-off-by: Anuj Mittal --- - cmake/dependencies.cmake | 18 ------------------ + cmake/dependencies.cmake | 19 ----------- inference-engine/CMakeLists.txt | 2 +- - inference-engine/cmake/ie_parallel.cmake | 7 +------ - .../src/inference_engine/CMakeLists.txt | 19 ------------------- - .../common_test_utils/CMakeLists.txt | 4 +--- - .../unit_test_utils/CMakeLists.txt | 3 +-- - inference-engine/thirdparty/CMakeLists.txt | 5 ++--- - 7 files changed, 6 insertions(+), 52 deletions(-) + inference-engine/cmake/dependencies.cmake | 34 ------------------- + inference-engine/cmake/ie_parallel.cmake | 2 +- + inference-engine/samples/CMakeLists.txt | 2 +- + .../common_test_utils/CMakeLists.txt | 4 +-- + .../unit_test_utils/CMakeLists.txt | 3 +- + inference-engine/thirdparty/CMakeLists.txt | 5 ++- + 8 files changed, 7 insertions(+), 64 deletions(-) diff --git a/cmake/dependencies.cmake b/cmake/dependencies.cmake -index 6a44c8769e..a128eb63a1 100644 +index aed7614734..f5baa6f86b 100644 --- a/cmake/dependencies.cmake +++ b/cmake/dependencies.cmake -@@ -13,25 +13,7 @@ if(CMAKE_CROSSCOMPILING AND NGRAPH_ONNX_IMPORT_ENABLE) - +@@ -7,23 +7,4 @@ set_temp_directory(TEMP "${IE_MAIN_SOURCE_DIR}") + if(CMAKE_CROSSCOMPILING AND CMAKE_HOST_SYSTEM_NAME MATCHES Linux AND CMAKE_HOST_SYSTEM_PROCESSOR MATCHES "amd64.*|x86_64.*|AMD64.*") set(protoc_version "3.7.1") - if(CMAKE_HOST_SYSTEM_NAME MATCHES Linux) -- RESOLVE_DEPENDENCY(SYSTEM_PROTOC_ROOT -- ARCHIVE_LIN "protoc-${protoc_version}-linux-x86_64.tar.gz" -- TARGET_PATH "${TEMP}/protoc-${protoc_version}-linux-x86_64") -- debug_message(STATUS "host protoc-${protoc_version} root path = " ${SYSTEM_PROTOC_ROOT}) - else() - message(FATAL_ERROR "Unsupported host system (${CMAKE_HOST_SYSTEM_NAME}) and arch (${CMAKE_HOST_SYSTEM_PROCESSOR}) for cross-compilation") - endif() + +- RESOLVE_DEPENDENCY(SYSTEM_PROTOC_ROOT +- ARCHIVE_LIN "protoc-${protoc_version}-linux-x86_64.tar.gz" +- TARGET_PATH "${TEMP}/protoc-${protoc_version}-linux-x86_64" +- SHA256 "a1bedd5c05ca51e49f8f254faa3d7331e05b3a806c151fb111d582f154d0fee8" +- ) +- debug_message(STATUS "host protoc-${protoc_version} root path = " ${SYSTEM_PROTOC_ROOT}) - - reset_deps_cache(SYSTEM_PROTOC) - -- message("${SYSTEM_PROTOC_ROOT}/bin") - find_program( - SYSTEM_PROTOC - NAMES protoc @@ -49,72 +48,94 @@ index 6a44c8769e..a128eb63a1 100644 - update_deps_cache(SYSTEM_PROTOC "${SYSTEM_PROTOC}" "Path to host protoc for ONNX Importer") endif() diff --git a/inference-engine/CMakeLists.txt b/inference-engine/CMakeLists.txt -index a3e4f74c40..76b09683dd 100644 +index 95c657222e..20cbd5000b 100644 --- a/inference-engine/CMakeLists.txt +++ b/inference-engine/CMakeLists.txt -@@ -56,7 +56,7 @@ function(ie_developer_export) - APPEND FILE "${CMAKE_BINARY_DIR}/targets_developer.cmake") - - # Custom target to build only Inference Engine Developer Package targets -- add_custom_target(ie_dev_targets ALL DEPENDS ${OpenVINODeveloperPackageTargets} ${IEDeveloperPackageTargets} gflags -+ add_custom_target(ie_dev_targets ALL DEPENDS ${OpenVINODeveloperPackageTargets} ${IEDeveloperPackageTargets} - inference_engine_ir_reader inference_engine_ir_v7_reader) +@@ -20,7 +20,7 @@ function(ie_developer_export_targets) endfunction() + function(ie_developer_export) +- set(all_dev_targets gflags ie_libraries) ++ set(all_dev_targets ie_libraries) + foreach(component IN LISTS openvino_export_components) + export(TARGETS ${${component}} NAMESPACE IE:: + APPEND FILE "${CMAKE_BINARY_DIR}/${component}_dev_targets.cmake") +diff --git a/inference-engine/cmake/dependencies.cmake b/inference-engine/cmake/dependencies.cmake +index 6fdfc6f3cd..c07bf0f3c8 100644 +--- a/inference-engine/cmake/dependencies.cmake ++++ b/inference-engine/cmake/dependencies.cmake +@@ -138,40 +138,6 @@ endif () + if (THREADING STREQUAL "TBB" OR THREADING STREQUAL "TBB_AUTO") + reset_deps_cache(TBBROOT TBB_DIR) + +- if (WIN32 AND X86_64) +- #TODO: add target_path to be platform specific as well, to avoid following if +- RESOLVE_DEPENDENCY(TBB +- ARCHIVE_WIN "tbb2020_20200415_win.zip" +- TARGET_PATH "${TEMP}/tbb" +- ENVIRONMENT "TBBROOT" +- SHA256 "f1c9b9e2861efdaa01552bd25312ccbc5feeb45551e5f91ae61e29221c5c1479") +- elseif(ANDROID) # Should be before LINUX due LINUX is detected as well +- RESOLVE_DEPENDENCY(TBB +- ARCHIVE_ANDROID "tbb2020_20200404_android.tgz" +- TARGET_PATH "${TEMP}/tbb" +- ENVIRONMENT "TBBROOT" +- SHA256 "f42d084224cc2d643314bd483ad180b081774608844000f132859fca3e9bf0ce") +- elseif(LINUX AND X86_64) +- RESOLVE_DEPENDENCY(TBB +- ARCHIVE_LIN "tbb2020_20200415_lin_strip.tgz" +- TARGET_PATH "${TEMP}/tbb" +- SHA256 "95b2f3b0b70c7376a0c7de351a355c2c514b42c4966e77e3e34271a599501008") +- elseif(LINUX AND AARCH64) +- RESOLVE_DEPENDENCY(TBB +- ARCHIVE_LIN "keembay/tbb2020_38404_kmb_lic.tgz" +- TARGET_PATH "${TEMP}/tbb_yocto" +- ENVIRONMENT "TBBROOT" +- SHA256 "321261ff2eda6d4568a473cb883262bce77a93dac599f7bd65d2918bdee4d75b") +- elseif(APPLE AND X86_64) +- RESOLVE_DEPENDENCY(TBB +- ARCHIVE_MAC "tbb2020_20200404_mac.tgz" +- TARGET_PATH "${TEMP}/tbb" +- ENVIRONMENT "TBBROOT" +- SHA256 "ad9cf52e657660058aa6c6844914bc0fc66241fec89a392d8b79a7ff69c3c7f6") +- else() +- message(FATAL_ERROR "TBB is not available on current platform") +- endif() +- + update_deps_cache(TBBROOT "${TBB}" "Path to TBB root folder") + update_deps_cache(TBB_DIR "${TBB}/cmake" "Path to TBB cmake folder") + diff --git a/inference-engine/cmake/ie_parallel.cmake b/inference-engine/cmake/ie_parallel.cmake -index f8988aa105..28e79417f4 100644 +index f8988aa105..42fedd10c5 100644 --- a/inference-engine/cmake/ie_parallel.cmake +++ b/inference-engine/cmake/ie_parallel.cmake -@@ -67,13 +67,8 @@ function(set_ie_threading_interface_for TARGET_NAME) - set(IE_THREAD_DEFINE "IE_THREAD_SEQ") - - if (THREADING STREQUAL "TBB" OR THREADING STREQUAL "TBB_AUTO") -- if (TBB_FOUND) - set(IE_THREAD_DEFINE "IE_THREAD_TBB") -- ie_target_link_libraries(${TARGET_NAME} ${LINK_TYPE} ${TBB_IMPORTED_TARGETS}) -- else () -- ext_message(WARNING "TBB was not found by the configured TBB_DIR path.\ -- SEQ method will be used for ${TARGET_NAME}") -- endif () -+ target_link_libraries(${TARGET_NAME} INTERFACE tbb tbbmalloc) - elseif (THREADING STREQUAL "OMP") - if (WIN32) - set(omp_lib_name libiomp5md) -diff --git a/inference-engine/src/inference_engine/CMakeLists.txt b/inference-engine/src/inference_engine/CMakeLists.txt -index f012a038a2..3bba22215e 100644 ---- a/inference-engine/src/inference_engine/CMakeLists.txt -+++ b/inference-engine/src/inference_engine/CMakeLists.txt -@@ -216,25 +216,6 @@ list(APPEND core_components ngraph) - if((THREADING STREQUAL "TBB" OR THREADING STREQUAL "TBB_AUTO") AND TBBROOT MATCHES ${TEMP}) - ie_cpack_add_component(tbb REQUIRED) - list(APPEND core_components tbb) -- -- install(DIRECTORY "${TBB}/include" -- DESTINATION ${IE_CPACK_IE_DIR}/external/tbb -- COMPONENT tbb) -- install(DIRECTORY "${TBB}/lib" -- DESTINATION ${IE_CPACK_IE_DIR}/external/tbb -- COMPONENT tbb) -- if(EXISTS "${TBB}/bin") -- install(DIRECTORY "${TBB}/bin" -- DESTINATION ${IE_CPACK_IE_DIR}/external/tbb -- COMPONENT tbb) -- endif() -- install(FILES "${TBB}/LICENSE" -- DESTINATION ${IE_CPACK_IE_DIR}/external/tbb -- COMPONENT tbb) -- install(FILES "${TBB}/cmake/TBBConfig.cmake" -- "${TBB}/cmake/TBBConfigVersion.cmake" -- DESTINATION ${IE_CPACK_IE_DIR}/external/tbb/cmake -- COMPONENT tbb) +@@ -6,7 +6,7 @@ function(set_ie_threading_interface_for TARGET_NAME) + if (THREADING STREQUAL "TBB" OR THREADING STREQUAL "TBB_AUTO" AND NOT TBB_FOUND) + find_package(TBB COMPONENTS tbb tbbmalloc) + set("TBB_FOUND" ${TBB_FOUND} PARENT_SCOPE) +- set("TBB_IMPORTED_TARGETS" ${TBB_IMPORTED_TARGETS} PARENT_SCOPE) ++ set("TBB_IMPORTED_TARGETS" "tbb;tbbmalloc" PARENT_SCOPE) + set("TBB_VERSION" ${TBB_VERSION} PARENT_SCOPE) + if (TBB_FOUND) + if (TBB_VERSION VERSION_LESS 2020) +diff --git a/inference-engine/samples/CMakeLists.txt b/inference-engine/samples/CMakeLists.txt +index dfe9f2303d..6bc44019fe 100644 +--- a/inference-engine/samples/CMakeLists.txt ++++ b/inference-engine/samples/CMakeLists.txt +@@ -126,7 +126,7 @@ if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/gflags") + add_subdirectory(thirdparty/gflags EXCLUDE_FROM_ALL) + set_target_properties(gflags_nothreads_static PROPERTIES FOLDER thirdparty) + endfunction() +- add_gflags() ++ #add_gflags() endif() - ie_cpack_add_component(core REQUIRED DEPENDS ${core_components}) + if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU") diff --git a/inference-engine/tests/ie_test_utils/common_test_utils/CMakeLists.txt b/inference-engine/tests/ie_test_utils/common_test_utils/CMakeLists.txt -index ca58264bd5..11df150845 100644 +index 6e09201f1e..2d2e3524a5 100644 --- a/inference-engine/tests/ie_test_utils/common_test_utils/CMakeLists.txt +++ b/inference-engine/tests/ie_test_utils/common_test_utils/CMakeLists.txt -@@ -26,7 +26,7 @@ function(add_gtest_libraries) +@@ -43,7 +43,7 @@ function(add_gtest_libraries) PROPERTIES FOLDER thirdparty) endfunction() @@ -123,17 +144,17 @@ index ca58264bd5..11df150845 100644 if (MSVC) set(PUGI pugixml_mt) -@@ -37,8 +37,6 @@ endif () +@@ -52,8 +52,6 @@ else () + endif () + list(APPEND EXPORT_DEPENDENCIES - ${PUGI} - ${NGRAPH_LIBRARIES} - gtest - gtest_main ) set(TARGET_NAME commonTestUtils) diff --git a/inference-engine/tests/ie_test_utils/unit_test_utils/CMakeLists.txt b/inference-engine/tests/ie_test_utils/unit_test_utils/CMakeLists.txt -index 5413d13895..3f2803750f 100644 +index ab956218aa..233eb5ea46 100644 --- a/inference-engine/tests/ie_test_utils/unit_test_utils/CMakeLists.txt +++ b/inference-engine/tests/ie_test_utils/unit_test_utils/CMakeLists.txt @@ -8,8 +8,7 @@ add_subdirectory(mocks/mock_engine) @@ -147,26 +168,26 @@ index 5413d13895..3f2803750f 100644 addIeTarget( NAME ${TARGET_NAME} diff --git a/inference-engine/thirdparty/CMakeLists.txt b/inference-engine/thirdparty/CMakeLists.txt -index fa2a4d02d8..67d3b7ad05 100644 +index 9a6a9209f1..eda6a64161 100644 --- a/inference-engine/thirdparty/CMakeLists.txt +++ b/inference-engine/thirdparty/CMakeLists.txt @@ -62,14 +62,13 @@ else() + target_include_directories(pugixml INTERFACE "$") endif() - add_subdirectory(stb_lib) --add_subdirectory(ade) +-add_subdirectory(ade EXCLUDE_FROM_ALL) add_subdirectory(fluid/modules/gapi) --set_target_properties(ade fluid stb_image PROPERTIES FOLDER thirdparty) -+set_target_properties(fluid stb_image PROPERTIES FOLDER thirdparty) +-set_target_properties(ade fluid PROPERTIES FOLDER thirdparty) ++set_target_properties(fluid PROPERTIES FOLDER thirdparty) # developer package --ie_developer_export_targets(ade fluid) -+ie_developer_export_targets(fluid) +-openvino_developer_export_targets(COMPONENT openvino_common TARGETS ade fluid) ++openvino_developer_export_targets(COMPONENT openvino_common TARGETS fluid) if (NOT USE_SYSTEM_PUGIXML) set_target_properties(pugixml PROPERTIES FOLDER thirdparty) -- -2.29.2 +2.29.0 diff --git a/dynamic-layers/openembedded-layer/recipes-support/opencv/files/0003-inference-engine-installation-fixes.patch b/dynamic-layers/openembedded-layer/recipes-support/opencv/files/0003-inference-engine-installation-fixes.patch index 52049eb0..631b1839 100644 --- a/dynamic-layers/openembedded-layer/recipes-support/opencv/files/0003-inference-engine-installation-fixes.patch +++ b/dynamic-layers/openembedded-layer/recipes-support/opencv/files/0003-inference-engine-installation-fixes.patch @@ -1,4 +1,4 @@ -From cb9a755218ff033c8c42e9dc46a845310a3331fa Mon Sep 17 00:00:00 2001 +From 21453439cd6d89058710e868f05727502e556f99 Mon Sep 17 00:00:00 2001 From: Anuj Mittal Date: Thu, 11 Jun 2020 14:24:04 +0800 Subject: [PATCH] cmake installation fixes @@ -7,24 +7,36 @@ Make sure that libraries/samples/binaries are installed correctly. Signed-off-by: Anuj Mittal --- - CMakeLists.txt | 14 -------------- - cmake/developer_package.cmake | 10 ++++++---- - .../samples/common/opencv_c_wraper/CMakeLists.txt | 2 ++ - inference-engine/samples/CMakeLists.txt | 9 +++------ - .../samples/common/format_reader/CMakeLists.txt | 2 ++ - .../src/inference_engine/CMakeLists.txt | 4 ++-- - .../src/vpu/myriad_plugin/CMakeLists.txt | 2 +- - inference-engine/tests/unit/cpu/CMakeLists.txt | 2 ++ - .../tests/unit/inference_engine/CMakeLists.txt | 2 ++ - inference-engine/tests/unit/vpu/CMakeLists.txt | 2 ++ - inference-engine/tools/compile_tool/CMakeLists.txt | 2 +- - 11 files changed, 23 insertions(+), 28 deletions(-) + CMakeLists.txt | 15 --------------- + cmake/developer_package/IEDevScriptsConfig.cmake | 2 +- + cmake/developer_package/packaging.cmake | 8 +++++--- + cmake/developer_package/plugins/plugins.cmake | 2 +- + .../samples/common/opencv_c_wraper/CMakeLists.txt | 2 ++ + inference-engine/samples/CMakeLists.txt | 4 +++- + .../samples/common/format_reader/CMakeLists.txt | 2 ++ + .../src/inference_engine/CMakeLists.txt | 4 ++-- + inference-engine/src/preprocessing/CMakeLists.txt | 2 +- + .../src/readers/ir_reader/CMakeLists.txt | 2 +- + .../src/vpu/myriad_plugin/CMakeLists.txt | 2 +- + inference-engine/tests/unit/cpu/CMakeLists.txt | 2 ++ + .../tests/unit/inference_engine/CMakeLists.txt | 2 ++ + inference-engine/tests/unit/vpu/CMakeLists.txt | 2 ++ + .../tools/compile_tool/CMakeLists.txt | 2 +- + 15 files changed, 26 insertions(+), 27 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt -index 5c3585a3e9..2b8c99f862 100644 +index e72f2b61f1..2c22827e2d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -176,12 +176,8 @@ ie_shellcheck_process(DIRECTORY "${OpenVINO_MAIN_SOURCE_DIR}" +@@ -105,7 +105,6 @@ function(build_ngraph) + ie_cpack_add_component(ngraph) + + set(SDL_cmake_included ON) +- set(NGRAPH_COMPONENT_PREFIX "deployment_tools/ngraph/") + add_subdirectory(ngraph) + set(NGRAPH_LIBRARIES ngraph PARENT_SCOPE) + set(NGRAPH_REF_LIBRARIES ngraph_reference PARENT_SCOPE) +@@ -174,12 +173,8 @@ ie_shellcheck_process(DIRECTORY "${OpenVINO_MAIN_SOURCE_DIR}" # install setupvars @@ -37,7 +49,7 @@ index 5c3585a3e9..2b8c99f862 100644 elseif(WIN32) install(PROGRAMS scripts/setupvars/setupvars.bat DESTINATION bin -@@ -191,22 +187,12 @@ endif() +@@ -189,22 +184,12 @@ endif() # install install_dependencies if(UNIX) @@ -60,11 +72,24 @@ index 5c3585a3e9..2b8c99f862 100644 elseif(WIN32) install(DIRECTORY scripts/demo/ DESTINATION deployment_tools/demo -diff --git a/cmake/developer_package.cmake b/cmake/developer_package.cmake -index cda7afd294..ec51636e96 100644 ---- a/cmake/developer_package.cmake -+++ b/cmake/developer_package.cmake -@@ -29,7 +29,9 @@ list(APPEND CMAKE_MODULE_PATH +diff --git a/cmake/developer_package/IEDevScriptsConfig.cmake b/cmake/developer_package/IEDevScriptsConfig.cmake +index ed6971fd37..10817d3a75 100644 +--- a/cmake/developer_package/IEDevScriptsConfig.cmake ++++ b/cmake/developer_package/IEDevScriptsConfig.cmake +@@ -121,7 +121,7 @@ if(NOT DEFINED OUTPUT_ROOT) + if(NOT DEFINED OpenVINO_MAIN_SOURCE_DIR) + message(FATAL_ERROR "OpenVINO_MAIN_SOURCE_DIR is not defined") + endif() +- set(OUTPUT_ROOT ${OpenVINO_MAIN_SOURCE_DIR}) ++ set(OUTPUT_ROOT ${CMAKE_CURRENT_BINARY_DIR}) + endif() + + # Enable postfixes for Debug/Release builds +diff --git a/cmake/developer_package/packaging.cmake b/cmake/developer_package/packaging.cmake +index b846bf732d..7a0022968c 100644 +--- a/cmake/developer_package/packaging.cmake ++++ b/cmake/developer_package/packaging.cmake +@@ -4,7 +4,9 @@ include(CPackComponent) unset(IE_CPACK_COMPONENTS_ALL CACHE) @@ -73,9 +98,9 @@ index cda7afd294..ec51636e96 100644 + set(IE_CPACK_IE_DIR deployment_tools/inference_engine) +endif() - # Search packages for the host system instead of packages for the target system - # in case of cross compilation these macros should be defined by the toolchain file -@@ -55,8 +57,8 @@ function(ie_cpack_set_library_dir) + # + # ie_cpack_set_library_dir() +@@ -17,8 +19,8 @@ function(ie_cpack_set_library_dir) set(IE_CPACK_RUNTIME_PATH ${IE_CPACK_IE_DIR}/bin/${ARCH_FOLDER}/${CMAKE_BUILD_TYPE} PARENT_SCOPE) set(IE_CPACK_ARCHIVE_PATH ${IE_CPACK_IE_DIR}/lib/${ARCH_FOLDER}/${CMAKE_BUILD_TYPE} PARENT_SCOPE) else() @@ -86,30 +111,34 @@ index cda7afd294..ec51636e96 100644 set(IE_CPACK_ARCHIVE_PATH ${IE_CPACK_IE_DIR}/lib/${ARCH_FOLDER} PARENT_SCOPE) endif() endfunction() -@@ -151,7 +153,7 @@ endif() +diff --git a/cmake/developer_package/plugins/plugins.cmake b/cmake/developer_package/plugins/plugins.cmake +index a66d2568d9..c3aad14bab 100644 +--- a/cmake/developer_package/plugins/plugins.cmake ++++ b/cmake/developer_package/plugins/plugins.cmake +@@ -106,7 +106,7 @@ function(ie_add_plugin) - # allow to override default OUTPUT_ROOT root - if(NOT DEFINED OUTPUT_ROOT) -- set(OUTPUT_ROOT ${OpenVINO_MAIN_SOURCE_DIR}) -+ set(OUTPUT_ROOT ${CMAKE_CURRENT_BINARY_DIR}) - endif() + install(TARGETS ${IE_PLUGIN_NAME} + RUNTIME DESTINATION ${IE_CPACK_RUNTIME_PATH} COMPONENT ${install_component} +- LIBRARY DESTINATION ${IE_CPACK_RUNTIME_PATH} COMPONENT ${install_component}) ++ LIBRARY DESTINATION ${IE_CPACK_LIBRARY_PATH} COMPONENT ${install_component}) + endif() + endfunction() - # Enable postfixes for Debug/Release builds diff --git a/inference-engine/ie_bridges/c/samples/common/opencv_c_wraper/CMakeLists.txt b/inference-engine/ie_bridges/c/samples/common/opencv_c_wraper/CMakeLists.txt -index b8d5ddf622..d086478f6d 100644 +index aff7229c9f..f45a215f68 100644 --- a/inference-engine/ie_bridges/c/samples/common/opencv_c_wraper/CMakeLists.txt +++ b/inference-engine/ie_bridges/c/samples/common/opencv_c_wraper/CMakeLists.txt -@@ -29,3 +29,5 @@ set_target_properties(${TARGET_NAME} PROPERTIES FOLDER c_samples) +@@ -28,3 +28,5 @@ set_target_properties(${TARGET_NAME} PROPERTIES FOLDER c_samples) if(COMMAND add_cpplint_target) add_cpplint_target(${TARGET_NAME}_cpplint FOR_TARGETS ${TARGET_NAME}) endif() + +install(TARGETS ${TARGET_NAME} DESTINATION ${CMAKE_INSTALL_LIBDIR}) diff --git a/inference-engine/samples/CMakeLists.txt b/inference-engine/samples/CMakeLists.txt -index 236c17e6af..22f410d1fd 100644 +index 6bc44019fe..ca5ab34704 100644 --- a/inference-engine/samples/CMakeLists.txt +++ b/inference-engine/samples/CMakeLists.txt -@@ -34,7 +34,7 @@ endif() +@@ -33,7 +33,7 @@ endif() if(IE_MAIN_SOURCE_DIR) # in case if samples are built from IE repo @@ -118,19 +147,7 @@ index 236c17e6af..22f410d1fd 100644 # hint for find_package(InferenceEngine in the samples folder) set(InferenceEngine_DIR "${CMAKE_BINARY_DIR}") # hint for find_package(ngraph in the samples folder) -@@ -118,11 +118,6 @@ set (HAVE_INTTYPES_H 1) - set (INTTYPES_FORMAT C99) - set (BUILD_TESTING OFF) - --if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/gflags") -- add_subdirectory(thirdparty/gflags) -- set_target_properties(gflags_nothreads_static PROPERTIES FOLDER thirdparty) --endif() -- - if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall") - endif() -@@ -245,6 +240,8 @@ macro(ie_add_sample) +@@ -251,6 +251,8 @@ macro(ie_add_sample) add_cpplint_target(${IE_SAMPLE_NAME}_cpplint FOR_TARGETS ${IE_SAMPLE_NAME} CUSTOM_FILTERS ${custom_filters}) endif() @@ -140,7 +157,7 @@ index 236c17e6af..22f410d1fd 100644 # collect all samples subdirectories diff --git a/inference-engine/samples/common/format_reader/CMakeLists.txt b/inference-engine/samples/common/format_reader/CMakeLists.txt -index 48dbed9f2b..76532fd047 100644 +index c5c5449677..06ecab13b5 100644 --- a/inference-engine/samples/common/format_reader/CMakeLists.txt +++ b/inference-engine/samples/common/format_reader/CMakeLists.txt @@ -41,3 +41,5 @@ target_include_directories(${TARGET_NAME} PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}" @@ -150,10 +167,10 @@ index 48dbed9f2b..76532fd047 100644 + +install(TARGETS ${TARGET_NAME} DESTINATION ${CMAKE_INSTALL_LIBDIR}) diff --git a/inference-engine/src/inference_engine/CMakeLists.txt b/inference-engine/src/inference_engine/CMakeLists.txt -index 3bba22215e..b6f6b7b203 100644 +index 1ea3227631..aa64718940 100644 --- a/inference-engine/src/inference_engine/CMakeLists.txt +++ b/inference-engine/src/inference_engine/CMakeLists.txt -@@ -229,8 +229,8 @@ install(TARGETS ${TARGET_NAME} +@@ -254,8 +254,8 @@ install(TARGETS ${TARGET_NAME} install(FILES "${OpenVINO_BINARY_DIR}/share/ie_parallel.cmake" "${OpenVINO_BINARY_DIR}/share/InferenceEngineConfig.cmake" "${OpenVINO_BINARY_DIR}/share/InferenceEngineConfig-version.cmake" @@ -164,17 +181,38 @@ index 3bba22215e..b6f6b7b203 100644 - DESTINATION ${IE_CPACK_RUNTIME_PATH} + DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT core) +diff --git a/inference-engine/src/preprocessing/CMakeLists.txt b/inference-engine/src/preprocessing/CMakeLists.txt +index 973fafcbf5..81aea3471a 100644 +--- a/inference-engine/src/preprocessing/CMakeLists.txt ++++ b/inference-engine/src/preprocessing/CMakeLists.txt +@@ -185,4 +185,4 @@ ie_developer_export_targets(${TARGET_NAME}) + install(TARGETS ${TARGET_NAME} + RUNTIME DESTINATION ${IE_CPACK_RUNTIME_PATH} COMPONENT core + ARCHIVE DESTINATION ${IE_CPACK_ARCHIVE_PATH} COMPONENT core +- LIBRARY DESTINATION ${IE_CPACK_RUNTIME_PATH} COMPONENT core) ++ LIBRARY DESTINATION ${IE_CPACK_LIBRARY_PATH} COMPONENT core) +diff --git a/inference-engine/src/readers/ir_reader/CMakeLists.txt b/inference-engine/src/readers/ir_reader/CMakeLists.txt +index 7721b7df6d..bf6543efa8 100644 +--- a/inference-engine/src/readers/ir_reader/CMakeLists.txt ++++ b/inference-engine/src/readers/ir_reader/CMakeLists.txt +@@ -49,4 +49,4 @@ add_cpplint_target(${TARGET_NAME}_cpplint FOR_TARGETS ${TARGET_NAME}) + install(TARGETS ${TARGET_NAME} + RUNTIME DESTINATION ${IE_CPACK_RUNTIME_PATH} COMPONENT core + ARCHIVE DESTINATION ${IE_CPACK_ARCHIVE_PATH} COMPONENT core +- LIBRARY DESTINATION ${IE_CPACK_RUNTIME_PATH} COMPONENT core) ++ LIBRARY DESTINATION ${IE_CPACK_LIBRARY_PATH} COMPONENT core) diff --git a/inference-engine/src/vpu/myriad_plugin/CMakeLists.txt b/inference-engine/src/vpu/myriad_plugin/CMakeLists.txt -index 889f2e6e66..67de9c3a32 100644 +index d8a5f2ec1d..2db7ddea6f 100644 --- a/inference-engine/src/vpu/myriad_plugin/CMakeLists.txt +++ b/inference-engine/src/vpu/myriad_plugin/CMakeLists.txt -@@ -50,5 +50,5 @@ set_target_properties(${TARGET_NAME} PROPERTIES INTERPROCEDURAL_OPTIMIZATION_REL +@@ -55,6 +55,6 @@ set_target_properties(${TARGET_NAME} PROPERTIES INTERPROCEDURAL_OPTIMIZATION_REL # install - - install(FILES ${IE_MAIN_SOURCE_DIR}/thirdparty/movidius/mvnc/src/97-myriad-usbboot.rules + if (LINUX) + install(FILES ${IE_MAIN_SOURCE_DIR}/thirdparty/movidius/mvnc/src/97-myriad-usbboot.rules - DESTINATION ${IE_CPACK_IE_DIR}/external + DESTINATION ${CMAKE_INSTALL_SYSCONFDIR}/udev/rules.d COMPONENT myriad) + endif() diff --git a/inference-engine/tests/unit/cpu/CMakeLists.txt b/inference-engine/tests/unit/cpu/CMakeLists.txt index c9a92b4857..2b4fcc4d01 100644 --- a/inference-engine/tests/unit/cpu/CMakeLists.txt @@ -186,7 +224,7 @@ index c9a92b4857..2b4fcc4d01 100644 + +install(TARGETS ${TARGET_NAME} DESTINATION ${CMAKE_INSTALL_BINDIR}) diff --git a/inference-engine/tests/unit/inference_engine/CMakeLists.txt b/inference-engine/tests/unit/inference_engine/CMakeLists.txt -index 76cc67cca1..04ff11cc05 100644 +index 1d9515f540..c81cb2ed79 100644 --- a/inference-engine/tests/unit/inference_engine/CMakeLists.txt +++ b/inference-engine/tests/unit/inference_engine/CMakeLists.txt @@ -26,3 +26,5 @@ addIeTargetTest( @@ -196,7 +234,7 @@ index 76cc67cca1..04ff11cc05 100644 + +install(TARGETS ${TARGET_NAME} DESTINATION ${CMAKE_INSTALL_BINDIR}) diff --git a/inference-engine/tests/unit/vpu/CMakeLists.txt b/inference-engine/tests/unit/vpu/CMakeLists.txt -index 215562f2af..215ec9f4fb 100644 +index 5be30a3092..6a01e280ae 100644 --- a/inference-engine/tests/unit/vpu/CMakeLists.txt +++ b/inference-engine/tests/unit/vpu/CMakeLists.txt @@ -35,3 +35,5 @@ addIeTargetTest( @@ -219,5 +257,5 @@ index 58614d3ced..9dfa068e4d 100644 install(FILES README.md -- -2.29.2 +2.29.0 diff --git a/dynamic-layers/openembedded-layer/recipes-support/opencv/files/0005-cldnn-fix-inclusion-of-headers.patch b/dynamic-layers/openembedded-layer/recipes-support/opencv/files/0005-cldnn-fix-inclusion-of-headers.patch deleted file mode 100644 index d4819077..00000000 --- a/dynamic-layers/openembedded-layer/recipes-support/opencv/files/0005-cldnn-fix-inclusion-of-headers.patch +++ /dev/null @@ -1,53 +0,0 @@ -From aa515686548d74a68456b9ba7a295b6ae4be343a Mon Sep 17 00:00:00 2001 -From: Anuj Mittal -Date: Wed, 10 Jun 2020 09:50:19 +0800 -Subject: [PATCH] cldnn: fix inclusion of headers - -Upstream-Status: Inappropriate - -Signed-off-by: Anuj Mittal - ---- - inference-engine/include/gpu/gpu_ocl_wrapper.hpp | 2 +- - inference-engine/src/cldnn_engine/CMakeLists.txt | 1 + - .../thirdparty/clDNN/common/khronos_ocl_clhpp/cl2_ext.hpp | 2 +- - 3 files changed, 3 insertions(+), 2 deletions(-) - -diff --git a/inference-engine/include/gpu/gpu_ocl_wrapper.hpp b/inference-engine/include/gpu/gpu_ocl_wrapper.hpp -index 68ccf3217..c5b0ce6be 100644 ---- a/inference-engine/include/gpu/gpu_ocl_wrapper.hpp -+++ b/inference-engine/include/gpu/gpu_ocl_wrapper.hpp -@@ -39,7 +39,7 @@ - # pragma GCC system_header - #endif - --#include -+#include - - #ifdef __GNUC__ - # pragma GCC diagnostic pop -diff --git a/inference-engine/src/cldnn_engine/CMakeLists.txt b/inference-engine/src/cldnn_engine/CMakeLists.txt -index 7e15abbed..46d43e0e5 100644 ---- a/inference-engine/src/cldnn_engine/CMakeLists.txt -+++ b/inference-engine/src/cldnn_engine/CMakeLists.txt -@@ -31,6 +31,7 @@ target_include_directories(${TARGET_NAME} PRIVATE - ${CMAKE_CURRENT_SOURCE_DIR} - $ - ${CLDNN__IOCL_ICD_INCDIRS} -+ ${CLDNN_TOP_FOLDER}/common/khronos_ocl_clhpp - ${CLDNN_TOP_FOLDER}) - - set_target_properties(${TARGET_NAME} PROPERTIES INTERPROCEDURAL_OPTIMIZATION_RELEASE ${ENABLE_LTO}) -diff --git a/inference-engine/thirdparty/clDNN/common/khronos_ocl_clhpp/cl2_ext.hpp b/inference-engine/thirdparty/clDNN/common/khronos_ocl_clhpp/cl2_ext.hpp -index 97608c30a..3a04096c0 100644 ---- a/inference-engine/thirdparty/clDNN/common/khronos_ocl_clhpp/cl2_ext.hpp -+++ b/inference-engine/thirdparty/clDNN/common/khronos_ocl_clhpp/cl2_ext.hpp -@@ -29,7 +29,7 @@ typedef cl_d3d11_device_set_khr cl_device_set_intel; - typedef cl_va_api_device_source_intel cl_device_source_intel; - typedef cl_va_api_device_set_intel cl_device_set_intel; - #endif --#include -+#include - #include "cl_intel_usm_defs.h" - - #include diff --git a/dynamic-layers/openembedded-layer/recipes-support/opencv/openvino-inference-engine_2021.2.bb b/dynamic-layers/openembedded-layer/recipes-support/opencv/openvino-inference-engine_2021.2.bb deleted file mode 100644 index 22194467..00000000 --- a/dynamic-layers/openembedded-layer/recipes-support/opencv/openvino-inference-engine_2021.2.bb +++ /dev/null @@ -1,123 +0,0 @@ -SUMMARY = "OpenVINO(TM) Toolkit - Deep Learning Deployment Toolkit" -HOMEPAGE = "https://github.com/opencv/dldt" -DESCRIPTION = "This toolkit allows developers to deploy pre-trained \ -deep learning models through a high-level C++ Inference Engine API \ -integrated with application logic." - -SRC_URI = "git://github.com/openvinotoolkit/openvino.git;protocol=git;branch=releases/2021/2;lfs=0 \ - https://download.01.org/opencv/master/openvinotoolkit/thirdparty/unified/VPU/usb-ma2x8x/firmware_usb-ma2x8x_1522.zip;name=usb_ma2x8x \ - https://download.01.org/opencv/master/openvinotoolkit/thirdparty/unified/VPU/pcie-ma2x8x/firmware_pcie-ma2x8x_1522.zip;name=pcie_ma2x8x \ - git://github.com/openvinotoolkit/oneDNN.git;protocol=https;destsuffix=git/inference-engine/thirdparty/mkl-dnn;name=mkl;nobranch=1 \ - file://0001-inference-engine-use-system-installed-packages.patch \ - file://0002-cldNN-disable-Werror.patch \ - file://0003-inference-engine-installation-fixes.patch \ - file://0005-cldnn-fix-inclusion-of-headers.patch \ - file://0001-dont-install-licenses-and-version-file.patch \ - " - -SRCREV = "4795391b73381660b69b4cd3986c7a0bf902e868" -SRCREV_mkl = "5ef085d5af65e8966e03cdfcbaa65761d61a5c9a" - -SRC_URI[usb_ma2x8x.sha256sum] = "95a93144f0bbfe6e35d3830e93e6b63e1e109f849a6a7c307cae9030e3a662aa" -SRC_URI[pcie_ma2x8x.sha256sum] = "6d061d21d90f1919ef375138066ba7a20ceb663901d2729d9cb1b639169df5da" - -LICENSE = "Apache-2.0 & ISSL & MIT" -LIC_FILES_CHKSUM = "file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327 \ - file://inference-engine/thirdparty/mkl-dnn/LICENSE;md5=afa44a3d001cc203032135324f9636b7 \ - file://inference-engine/thirdparty/mkl-dnn/src/cpu/xbyak/COPYRIGHT;md5=03532861dad9003cc2c17f14fc7a4efa \ - file://inference-engine/thirdparty/clDNN/common/khronos_ocl_clhpp/LICENSE.txt;md5=88b295a48d2b3244ba65d3c055472c8a \ -" -LICENSE_${PN}-vpu-firmware = "ISSL" - -inherit cmake python3native - -S = "${WORKDIR}/git" - -EXTRA_OECMAKE += " \ - -DENABLE_OPENCV=0 \ - -DENABLE_PLUGIN_RPATH=0 \ - -DENABLE_GNA=0 \ - -DPYTHON_EXECUTABLE=${PYTHON} \ - -DCMAKE_BUILD_TYPE=RelWithDebInfo \ - -DTHREADING=TBB -DTBB_DIR=${STAGING_LIBDIR} \ - -DENABLE_SAMPLES=1 \ - -DIE_CPACK_IE_DIR=${prefix} \ - -DNGRAPH_UNIT_TEST_ENABLE=FALSE \ - -DNGRAPH_TEST_UTIL_ENABLE=FALSE \ - -DNGRAPH_ONNX_IMPORT_ENABLE=OFF \ - -DNGRAPH_JSON_ENABLE=FALSE \ - -DTREAT_WARNING_AS_ERROR=FALSE \ - -DENABLE_SPEECH_DEMO=FALSE \ - -DENABLE_DATA=FALSE \ - -DUSE_SYSTEM_PUGIXML=TRUE \ - " - -DEPENDS += "libusb1 \ - ade \ - opencv \ - pugixml \ - protobuf-native \ - tbb \ - onednn \ - " - -COMPATIBLE_HOST = '(x86_64).*-linux' -COMPATIBLE_HOST_libc-musl = "null" - -PACKAGECONFIG ?= "vpu opencl" -PACKAGECONFIG[opencl] = "-DENABLE_CLDNN=1 -DCLDNN__IOCL_ICD_INCDIRS=${STAGING_INCDIR} -DCLDNN__IOCL_ICD_STLDIRS=${STAGING_LIBDIR} -DCLDNN__IOCL_ICD_SHLDIRS=${STAGING_LIBDIR}, -DENABLE_CLDNN=0, ocl-icd opencl-headers libva, intel-compute-runtime" -PACKAGECONFIG[python3] = "-DENABLE_PYTHON=ON -DPYTHON_LIBRARY=${PYTHON_LIBRARY} -DPYTHON_INCLUDE_DIR=${PYTHON_INCLUDE_DIR}, -DENABLE_PYTHON=OFF, python3-cython-native, python3 python3-numpy python3-opencv python3-progress python3-cython" -PACKAGECONFIG[vpu] = "-DENABLE_VPU=ON -DVPU_FIRMWARE_USB-MA2X8X_FILE=../mvnc/usb-ma2x8x.mvcmd -DVPU_FIRMWARE_PCIE-MA2X8X_FILE=../mvnc/pcie-ma2x8x.mvcmd,-DENABLE_VPU=OFF,,${PN}-vpu-firmware" -PACKAGECONFIG[verbose] = "-DVERBOSE_BUILD=1,-DVERBOSE_BUILD=0" - -do_install_append() { - if ${@bb.utils.contains('PACKAGECONFIG', 'vpu', 'true', 'false', d)}; then - install -m0644 ${WORKDIR}/mvnc/usb-ma2x8x.mvcmd ${D}${libdir}/ - install -m0644 ${WORKDIR}/mvnc/pcie-ma2x8x.mvcmd ${D}${libdir}/ - fi - - if ${@bb.utils.contains('PACKAGECONFIG', 'python3', 'true', 'false', d)}; then - install -d ${D}${datadir}/inference_engine - mv ${D}/usr/samples/python ${D}${datadir}/inference_engine/ - - install -d ${D}${PYTHON_SITEPACKAGES_DIR} - mv ${D}${prefix}/python/${PYTHON_DIR}/openvino ${D}${PYTHON_SITEPACKAGES_DIR}/ - mv ${D}${prefix}/deployment_tools/tools/benchmark_tool ${D}${PYTHON_SITEPACKAGES_DIR}/openvino/ - mv ${D}${prefix}/deployment_tools/tools/cross_check_tool ${D}${PYTHON_SITEPACKAGES_DIR}/openvino/ - - rm -rf ${D}${prefix}/python - fi - - rm -rf ${D}${prefix}/deployment_tools - - # Remove the samples source directory. We install the built samples. - rm -rf ${D}/usr/samples -} - -# Otherwise e.g. ros-openvino-toolkit-dynamic-vino-sample when using dldt-inference-engine uses dldt-inference-engine WORKDIR -# instead of RSS -SSTATE_SCAN_FILES_append = " *.cmake" - -FILES_${PN}-dev = "${includedir} \ - ${libdir}/cmake \ - " - -FILES_${PN} += "${libdir}/lib*${SOLIBSDEV} \ - ${datadir}/openvino \ - ${libdir}/custom_kernels \ - ${libdir}/plugins.xml \ - ${libdir}/cache.json \ - " - -# Move inference engine samples into a separate package -PACKAGES =+ "${PN}-samples ${PN}-vpu-firmware" - -FILES_${PN}-samples = "${datadir}/inference_engine \ - ${bindir} \ - " -FILES_${PN}-vpu-firmware += "${libdir}/*.mvcmd" - -# Package for inference engine python API -PACKAGES =+ "${PN}-${PYTHON_PN}" - -FILES_${PN}-${PYTHON_PN} = "${PYTHON_SITEPACKAGES_DIR}/openvino" diff --git a/dynamic-layers/openembedded-layer/recipes-support/opencv/openvino-inference-engine_2021.3.bb b/dynamic-layers/openembedded-layer/recipes-support/opencv/openvino-inference-engine_2021.3.bb new file mode 100644 index 00000000..a6f4e416 --- /dev/null +++ b/dynamic-layers/openembedded-layer/recipes-support/opencv/openvino-inference-engine_2021.3.bb @@ -0,0 +1,123 @@ +SUMMARY = "OpenVINO(TM) Toolkit - Deep Learning Deployment Toolkit" +HOMEPAGE = "https://github.com/opencv/dldt" +DESCRIPTION = "This toolkit allows developers to deploy pre-trained \ +deep learning models through a high-level C++ Inference Engine API \ +integrated with application logic." + +SRC_URI = "git://github.com/openvinotoolkit/openvino.git;protocol=git;branch=releases/2021/3;lfs=0 \ + https://download.01.org/opencv/master/openvinotoolkit/thirdparty/unified/VPU/usb-ma2x8x/firmware_usb-ma2x8x_1642.zip;name=usb_ma2x8x \ + https://download.01.org/opencv/master/openvinotoolkit/thirdparty/unified/VPU/pcie-ma2x8x/firmware_pcie-ma2x8x_1642.zip;name=pcie_ma2x8x \ + git://github.com/openvinotoolkit/oneDNN.git;protocol=https;destsuffix=git/inference-engine/thirdparty/mkl-dnn;name=mkl;nobranch=1 \ + git://github.com/herumi/xbyak.git;protocol=https;destsuffix=git/thirdparty/xbyak;name=xbyak \ + file://0001-inference-engine-use-system-installed-packages.patch \ + file://0002-cldNN-disable-Werror.patch \ + file://0003-inference-engine-installation-fixes.patch \ + file://0001-dont-install-licenses-and-version-file.patch \ + " + +SRCREV = "18e83a217702c650280c6abfc43f3285a3aadb61" +SRCREV_mkl = "d35c3c11f9ff0f5090f9afe16af122cda501134c" +SRCREV_xbyak = "8d1e41b650890080fb77548372b6236bbd4079f9" + +SRC_URI[usb_ma2x8x.sha256sum] = "d0f6aaaf71a595963e6013ef59045e20b07324f1a47deaa3f906419d39b2bd5a" +SRC_URI[pcie_ma2x8x.sha256sum] = "18d3cd10cf6cc36ff58001812d3d215c0bbb2de09a8832128592401c8f959358" + +LICENSE = "Apache-2.0 & ISSL & MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327 \ + file://inference-engine/thirdparty/mkl-dnn/LICENSE;md5=c441291ac5f15bdc6b09b4cc02ece35b \ + file://thirdparty/xbyak/COPYRIGHT;md5=03532861dad9003cc2c17f14fc7a4efa \ + file://inference-engine/thirdparty/clDNN/common/include/OpenCL_CLHPP_License.txt;md5=3b83ef96387f14655fc854ddc3c6bd57 \ +" +LICENSE_${PN}-vpu-firmware = "ISSL" + +inherit cmake python3native + +S = "${WORKDIR}/git" + +EXTRA_OECMAKE += " \ + -DENABLE_OPENCV=0 \ + -DENABLE_PLUGIN_RPATH=0 \ + -DENABLE_GNA=0 \ + -DPYTHON_EXECUTABLE=${PYTHON} \ + -DCMAKE_BUILD_TYPE=RelWithDebInfo \ + -DTHREADING=TBB -DTBB_DIR=${STAGING_LIBDIR}/cmake/TBB \ + -DENABLE_SAMPLES=1 \ + -DIE_CPACK_IE_DIR=${prefix} \ + -DNGRAPH_UNIT_TEST_ENABLE=FALSE \ + -DNGRAPH_TEST_UTIL_ENABLE=FALSE \ + -DNGRAPH_ONNX_IMPORT_ENABLE=OFF \ + -DNGRAPH_JSON_ENABLE=FALSE \ + -DTREAT_WARNING_AS_ERROR=FALSE \ + -DENABLE_SPEECH_DEMO=FALSE \ + -DENABLE_DATA=FALSE \ + -DUSE_SYSTEM_PUGIXML=TRUE \ + " + +DEPENDS += "libusb1 \ + ade \ + opencv \ + pugixml \ + protobuf-native \ + tbb \ + " + +COMPATIBLE_HOST = '(x86_64).*-linux' +COMPATIBLE_HOST_libc-musl = "null" + +PACKAGECONFIG ?= "vpu opencl" +PACKAGECONFIG[opencl] = "-DENABLE_CLDNN=1 -DCLDNN__IOCL_ICD_INCDIRS=${STAGING_INCDIR} -DCLDNN__IOCL_ICD_STLDIRS=${STAGING_LIBDIR} -DCLDNN__IOCL_ICD_SHLDIRS=${STAGING_LIBDIR}, -DENABLE_CLDNN=0, ocl-icd opencl-headers libva, intel-compute-runtime" +PACKAGECONFIG[python3] = "-DENABLE_PYTHON=ON -DPYTHON_LIBRARY=${PYTHON_LIBRARY} -DPYTHON_INCLUDE_DIR=${PYTHON_INCLUDE_DIR}, -DENABLE_PYTHON=OFF, python3-cython-native, python3 python3-numpy python3-opencv python3-progress python3-cython" +PACKAGECONFIG[vpu] = "-DENABLE_VPU=ON -DVPU_FIRMWARE_USB-MA2X8X_FILE=../mvnc/usb-ma2x8x.mvcmd -DVPU_FIRMWARE_PCIE-MA2X8X_FILE=../mvnc/pcie-ma2x8x.mvcmd,-DENABLE_VPU=OFF,,${PN}-vpu-firmware" +PACKAGECONFIG[verbose] = "-DVERBOSE_BUILD=1,-DVERBOSE_BUILD=0" + +do_install_append() { + if ${@bb.utils.contains('PACKAGECONFIG', 'vpu', 'true', 'false', d)}; then + install -m0644 ${WORKDIR}/mvnc/usb-ma2x8x.mvcmd ${D}${libdir}/ + install -m0644 ${WORKDIR}/mvnc/pcie-ma2x8x.mvcmd ${D}${libdir}/ + fi + + if ${@bb.utils.contains('PACKAGECONFIG', 'python3', 'true', 'false', d)}; then + install -d ${D}${datadir}/inference_engine + mv ${D}/usr/samples/python ${D}${datadir}/inference_engine/ + + install -d ${D}${PYTHON_SITEPACKAGES_DIR} + mv ${D}${prefix}/python/${PYTHON_DIR}/openvino ${D}${PYTHON_SITEPACKAGES_DIR}/ + mv ${D}${prefix}/deployment_tools/tools/benchmark_tool ${D}${PYTHON_SITEPACKAGES_DIR}/openvino/ + mv ${D}${prefix}/deployment_tools/tools/cross_check_tool ${D}${PYTHON_SITEPACKAGES_DIR}/openvino/ + + rm -rf ${D}${prefix}/python + fi + + rm -rf ${D}${prefix}/deployment_tools + + # Remove the samples source directory. We install the built samples. + rm -rf ${D}/usr/samples +} + +# Otherwise e.g. ros-openvino-toolkit-dynamic-vino-sample when using dldt-inference-engine uses dldt-inference-engine WORKDIR +# instead of RSS +SSTATE_SCAN_FILES_append = " *.cmake" + +FILES_${PN}-dev = "${includedir} \ + ${libdir}/cmake \ + " + +FILES_${PN} += "${libdir}/lib*${SOLIBSDEV} \ + ${datadir}/openvino \ + ${libdir}/custom_kernels \ + ${libdir}/plugins.xml \ + ${libdir}/cache.json \ + " + +# Move inference engine samples into a separate package +PACKAGES =+ "${PN}-samples ${PN}-vpu-firmware" + +FILES_${PN}-samples = "${datadir}/inference_engine \ + ${bindir} \ + " +FILES_${PN}-vpu-firmware += "${libdir}/*.mvcmd" + +# Package for inference engine python API +PACKAGES =+ "${PN}-${PYTHON_PN}" + +FILES_${PN}-${PYTHON_PN} = "${PYTHON_SITEPACKAGES_DIR}/openvino" -- cgit v1.2.3-54-g00ecf