summaryrefslogtreecommitdiffstats
path: root/dynamic-layers/openembedded-layer/recipes-support/opencv/openvino-inference-engine_2021.4.1.bb
diff options
context:
space:
mode:
Diffstat (limited to 'dynamic-layers/openembedded-layer/recipes-support/opencv/openvino-inference-engine_2021.4.1.bb')
-rw-r--r--dynamic-layers/openembedded-layer/recipes-support/opencv/openvino-inference-engine_2021.4.1.bb130
1 files changed, 130 insertions, 0 deletions
diff --git a/dynamic-layers/openembedded-layer/recipes-support/opencv/openvino-inference-engine_2021.4.1.bb b/dynamic-layers/openembedded-layer/recipes-support/opencv/openvino-inference-engine_2021.4.1.bb
new file mode 100644
index 00000000..0d6b16fb
--- /dev/null
+++ b/dynamic-layers/openembedded-layer/recipes-support/opencv/openvino-inference-engine_2021.4.1.bb
@@ -0,0 +1,130 @@
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/4;lfs=0 \
8 https://download.01.org/opencv/master/openvinotoolkit/thirdparty/unified/VPU/usb-ma2x8x/firmware_usb-ma2x8x_1736.zip;name=usb_ma2x8x \
9 https://download.01.org/opencv/master/openvinotoolkit/thirdparty/unified/VPU/pcie-ma2x8x/firmware_pcie-ma2x8x_1736.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 git://github.com/pybind/pybind11.git;protocol=https;destsuffix=git/ngraph/python/pybind11;name=pybind11 \
13 file://0001-inference-engine-use-system-installed-packages.patch \
14 file://0002-Disable-Werror.patch \
15 file://0003-inference-engine-installation-fixes.patch \
16 file://0001-dont-install-licenses-and-version-file.patch \
17 "
18
19SRCREV = "c2bfbf29fbc44f9a3c8403d77da5be7e45cbbb4f"
20SRCREV_mkl = "e0381c369fc3bed487b0dcfef7e9fcb2e0aea575"
21SRCREV_xbyak = "8d1e41b650890080fb77548372b6236bbd4079f9"
22SRCREV_pybind11 = "3b1dbebabc801c9cf6f0953a4c20b904d444f879"
23
24SRC_URI[usb_ma2x8x.sha256sum] = "28ed086ac52b964d9a1f5a54c017237d2d03ea39013e7910df678b176b9ce0c3"
25SRC_URI[pcie_ma2x8x.sha256sum] = "c2268e700eb597329376cbe830eeb6504203d765a1bde4da917242ca535a7ab3"
26
27LICENSE = "Apache-2.0 & ISSL & MIT"
28LIC_FILES_CHKSUM = "file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327 \
29 file://inference-engine/thirdparty/mkl-dnn/LICENSE;md5=c441291ac5f15bdc6b09b4cc02ece35b \
30 file://thirdparty/xbyak/COPYRIGHT;md5=03532861dad9003cc2c17f14fc7a4efa \
31 file://inference-engine/thirdparty/clDNN/common/include/OpenCL_CLHPP_License.txt;md5=3b83ef96387f14655fc854ddc3c6bd57 \
32"
33LICENSE:${PN}-vpu-firmware = "ISSL"
34
35inherit cmake python3native
36
37S = "${WORKDIR}/git"
38
39EXTRA_OECMAKE += " \
40 -DENABLE_OPENCV=0 \
41 -DENABLE_PLUGIN_RPATH=0 \
42 -DENABLE_GNA=0 \
43 -DPYTHON_EXECUTABLE=${PYTHON} \
44 -DCMAKE_BUILD_TYPE=RelWithDebInfo \
45 -DTHREADING=TBB -DTBB_DIR=${STAGING_LIBDIR}/cmake/TBB \
46 -DENABLE_SAMPLES=1 \
47 -DIE_CPACK_IE_DIR=${prefix} \
48 -DNGRAPH_UNIT_TEST_ENABLE=FALSE \
49 -DNGRAPH_TEST_UTIL_ENABLE=FALSE \
50 -DNGRAPH_ONNX_IMPORT_ENABLE=OFF \
51 -DNGRAPH_JSON_ENABLE=FALSE \
52 -DTREAT_WARNING_AS_ERROR=FALSE \
53 -DENABLE_SPEECH_DEMO=FALSE \
54 -DENABLE_DATA=FALSE \
55 -DUSE_SYSTEM_PUGIXML=TRUE \
56 "
57
58DEPENDS += "libusb1 \
59 ade \
60 opencv \
61 pugixml \
62 protobuf-native \
63 tbb \
64 zlib \
65 "
66
67COMPATIBLE_HOST = '(x86_64).*-linux'
68COMPATIBLE_HOST:libc-musl = "null"
69
70#Disable opencl temporarily. intel-compute-runtime depends on
71#intel-graphics-compiler and vc-intrinsics and these two recipes fail to
72#compile with LLVM13. Enable it after upstream has fixed it.
73#PACKAGECONFIG ?= "vpu opencl"
74PACKAGECONFIG ?= "vpu"
75PACKAGECONFIG[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"
76PACKAGECONFIG[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"
77PACKAGECONFIG[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"
78PACKAGECONFIG[verbose] = "-DVERBOSE_BUILD=1,-DVERBOSE_BUILD=0"
79
80do_install:append() {
81 if ${@bb.utils.contains('PACKAGECONFIG', 'vpu', 'true', 'false', d)}; then
82 install -m0644 ${WORKDIR}/mvnc/usb-ma2x8x.mvcmd ${D}${libdir}/
83 install -m0644 ${WORKDIR}/mvnc/pcie-ma2x8x.mvcmd ${D}${libdir}/
84 fi
85
86 if ${@bb.utils.contains('PACKAGECONFIG', 'python3', 'true', 'false', d)}; then
87 install -d ${D}${datadir}/inference_engine
88 mv ${D}/usr/samples/python ${D}${datadir}/inference_engine/
89
90 install -d ${D}${PYTHON_SITEPACKAGES_DIR}
91 mv ${D}${prefix}/python/${PYTHON_DIR}/openvino ${D}${PYTHON_SITEPACKAGES_DIR}/
92 mv ${D}${prefix}/deployment_tools/tools/benchmark_tool ${D}${PYTHON_SITEPACKAGES_DIR}/openvino/
93 mv ${D}${prefix}/deployment_tools/tools/cross_check_tool ${D}${PYTHON_SITEPACKAGES_DIR}/openvino/
94
95 rm -rf ${D}${prefix}/python
96 fi
97
98 rm -rf ${D}${prefix}/deployment_tools
99
100 # Remove the samples source directory. We install the built samples.
101 rm -rf ${D}/usr/samples
102}
103
104# Otherwise e.g. ros-openvino-toolkit-dynamic-vino-sample when using dldt-inference-engine uses dldt-inference-engine WORKDIR
105# instead of RSS
106SSTATE_SCAN_FILES:append = " *.cmake"
107
108FILES:${PN}-dev = "${includedir} \
109 ${libdir}/cmake \
110 "
111
112FILES:${PN} += "${libdir}/lib*${SOLIBSDEV} \
113 ${datadir}/openvino \
114 ${libdir}/custom_kernels \
115 ${libdir}/plugins.xml \
116 ${libdir}/cache.json \
117 "
118
119# Move inference engine samples into a separate package
120PACKAGES =+ "${PN}-samples ${PN}-vpu-firmware"
121
122FILES:${PN}-samples = "${datadir}/inference_engine \
123 ${bindir} \
124 "
125FILES:${PN}-vpu-firmware += "${libdir}/*.mvcmd"
126
127# Package for inference engine python API
128PACKAGES =+ "${PN}-${PYTHON_PN}"
129
130FILES:${PN}-${PYTHON_PN} = "${PYTHON_SITEPACKAGES_DIR}/openvino"