From 096598691de246c23902d49d228c7562ba2c9cc5 Mon Sep 17 00:00:00 2001 From: Chin Huat Ang Date: Fri, 27 Sep 2019 06:11:51 +0800 Subject: dldt-inference-engine: add recipe MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This recipe builds the inference engine from opencv/dldt 2019 R1.1 release. OpenVINO™ toolkit, short for Open Visual Inference and Neural network Optimization toolkit, provides developers with improved neural network performance on a variety of Intel® processors and helps further unlock cost-effective, real-time vision applications. The toolkit enables deep learning inference and easy heterogeneous execution across multiple Intel® platforms (CPU, Intel® Processor Graphics)—providing implementations across cloud architectures to edge device. For more details, see: https://01.org/openvinotoolkit The recipe needs components from meta-oe so move it to dynamic-layers/openembedded-layer. GPU plugin support needs intel-compute-runtime which can be built by including clang layer in the mix as well. CPU and GPU plugins have been sanity tested to work using classification_sample. Further fine-tuning is still needed to improve the performance. Original patch by Anuj Mittal. Signed-off-by: Chin Huat Ang Signed-off-by: Anuj Mittal --- .../opencv/files/0001-fix-openmp-checking.patch | 61 ++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 dynamic-layers/openembedded-layer/recipes-support/opencv/files/0001-fix-openmp-checking.patch (limited to 'dynamic-layers/openembedded-layer/recipes-support/opencv/files/0001-fix-openmp-checking.patch') diff --git a/dynamic-layers/openembedded-layer/recipes-support/opencv/files/0001-fix-openmp-checking.patch b/dynamic-layers/openembedded-layer/recipes-support/opencv/files/0001-fix-openmp-checking.patch new file mode 100644 index 00000000..6053a315 --- /dev/null +++ b/dynamic-layers/openembedded-layer/recipes-support/opencv/files/0001-fix-openmp-checking.patch @@ -0,0 +1,61 @@ +From 46520b6fa766aabcb8c8bc0ead485d30bae965ea Mon Sep 17 00:00:00 2001 +From: Chin Huat Ang +Date: Tue, 20 Aug 2019 12:20:33 +0800 +Subject: [PATCH] fix openmp checking + +Make sure that we supply -fopenmp when using OpenMP supplied by compiler +and dont look for it locally. + +Upstream-Status: Submitted +Signed-off-by: Anuj Mittal +Signed-off-by: Chin Huat Ang +--- + inference-engine/cmake/dependencies.cmake | 6 +----- + inference-engine/cmake/ie_parallel.cmake | 4 ++-- + inference-engine/src/mkldnn_plugin/CMakeLists.txt | 1 + + 3 files changed, 4 insertions(+), 7 deletions(-) + +diff --git a/inference-engine/cmake/dependencies.cmake b/inference-engine/cmake/dependencies.cmake +index d3cdf95..64435ca 100644 +--- a/inference-engine/cmake/dependencies.cmake ++++ b/inference-engine/cmake/dependencies.cmake +@@ -86,11 +86,7 @@ if (WIN32) + ENVIRONMENT "OMP" + VERSION_REGEX ".*_([a-z]*_([a-z0-9]+\\.)*[0-9]+).*") + elseif(LINUX) +- RESOLVE_DEPENDENCY(OMP +- ARCHIVE_LIN "iomp.tgz" +- TARGET_PATH "${TEMP}/omp" +- ENVIRONMENT "OMP" +- VERSION_REGEX ".*_([a-z]*_([a-z0-9]+\\.)*[0-9]+).*") ++ set(OMP "-fopenmp") + else(APPLE) + RESOLVE_DEPENDENCY(OMP + ARCHIVE_MAC "iomp_20190130_mac.tgz" +diff --git a/inference-engine/cmake/ie_parallel.cmake b/inference-engine/cmake/ie_parallel.cmake +index 18ccdf0..2738ee5 100644 +--- a/inference-engine/cmake/ie_parallel.cmake ++++ b/inference-engine/cmake/ie_parallel.cmake +@@ -68,8 +68,8 @@ function(set_ie_threading_interface_for TARGET_NAME) + endif () + + if (NOT OMP_LIBRARIES_RELEASE OR NOT OMP_LIBRARIES_DEBUG) +- find_library(OMP_LIBRARIES_RELEASE ${omp_lib_name} ${lib_rel_path} NO_DEFAULT_PATH) +- find_library(OMP_LIBRARIES_DEBUG ${omp_lib_name} ${lib_dbg_path} NO_DEFAULT_PATH) ++ find_library(OMP_LIBRARIES_RELEASE ${omp_lib_name}) ++ find_library(OMP_LIBRARIES_DEBUG ${omp_lib_name}) + ext_message(STATUS "OMP Release lib: ${OMP_LIBRARIES_RELEASE}") + ext_message(STATUS "OMP Debug lib: ${OMP_LIBRARIES_DEBUG}") + endif () +diff --git a/inference-engine/src/mkldnn_plugin/CMakeLists.txt b/inference-engine/src/mkldnn_plugin/CMakeLists.txt +index df81a5a..96c7f1c 100644 +--- a/inference-engine/src/mkldnn_plugin/CMakeLists.txt ++++ b/inference-engine/src/mkldnn_plugin/CMakeLists.txt +@@ -50,6 +50,7 @@ if (THREADING STREQUAL "TBB") + set(MKLDNN_THR MKLDNN_THR_TBB) + elseif (THREADING STREQUAL "OMP") + set(MKLDNN_THR MKLDNN_THR_OMP) ++ target_link_options(${TARGET_NAME} PRIVATE -fopenmp) + else() + set(MKLDNN_THR MKLDNN_THR_SEQ) + endif() -- cgit v1.2.3-54-g00ecf