summaryrefslogtreecommitdiffstats
path: root/dynamic-layers/openembedded-layer/recipes-support/opencv/files/0001-fix-openmp-checking.patch
diff options
context:
space:
mode:
authorChin Huat Ang <chin.huat.ang@intel.com>2019-09-27 06:11:51 +0800
committerAnuj Mittal <anuj.mittal@intel.com>2019-09-28 17:18:30 +0800
commit096598691de246c23902d49d228c7562ba2c9cc5 (patch)
tree8df7c03aaf84bd38374ae049ba0f31031c20c6d0 /dynamic-layers/openembedded-layer/recipes-support/opencv/files/0001-fix-openmp-checking.patch
parent7aef51c962c023f27e3fcda4c2419f1ced9942b9 (diff)
downloadmeta-intel-096598691de246c23902d49d228c7562ba2c9cc5.tar.gz
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>
Diffstat (limited to 'dynamic-layers/openembedded-layer/recipes-support/opencv/files/0001-fix-openmp-checking.patch')
-rw-r--r--dynamic-layers/openembedded-layer/recipes-support/opencv/files/0001-fix-openmp-checking.patch61
1 files changed, 61 insertions, 0 deletions
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 @@
1From 46520b6fa766aabcb8c8bc0ead485d30bae965ea Mon Sep 17 00:00:00 2001
2From: Chin Huat Ang <chin.huat.ang@intel.com>
3Date: Tue, 20 Aug 2019 12:20:33 +0800
4Subject: [PATCH] fix openmp checking
5
6Make sure that we supply -fopenmp when using OpenMP supplied by compiler
7and dont look for it locally.
8
9Upstream-Status: Submitted
10Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
11Signed-off-by: Chin Huat Ang <chin.huat.ang@intel.com>
12---
13 inference-engine/cmake/dependencies.cmake | 6 +-----
14 inference-engine/cmake/ie_parallel.cmake | 4 ++--
15 inference-engine/src/mkldnn_plugin/CMakeLists.txt | 1 +
16 3 files changed, 4 insertions(+), 7 deletions(-)
17
18diff --git a/inference-engine/cmake/dependencies.cmake b/inference-engine/cmake/dependencies.cmake
19index d3cdf95..64435ca 100644
20--- a/inference-engine/cmake/dependencies.cmake
21+++ b/inference-engine/cmake/dependencies.cmake
22@@ -86,11 +86,7 @@ if (WIN32)
23 ENVIRONMENT "OMP"
24 VERSION_REGEX ".*_([a-z]*_([a-z0-9]+\\.)*[0-9]+).*")
25 elseif(LINUX)
26- RESOLVE_DEPENDENCY(OMP
27- ARCHIVE_LIN "iomp.tgz"
28- TARGET_PATH "${TEMP}/omp"
29- ENVIRONMENT "OMP"
30- VERSION_REGEX ".*_([a-z]*_([a-z0-9]+\\.)*[0-9]+).*")
31+ set(OMP "-fopenmp")
32 else(APPLE)
33 RESOLVE_DEPENDENCY(OMP
34 ARCHIVE_MAC "iomp_20190130_mac.tgz"
35diff --git a/inference-engine/cmake/ie_parallel.cmake b/inference-engine/cmake/ie_parallel.cmake
36index 18ccdf0..2738ee5 100644
37--- a/inference-engine/cmake/ie_parallel.cmake
38+++ b/inference-engine/cmake/ie_parallel.cmake
39@@ -68,8 +68,8 @@ function(set_ie_threading_interface_for TARGET_NAME)
40 endif ()
41
42 if (NOT OMP_LIBRARIES_RELEASE OR NOT OMP_LIBRARIES_DEBUG)
43- find_library(OMP_LIBRARIES_RELEASE ${omp_lib_name} ${lib_rel_path} NO_DEFAULT_PATH)
44- find_library(OMP_LIBRARIES_DEBUG ${omp_lib_name} ${lib_dbg_path} NO_DEFAULT_PATH)
45+ find_library(OMP_LIBRARIES_RELEASE ${omp_lib_name})
46+ find_library(OMP_LIBRARIES_DEBUG ${omp_lib_name})
47 ext_message(STATUS "OMP Release lib: ${OMP_LIBRARIES_RELEASE}")
48 ext_message(STATUS "OMP Debug lib: ${OMP_LIBRARIES_DEBUG}")
49 endif ()
50diff --git a/inference-engine/src/mkldnn_plugin/CMakeLists.txt b/inference-engine/src/mkldnn_plugin/CMakeLists.txt
51index df81a5a..96c7f1c 100644
52--- a/inference-engine/src/mkldnn_plugin/CMakeLists.txt
53+++ b/inference-engine/src/mkldnn_plugin/CMakeLists.txt
54@@ -50,6 +50,7 @@ if (THREADING STREQUAL "TBB")
55 set(MKLDNN_THR MKLDNN_THR_TBB)
56 elseif (THREADING STREQUAL "OMP")
57 set(MKLDNN_THR MKLDNN_THR_OMP)
58+ target_link_options(${TARGET_NAME} PRIVATE -fopenmp)
59 else()
60 set(MKLDNN_THR MKLDNN_THR_SEQ)
61 endif()