meta-intel/dynamic-layers/openembedded-layer/recipes-support/opencv/files/0001-fix-openmp-checking.patch
Chin Huat Ang 096598691d dldt-inference-engine: add recipe
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 <chin.huat.ang@intel.com>
Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
2019-09-28 17:18:30 +08:00

62 lines
2.7 KiB
Diff

From 46520b6fa766aabcb8c8bc0ead485d30bae965ea Mon Sep 17 00:00:00 2001
From: Chin Huat Ang <chin.huat.ang@intel.com>
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 <anuj.mittal@intel.com>
Signed-off-by: Chin Huat Ang <chin.huat.ang@intel.com>
---
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()