summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnuj Mittal <anuj.mittal@intel.com>2020-04-13 04:54:46 (GMT)
committerAnuj Mittal <anuj.mittal@intel.com>2020-04-13 07:22:18 (GMT)
commitaf4fdcc32177898b87976a5174320057e6f272ae (patch)
tree12f4318379ed9d9a447ee3d9f26023ffcc539d9a
parent89c0fe5dcedf72f4db586aab4f7486a22d1a52c9 (diff)
downloadmeta-intel-af4fdcc32177898b87976a5174320057e6f272ae.tar.gz
dldt-inference-engine: fix installation of samples
We don't want to install sample sources. So delete them and install the binaries instead. Also make sure that we're installing the python samples and modules at correct location. Remove the tweaks from local patch and copy in the recipe itself. Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
-rw-r--r--dynamic-layers/openembedded-layer/recipes-support/opencv/dldt-inference-engine_2020r1.bb19
-rw-r--r--dynamic-layers/openembedded-layer/recipes-support/opencv/files/0001-Installation-and-build-fixes.patch163
2 files changed, 66 insertions, 116 deletions
diff --git a/dynamic-layers/openembedded-layer/recipes-support/opencv/dldt-inference-engine_2020r1.bb b/dynamic-layers/openembedded-layer/recipes-support/opencv/dldt-inference-engine_2020r1.bb
index d13752b..fc16071 100644
--- a/dynamic-layers/openembedded-layer/recipes-support/opencv/dldt-inference-engine_2020r1.bb
+++ b/dynamic-layers/openembedded-layer/recipes-support/opencv/dldt-inference-engine_2020r1.bb
@@ -43,7 +43,7 @@ EXTRA_OECMAKE += " \
43 -DBUILD_GTEST=0 \ 43 -DBUILD_GTEST=0 \
44 -DINSTALL_GMOCK=0 \ 44 -DINSTALL_GMOCK=0 \
45 -DINSTALL_GTEST=0 \ 45 -DINSTALL_GTEST=0 \
46 -DENABLE_SAMPLES=0 \ 46 -DENABLE_SAMPLES=1 \
47 -DENABLE_NGRAPH=ON \ 47 -DENABLE_NGRAPH=ON \
48 -DENABLE_MKL_DNN=ON \ 48 -DENABLE_MKL_DNN=ON \
49 -DIE_CPACK_IE_DIR=${prefix} \ 49 -DIE_CPACK_IE_DIR=${prefix} \
@@ -77,6 +77,19 @@ do_install_append() {
77 if ${@bb.utils.contains('PACKAGECONFIG', 'opencl', 'true', 'false', d)}; then 77 if ${@bb.utils.contains('PACKAGECONFIG', 'opencl', 'true', 'false', d)}; then
78 cp -r ${S}/inference-engine/src/cldnn_engine/cldnn_global_custom_kernels ${D}${libdir}/ 78 cp -r ${S}/inference-engine/src/cldnn_engine/cldnn_global_custom_kernels ${D}${libdir}/
79 fi 79 fi
80
81 if ${@bb.utils.contains('PACKAGECONFIG', 'python3', 'true', 'false', d)}; then
82 install -d ${D}${datadir}/inference_engine
83 mv ${D}/usr/samples/python ${D}${datadir}/inference_engine/
84
85 install -d ${D}${PYTHON_SITEPACKAGES_DIR}
86 mv ${D}${prefix}/python/${PYTHON_DIR}/openvino ${D}${PYTHON_SITEPACKAGES_DIR}/
87
88 rm -rf ${D}${prefix}/python
89 fi
90
91 # Remove the samples source directory. We install the built samples.
92 rm -rf ${D}/usr/samples
80} 93}
81 94
82do_install_ptest_base_prepend() { 95do_install_ptest_base_prepend() {
@@ -107,7 +120,9 @@ FILES_${PN} += "${libdir}/lib*${SOLIBSDEV} \
107# Move inference engine samples into a separate package 120# Move inference engine samples into a separate package
108PACKAGES =+ "${PN}-samples ${PN}-vpu-firmware" 121PACKAGES =+ "${PN}-samples ${PN}-vpu-firmware"
109 122
110FILES_${PN}-samples = "${datadir}/inference_engine" 123FILES_${PN}-samples = "${datadir}/inference_engine \
124 ${bindir} \
125 "
111FILES_${PN}-vpu-firmware += "${libdir}/*.mvcmd" 126FILES_${PN}-vpu-firmware += "${libdir}/*.mvcmd"
112 127
113# Package for inference engine python API 128# Package for inference engine python API
diff --git a/dynamic-layers/openembedded-layer/recipes-support/opencv/files/0001-Installation-and-build-fixes.patch b/dynamic-layers/openembedded-layer/recipes-support/opencv/files/0001-Installation-and-build-fixes.patch
index 79173ad..c4c7bd0 100644
--- a/dynamic-layers/openembedded-layer/recipes-support/opencv/files/0001-Installation-and-build-fixes.patch
+++ b/dynamic-layers/openembedded-layer/recipes-support/opencv/files/0001-Installation-and-build-fixes.patch
@@ -1,6 +1,6 @@
1From 295d119e12d22919fdc305470cd07973ba02f162 Mon Sep 17 00:00:00 2001 1From 1c78ff3ff1f77c78a618f7a780985cef1933bb2b Mon Sep 17 00:00:00 2001
2From: Anuj Mittal <anuj.mittal@intel.com> 2From: Anuj Mittal <anuj.mittal@intel.com>
3Date: Fri, 10 Apr 2020 09:29:35 +0800 3Date: Mon, 13 Apr 2020 15:20:28 +0800
4Subject: [PATCH] Installation and build fixes 4Subject: [PATCH] Installation and build fixes
5 5
6- Install libs, samples and binaries at appropriate places. 6- Install libs, samples and binaries at appropriate places.
@@ -13,28 +13,27 @@ Upstream-Status: Inappropriate [OS-specific]
13 13
14Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> 14Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
15--- 15---
16 CMakeLists.txt | 2 -- 16 CMakeLists.txt | 2 --
17 cmake/developer_package.cmake | 8 +++++--- 17 cmake/developer_package.cmake | 8 +++++---
18 cmake/os_flags.cmake | 1 - 18 cmake/os_flags.cmake | 1 -
19 inference-engine/CMakeLists.txt | 20 +++++++++---------- 19 inference-engine/CMakeLists.txt | 7 ++-----
20 inference-engine/cmake/ie_parallel.cmake | 10 ++-------- 20 inference-engine/cmake/ie_parallel.cmake | 10 ++--------
21 .../ie_bridges/python/CMakeLists.txt | 4 ++-- 21 .../include/gpu/gpu_ocl_wrapper.hpp | 2 +-
22 .../openvino/inference_engine/CMakeLists.txt | 18 +---------------- 22 inference-engine/samples/CMakeLists.txt | 8 +++-----
23 .../include/gpu/gpu_ocl_wrapper.hpp | 2 +- 23 .../samples/common/format_reader/CMakeLists.txt | 2 ++
24 inference-engine/samples/CMakeLists.txt | 6 +----- 24 .../src/cldnn_engine/CMakeLists.txt | 1 +
25 .../src/cldnn_engine/CMakeLists.txt | 1 + 25 .../src/inference_engine/CMakeLists.txt | 17 +----------------
26 .../src/inference_engine/CMakeLists.txt | 17 +--------------- 26 .../src/vpu/myriad_plugin/CMakeLists.txt | 2 +-
27 .../src/vpu/myriad_plugin/CMakeLists.txt | 2 +- 27 .../tests/mock_engine/CMakeLists.txt | 2 ++
28 .../tests/mock_engine/CMakeLists.txt | 2 ++ 28 inference-engine/tests/unit/CMakeLists.txt | 2 ++
29 inference-engine/tests/unit/CMakeLists.txt | 2 ++ 29 inference-engine/thirdparty/CMakeLists.txt | 4 +---
30 inference-engine/thirdparty/CMakeLists.txt | 4 +--- 30 .../clDNN/CMakeCompilerLinkerOpts.txt | 2 --
31 .../clDNN/CMakeCompilerLinkerOpts.txt | 2 -- 31 .../thirdparty/clDNN/CMakeLists.txt | 1 -
32 .../thirdparty/clDNN/CMakeLists.txt | 1 - 32 .../clDNN/common/khronos_ocl_clhpp/cl2_ext.hpp | 2 +-
33 .../common/khronos_ocl_clhpp/cl2_ext.hpp | 2 +- 33 .../tools/compile_tool/CMakeLists.txt | 2 +-
34 .../tools/compile_tool/CMakeLists.txt | 2 +- 34 .../tools/vpu/vpu_compile/CMakeLists.txt | 4 ++--
35 .../tools/vpu/vpu_compile/CMakeLists.txt | 4 ++-- 35 .../tools/vpu/vpu_perfcheck/CMakeLists.txt | 2 +-
36 .../tools/vpu/vpu_perfcheck/CMakeLists.txt | 2 +- 36 20 files changed, 28 insertions(+), 53 deletions(-)
37 21 files changed, 34 insertions(+), 78 deletions(-)
38 37
39diff --git a/CMakeLists.txt b/CMakeLists.txt 38diff --git a/CMakeLists.txt b/CMakeLists.txt
40index e48cee57..e9598455 100644 39index e48cee57..e9598455 100644
@@ -95,49 +94,10 @@ index 6f70768f..40141aca 100644
95 ie_add_compiler_flags(-fvisibility=hidden) 94 ie_add_compiler_flags(-fvisibility=hidden)
96 ie_add_compiler_flags(-fdiagnostics-show-option) 95 ie_add_compiler_flags(-fdiagnostics-show-option)
97diff --git a/inference-engine/CMakeLists.txt b/inference-engine/CMakeLists.txt 96diff --git a/inference-engine/CMakeLists.txt b/inference-engine/CMakeLists.txt
98index d5feedb4..4cf5fb3d 100644 97index d5feedb4..1ee656a1 100644
99--- a/inference-engine/CMakeLists.txt 98--- a/inference-engine/CMakeLists.txt
100+++ b/inference-engine/CMakeLists.txt 99+++ b/inference-engine/CMakeLists.txt
101@@ -86,13 +86,13 @@ ie_cpack_add_component(cpp_samples REQUIRED DEPENDS core) 100@@ -123,12 +123,13 @@ install(FILES samples/CMakeLists.txt
102
103 if(UNIX)
104 install(DIRECTORY samples/
105- DESTINATION ${IE_CPACK_IE_DIR}/samples/cpp
106+ DESTINATION ${IE_CPACK_IE_DIR}/share/inference_engine/samples/
107 COMPONENT cpp_samples
108 USE_SOURCE_PERMISSIONS
109 PATTERN *.bat EXCLUDE)
110 elseif(WIN32)
111 install(DIRECTORY samples
112- DESTINATION ${IE_CPACK_IE_DIR}/samples/cpp
113+ DESTINATION ${IE_CPACK_IE_DIR}/share/inference_engine/samples/
114 COMPONENT cpp_samples
115 USE_SOURCE_PERMISSIONS
116 PATTERN *.sh EXCLUDE)
117@@ -104,30 +104,32 @@ ie_cpack_add_component(c_samples REQUIRED DEPENDS core)
118
119 if(UNIX)
120 install(PROGRAMS samples/build_samples.sh
121- DESTINATION ${IE_CPACK_IE_DIR}/samples/c
122+ DESTINATION ${IE_CPACK_IE_DIR}/share/inference_engine/samples/c
123 COMPONENT c_samples)
124 elseif(WIN32)
125 install(PROGRAMS samples/build_samples_msvc.bat
126- DESTINATION ${IE_CPACK_IE_DIR}/samples/c
127+ DESTINATION ${IE_CPACK_IE_DIR}/share/inference_engine/samples/c
128 COMPONENT c_samples)
129 endif()
130
131 install(DIRECTORY ie_bridges/c/samples/
132- DESTINATION ${IE_CPACK_IE_DIR}/samples/c
133+ DESTINATION ${IE_CPACK_IE_DIR}/share/inference_engine/samples/c
134 COMPONENT c_samples
135 PATTERN ie_bridges/c/samples/CMakeLists.txt EXCLUDE)
136
137 install(FILES samples/CMakeLists.txt
138- DESTINATION ${IE_CPACK_IE_DIR}/samples/c
139+ DESTINATION ${IE_CPACK_IE_DIR}/share/inference_engine/samples/c
140 COMPONENT c_samples)
141 101
142 # install Python samples 102 # install Python samples
143 103
@@ -145,14 +105,14 @@ index d5feedb4..4cf5fb3d 100644
145 ie_cpack_add_component(python_samples REQUIRED DEPENDS core) 105 ie_cpack_add_component(python_samples REQUIRED DEPENDS core)
146 106
147 install(DIRECTORY ${ie_python_api_SOURCE_DIR}/sample/ 107 install(DIRECTORY ${ie_python_api_SOURCE_DIR}/sample/
148- DESTINATION ${IE_CPACK_IE_DIR}/samples/python 108 DESTINATION ${IE_CPACK_IE_DIR}/samples/python
149+ DESTINATION ${IE_CPACK_IE_DIR}/share/inference_engine/samples/python
150 COMPONENT python_samples) 109 COMPONENT python_samples)
110-
151+endif() 111+endif()
152
153 # Custom target to build only Inference Engine Developer Package targets 112 # Custom target to build only Inference Engine Developer Package targets
154 113
155@@ -136,10 +138,6 @@ add_custom_target(ie_dev_targets ALL DEPENDS inference_engine HeteroPlugin) 114 add_custom_target(ie_dev_targets ALL DEPENDS inference_engine HeteroPlugin)
115@@ -136,10 +137,6 @@ add_custom_target(ie_dev_targets ALL DEPENDS inference_engine HeteroPlugin)
156 # Developer package 116 # Developer package
157 ie_developer_export_targets(format_reader) 117 ie_developer_export_targets(format_reader)
158 118
@@ -184,50 +144,6 @@ index 9ea885be..71733fd9 100644
184 elseif (THREADING STREQUAL "OMP") 144 elseif (THREADING STREQUAL "OMP")
185 if (WIN32) 145 if (WIN32)
186 set(omp_lib_name libiomp5md) 146 set(omp_lib_name libiomp5md)
187diff --git a/inference-engine/ie_bridges/python/CMakeLists.txt b/inference-engine/ie_bridges/python/CMakeLists.txt
188index b9492dfe..933b3c04 100644
189--- a/inference-engine/ie_bridges/python/CMakeLists.txt
190+++ b/inference-engine/ie_bridges/python/CMakeLists.txt
191@@ -52,11 +52,11 @@ add_subdirectory (src/openvino/inference_engine)
192 ie_cpack_add_component(${PYTHON_VERSION} REQUIRED)
193
194 install(FILES requirements.txt
195- DESTINATION python/${PYTHON_VERSION}
196+ DESTINATION ${CMAKE_INSTALL_LIBDIR}/${PYTHON_VERSION}/site-packages/openvino/
197 COMPONENT ${PYTHON_VERSION})
198
199 install(PROGRAMS src/openvino/__init__.py
200- DESTINATION python/${PYTHON_VERSION}/openvino
201+ DESTINATION ${CMAKE_INSTALL_LIBDIR}/${PYTHON_VERSION}/site-packages/openvino/
202 COMPONENT ${PYTHON_VERSION})
203
204 ie_cpack(${PYTHON_VERSION})
205diff --git a/inference-engine/ie_bridges/python/src/openvino/inference_engine/CMakeLists.txt b/inference-engine/ie_bridges/python/src/openvino/inference_engine/CMakeLists.txt
206index 72175b33..0f2425dc 100644
207--- a/inference-engine/ie_bridges/python/src/openvino/inference_engine/CMakeLists.txt
208+++ b/inference-engine/ie_bridges/python/src/openvino/inference_engine/CMakeLists.txt
209@@ -32,20 +32,4 @@ if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
210 target_compile_options(${TARGET_NAME} PRIVATE "-Wno-error=register")
211 endif()
212
213-# perform copy
214-add_custom_command(TARGET ${TARGET_NAME}
215- POST_BUILD
216- COMMAND ${CMAKE_COMMAND} -E copy ${PYTHON_BRIDGE_SRC_ROOT}/src/openvino/inference_engine/__init__.py ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/__init__.py
217- COMMAND ${CMAKE_COMMAND} -E copy ${PYTHON_BRIDGE_SRC_ROOT}/requirements.txt ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/../../requirements.txt
218- COMMAND ${CMAKE_COMMAND} -E copy ${PYTHON_BRIDGE_SRC_ROOT}/src/openvino/__init__.py ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/../__init__.py
219-)
220-
221-# install
222-
223-install(TARGETS ${TARGET_NAME}
224- DESTINATION python/${PYTHON_VERSION}/openvino/inference_engine
225- COMPONENT ${PYTHON_VERSION})
226-
227-install(PROGRAMS __init__.py
228- DESTINATION python/${PYTHON_VERSION}/openvino/inference_engine
229- COMPONENT ${PYTHON_VERSION})
230+install(DIRECTORY ${PYTHON_BRIDGE_OUTPUT_DIRECTORY} DESTINATION ${CMAKE_INSTALL_LIBDIR}/${PYTHON_VERSION}/site-packages/)
231diff --git a/inference-engine/include/gpu/gpu_ocl_wrapper.hpp b/inference-engine/include/gpu/gpu_ocl_wrapper.hpp 147diff --git a/inference-engine/include/gpu/gpu_ocl_wrapper.hpp b/inference-engine/include/gpu/gpu_ocl_wrapper.hpp
232index fce7d8f1..827e5764 100644 148index fce7d8f1..827e5764 100644
233--- a/inference-engine/include/gpu/gpu_ocl_wrapper.hpp 149--- a/inference-engine/include/gpu/gpu_ocl_wrapper.hpp
@@ -239,7 +155,7 @@ index fce7d8f1..827e5764 100644
239-#include <CL/cl2.hpp> 155-#include <CL/cl2.hpp>
240+#include <cl2.hpp> 156+#include <cl2.hpp>
241diff --git a/inference-engine/samples/CMakeLists.txt b/inference-engine/samples/CMakeLists.txt 157diff --git a/inference-engine/samples/CMakeLists.txt b/inference-engine/samples/CMakeLists.txt
242index f355e7b9..351fb9cd 100644 158index f355e7b9..d24c7c78 100644
243--- a/inference-engine/samples/CMakeLists.txt 159--- a/inference-engine/samples/CMakeLists.txt
244+++ b/inference-engine/samples/CMakeLists.txt 160+++ b/inference-engine/samples/CMakeLists.txt
245@@ -24,7 +24,7 @@ endif() 161@@ -24,7 +24,7 @@ endif()
@@ -262,6 +178,25 @@ index f355e7b9..351fb9cd 100644
262 if (CMAKE_CXX_COMPILER_ID STREQUAL GNU) 178 if (CMAKE_CXX_COMPILER_ID STREQUAL GNU)
263 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall") 179 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall")
264 endif() 180 endif()
181@@ -203,6 +199,8 @@ macro(ie_add_sample)
182 if(COMMAND add_cpplint_target AND NOT IE_SAMPLE_EXCLUDE_CPPLINT)
183 add_cpplint_target(${IE_SAMPLE_NAME}_cpplint FOR_TARGETS ${IE_SAMPLE_NAME})
184 endif()
185+
186+ install(TARGETS ${IE_SAMPLE_NAME} DESTINATION bin)
187 endmacro()
188
189 # collect all samples subdirectories
190diff --git a/inference-engine/samples/common/format_reader/CMakeLists.txt b/inference-engine/samples/common/format_reader/CMakeLists.txt
191index 6d935135..fe12eeb7 100644
192--- a/inference-engine/samples/common/format_reader/CMakeLists.txt
193+++ b/inference-engine/samples/common/format_reader/CMakeLists.txt
194@@ -40,3 +40,5 @@ target_include_directories(${TARGET_NAME} PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}"
195 "${CMAKE_CURRENT_SOURCE_DIR}/..")
196
197 set_target_properties(${TARGET_NAME} PROPERTIES COMPILE_PDB_NAME ${TARGET_NAME})
198+
199+install(TARGETS ${TARGET_NAME} DESTINATION ${CMAKE_INSTALL_LIBDIR})
265diff --git a/inference-engine/src/cldnn_engine/CMakeLists.txt b/inference-engine/src/cldnn_engine/CMakeLists.txt 200diff --git a/inference-engine/src/cldnn_engine/CMakeLists.txt b/inference-engine/src/cldnn_engine/CMakeLists.txt
266index 43344e7f..50beda23 100644 201index 43344e7f..50beda23 100644
267--- a/inference-engine/src/cldnn_engine/CMakeLists.txt 202--- a/inference-engine/src/cldnn_engine/CMakeLists.txt