diff options
Diffstat (limited to 'dynamic-layers/openembedded-layer/recipes-support/opencv/openvino-inference-engine_2021.2.bb')
-rw-r--r-- | dynamic-layers/openembedded-layer/recipes-support/opencv/openvino-inference-engine_2021.2.bb | 123 |
1 files changed, 123 insertions, 0 deletions
diff --git a/dynamic-layers/openembedded-layer/recipes-support/opencv/openvino-inference-engine_2021.2.bb b/dynamic-layers/openembedded-layer/recipes-support/opencv/openvino-inference-engine_2021.2.bb new file mode 100644 index 00000000..568072d7 --- /dev/null +++ b/dynamic-layers/openembedded-layer/recipes-support/opencv/openvino-inference-engine_2021.2.bb | |||
@@ -0,0 +1,123 @@ | |||
1 | SUMMARY = "OpenVINO(TM) Toolkit - Deep Learning Deployment Toolkit" | ||
2 | HOMEPAGE = "https://github.com/opencv/dldt" | ||
3 | DESCRIPTION = "This toolkit allows developers to deploy pre-trained \ | ||
4 | deep learning models through a high-level C++ Inference Engine API \ | ||
5 | integrated with application logic." | ||
6 | |||
7 | SRC_URI = "git://github.com/openvinotoolkit/openvino.git;protocol=git;branch=releases/2021/2;lfs=0 \ | ||
8 | https://download.01.org/opencv/master/openvinotoolkit/thirdparty/unified/VPU/usb-ma2x8x/firmware_usb-ma2x8x_1522.zip;name=usb_ma2x8x \ | ||
9 | https://download.01.org/opencv/master/openvinotoolkit/thirdparty/unified/VPU/pcie-ma2x8x/firmware_pcie-ma2x8x_1522.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 | file://0001-inference-engine-use-system-installed-packages.patch \ | ||
12 | file://0002-cldNN-disable-Werror.patch \ | ||
13 | file://0003-inference-engine-installation-fixes.patch \ | ||
14 | file://0005-cldnn-fix-inclusion-of-headers.patch \ | ||
15 | file://0001-dont-install-licenses-and-version-file.patch \ | ||
16 | " | ||
17 | |||
18 | SRCREV = "4795391b73381660b69b4cd3986c7a0bf902e868" | ||
19 | SRCREV_mkl = "5ef085d5af65e8966e03cdfcbaa65761d61a5c9a" | ||
20 | |||
21 | SRC_URI[usb_ma2x8x.sha256sum] = "95a93144f0bbfe6e35d3830e93e6b63e1e109f849a6a7c307cae9030e3a662aa" | ||
22 | SRC_URI[pcie_ma2x8x.sha256sum] = "6d061d21d90f1919ef375138066ba7a20ceb663901d2729d9cb1b639169df5da" | ||
23 | |||
24 | LICENSE = "Apache-2.0 & ISSL & MIT" | ||
25 | LIC_FILES_CHKSUM = "file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327 \ | ||
26 | file://inference-engine/thirdparty/mkl-dnn/LICENSE;md5=afa44a3d001cc203032135324f9636b7 \ | ||
27 | file://inference-engine/thirdparty/mkl-dnn/src/cpu/xbyak/COPYRIGHT;md5=03532861dad9003cc2c17f14fc7a4efa \ | ||
28 | file://inference-engine/thirdparty/clDNN/common/khronos_ocl_clhpp/LICENSE.txt;md5=88b295a48d2b3244ba65d3c055472c8a \ | ||
29 | " | ||
30 | LICENSE_${PN}-vpu-firmware = "ISSL" | ||
31 | |||
32 | inherit cmake python3native | ||
33 | |||
34 | S = "${WORKDIR}/git" | ||
35 | |||
36 | EXTRA_OECMAKE += " \ | ||
37 | -DENABLE_OPENCV=0 \ | ||
38 | -DENABLE_PLUGIN_RPATH=0 \ | ||
39 | -DENABLE_GNA=0 \ | ||
40 | -DPYTHON_EXECUTABLE=${PYTHON} \ | ||
41 | -DCMAKE_BUILD_TYPE=RelWithDebInfo \ | ||
42 | -DTHREADING=TBB -DTBB_DIR=${STAGING_LIBDIR} \ | ||
43 | -DENABLE_SAMPLES=1 \ | ||
44 | -DIE_CPACK_IE_DIR=${prefix} \ | ||
45 | -DNGRAPH_UNIT_TEST_ENABLE=FALSE \ | ||
46 | -DNGRAPH_TEST_UTIL_ENABLE=FALSE \ | ||
47 | -DNGRAPH_ONNX_IMPORT_ENABLE=OFF \ | ||
48 | -DNGRAPH_JSON_ENABLE=FALSE \ | ||
49 | -DTREAT_WARNING_AS_ERROR=FALSE \ | ||
50 | -DENABLE_SPEECH_DEMO=FALSE \ | ||
51 | -DENABLE_DATA=FALSE \ | ||
52 | -DUSE_SYSTEM_PUGIXML=TRUE \ | ||
53 | " | ||
54 | |||
55 | DEPENDS += "libusb1 \ | ||
56 | ade \ | ||
57 | opencv \ | ||
58 | pugixml \ | ||
59 | protobuf-native \ | ||
60 | tbb \ | ||
61 | onednn \ | ||
62 | " | ||
63 | |||
64 | COMPATIBLE_HOST = '(x86_64).*-linux' | ||
65 | COMPATIBLE_HOST_libc-musl = "null" | ||
66 | |||
67 | PACKAGECONFIG ?= "vpu" | ||
68 | PACKAGECONFIG[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" | ||
69 | PACKAGECONFIG[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" | ||
70 | PACKAGECONFIG[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" | ||
71 | PACKAGECONFIG[verbose] = "-DVERBOSE_BUILD=1,-DVERBOSE_BUILD=0" | ||
72 | |||
73 | do_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 | ||
99 | SSTATE_SCAN_FILES_append = " *.cmake" | ||
100 | |||
101 | FILES_${PN}-dev = "${includedir} \ | ||
102 | ${libdir}/cmake \ | ||
103 | " | ||
104 | |||
105 | FILES_${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 | ||
113 | PACKAGES =+ "${PN}-samples ${PN}-vpu-firmware" | ||
114 | |||
115 | FILES_${PN}-samples = "${datadir}/inference_engine \ | ||
116 | ${bindir} \ | ||
117 | " | ||
118 | FILES_${PN}-vpu-firmware += "${libdir}/*.mvcmd" | ||
119 | |||
120 | # Package for inference engine python API | ||
121 | PACKAGES =+ "${PN}-${PYTHON_PN}" | ||
122 | |||
123 | FILES_${PN}-${PYTHON_PN} = "${PYTHON_SITEPACKAGES_DIR}/openvino" | ||