summaryrefslogtreecommitdiffstats
path: root/dynamic-layers/openembedded-layer/recipes-support/opencv/openvino-inference-engine_2021.3.bb
diff options
context:
space:
mode:
Diffstat (limited to 'dynamic-layers/openembedded-layer/recipes-support/opencv/openvino-inference-engine_2021.3.bb')
-rw-r--r--dynamic-layers/openembedded-layer/recipes-support/opencv/openvino-inference-engine_2021.3.bb123
1 files changed, 123 insertions, 0 deletions
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 @@
1SUMMARY = "OpenVINO(TM) Toolkit - Deep Learning Deployment Toolkit"
2HOMEPAGE = "https://github.com/opencv/dldt"
3DESCRIPTION = "This toolkit allows developers to deploy pre-trained \
4deep learning models through a high-level C++ Inference Engine API \
5integrated with application logic."
6
7SRC_URI = "git://github.com/openvinotoolkit/openvino.git;protocol=git;branch=releases/2021/3;lfs=0 \
8 https://download.01.org/opencv/master/openvinotoolkit/thirdparty/unified/VPU/usb-ma2x8x/firmware_usb-ma2x8x_1642.zip;name=usb_ma2x8x \
9 https://download.01.org/opencv/master/openvinotoolkit/thirdparty/unified/VPU/pcie-ma2x8x/firmware_pcie-ma2x8x_1642.zip;name=pcie_ma2x8x \
10 git://github.com/openvinotoolkit/oneDNN.git;protocol=https;destsuffix=git/inference-engine/thirdparty/mkl-dnn;name=mkl;nobranch=1 \
11 git://github.com/herumi/xbyak.git;protocol=https;destsuffix=git/thirdparty/xbyak;name=xbyak \
12 file://0001-inference-engine-use-system-installed-packages.patch \
13 file://0002-cldNN-disable-Werror.patch \
14 file://0003-inference-engine-installation-fixes.patch \
15 file://0001-dont-install-licenses-and-version-file.patch \
16 "
17
18SRCREV = "18e83a217702c650280c6abfc43f3285a3aadb61"
19SRCREV_mkl = "d35c3c11f9ff0f5090f9afe16af122cda501134c"
20SRCREV_xbyak = "8d1e41b650890080fb77548372b6236bbd4079f9"
21
22SRC_URI[usb_ma2x8x.sha256sum] = "d0f6aaaf71a595963e6013ef59045e20b07324f1a47deaa3f906419d39b2bd5a"
23SRC_URI[pcie_ma2x8x.sha256sum] = "18d3cd10cf6cc36ff58001812d3d215c0bbb2de09a8832128592401c8f959358"
24
25LICENSE = "Apache-2.0 & ISSL & MIT"
26LIC_FILES_CHKSUM = "file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327 \
27 file://inference-engine/thirdparty/mkl-dnn/LICENSE;md5=c441291ac5f15bdc6b09b4cc02ece35b \
28 file://thirdparty/xbyak/COPYRIGHT;md5=03532861dad9003cc2c17f14fc7a4efa \
29 file://inference-engine/thirdparty/clDNN/common/include/OpenCL_CLHPP_License.txt;md5=3b83ef96387f14655fc854ddc3c6bd57 \
30"
31LICENSE_${PN}-vpu-firmware = "ISSL"
32
33inherit cmake python3native
34
35S = "${WORKDIR}/git"
36
37EXTRA_OECMAKE += " \
38 -DENABLE_OPENCV=0 \
39 -DENABLE_PLUGIN_RPATH=0 \
40 -DENABLE_GNA=0 \
41 -DPYTHON_EXECUTABLE=${PYTHON} \
42 -DCMAKE_BUILD_TYPE=RelWithDebInfo \
43 -DTHREADING=TBB -DTBB_DIR=${STAGING_LIBDIR}/cmake/TBB \
44 -DENABLE_SAMPLES=1 \
45 -DIE_CPACK_IE_DIR=${prefix} \
46 -DNGRAPH_UNIT_TEST_ENABLE=FALSE \
47 -DNGRAPH_TEST_UTIL_ENABLE=FALSE \
48 -DNGRAPH_ONNX_IMPORT_ENABLE=OFF \
49 -DNGRAPH_JSON_ENABLE=FALSE \
50 -DTREAT_WARNING_AS_ERROR=FALSE \
51 -DENABLE_SPEECH_DEMO=FALSE \
52 -DENABLE_DATA=FALSE \
53 -DUSE_SYSTEM_PUGIXML=TRUE \
54 "
55
56DEPENDS += "libusb1 \
57 ade \
58 opencv \
59 pugixml \
60 protobuf-native \
61 tbb \
62 "
63
64COMPATIBLE_HOST = '(x86_64).*-linux'
65COMPATIBLE_HOST_libc-musl = "null"
66
67PACKAGECONFIG ?= "vpu opencl"
68PACKAGECONFIG[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"
69PACKAGECONFIG[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"
70PACKAGECONFIG[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"
71PACKAGECONFIG[verbose] = "-DVERBOSE_BUILD=1,-DVERBOSE_BUILD=0"
72
73do_install_append() {
74 if ${@bb.utils.contains('PACKAGECONFIG', 'vpu', 'true', 'false', d)}; then
75 install -m0644 ${WORKDIR}/mvnc/usb-ma2x8x.mvcmd ${D}${libdir}/
76 install -m0644 ${WORKDIR}/mvnc/pcie-ma2x8x.mvcmd ${D}${libdir}/
77 fi
78
79 if ${@bb.utils.contains('PACKAGECONFIG', 'python3', 'true', 'false', d)}; then
80 install -d ${D}${datadir}/inference_engine
81 mv ${D}/usr/samples/python ${D}${datadir}/inference_engine/
82
83 install -d ${D}${PYTHON_SITEPACKAGES_DIR}
84 mv ${D}${prefix}/python/${PYTHON_DIR}/openvino ${D}${PYTHON_SITEPACKAGES_DIR}/
85 mv ${D}${prefix}/deployment_tools/tools/benchmark_tool ${D}${PYTHON_SITEPACKAGES_DIR}/openvino/
86 mv ${D}${prefix}/deployment_tools/tools/cross_check_tool ${D}${PYTHON_SITEPACKAGES_DIR}/openvino/
87
88 rm -rf ${D}${prefix}/python
89 fi
90
91 rm -rf ${D}${prefix}/deployment_tools
92
93 # Remove the samples source directory. We install the built samples.
94 rm -rf ${D}/usr/samples
95}
96
97# Otherwise e.g. ros-openvino-toolkit-dynamic-vino-sample when using dldt-inference-engine uses dldt-inference-engine WORKDIR
98# instead of RSS
99SSTATE_SCAN_FILES_append = " *.cmake"
100
101FILES_${PN}-dev = "${includedir} \
102 ${libdir}/cmake \
103 "
104
105FILES_${PN} += "${libdir}/lib*${SOLIBSDEV} \
106 ${datadir}/openvino \
107 ${libdir}/custom_kernels \
108 ${libdir}/plugins.xml \
109 ${libdir}/cache.json \
110 "
111
112# Move inference engine samples into a separate package
113PACKAGES =+ "${PN}-samples ${PN}-vpu-firmware"
114
115FILES_${PN}-samples = "${datadir}/inference_engine \
116 ${bindir} \
117 "
118FILES_${PN}-vpu-firmware += "${libdir}/*.mvcmd"
119
120# Package for inference engine python API
121PACKAGES =+ "${PN}-${PYTHON_PN}"
122
123FILES_${PN}-${PYTHON_PN} = "${PYTHON_SITEPACKAGES_DIR}/openvino"