diff options
Diffstat (limited to 'dynamic-layers/openembedded-layer/recipes-support/opencv/dldt-inference-engine_2020r1.bb')
-rw-r--r-- | dynamic-layers/openembedded-layer/recipes-support/opencv/dldt-inference-engine_2020r1.bb | 116 |
1 files changed, 116 insertions, 0 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 new file mode 100644 index 00000000..d13752b0 --- /dev/null +++ b/dynamic-layers/openembedded-layer/recipes-support/opencv/dldt-inference-engine_2020r1.bb | |||
@@ -0,0 +1,116 @@ | |||
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/opencv/dldt.git;protocol=git;branch=2020 \ | ||
8 | https://download.01.org/opencv/2020/openvinotoolkit/2020.1/inference_engine/firmware_usb-ma2450_942_R10.15.zip;name=ma2450 \ | ||
9 | https://download.01.org/opencv/2020/openvinotoolkit/2020.1/inference_engine/firmware_pcie-ma248x_942_R10.15.zip;name=ma248x \ | ||
10 | https://download.01.org/opencv/2020/openvinotoolkit/2020.1/inference_engine/firmware_usb-ma2x8x_942_R10.15.zip;name=ma2x8x \ | ||
11 | file://0001-Installation-and-build-fixes.patch \ | ||
12 | file://run-ptest \ | ||
13 | " | ||
14 | |||
15 | SRCREV = "b2140c083a068a63591e8c2e9b5f6b240790519d" | ||
16 | |||
17 | SRC_URI[ma2450.sha256sum] = "32747515f0a387a8f878a88670aefe2788132fa24828b3775df791144627d9f6" | ||
18 | SRC_URI[ma248x.sha256sum] = "f32cd6396d0e6f0e4b24c8ee15e9f0b1b493ebbfc0f03371ca732f75b763d4a2" | ||
19 | SRC_URI[ma2x8x.sha256sum] = "c00f77692bfdccf92f32233b3dd1189f51dee73c15d79f35a612c7ba841d9c8d" | ||
20 | |||
21 | LICENSE = "Apache-2.0 & ISSL & MIT" | ||
22 | LIC_FILES_CHKSUM = "file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327 \ | ||
23 | file://inference-engine/thirdparty/mkl-dnn/LICENSE;md5=afa44a3d001cc203032135324f9636b7 \ | ||
24 | file://inference-engine/tests/libs/gtest/googlemock/LICENSE;md5=cbbd27594afd089daa160d3a16dd515a \ | ||
25 | file://inference-engine/thirdparty/mkl-dnn/src/cpu/xbyak/COPYRIGHT;md5=3b9bf048d063d54cdb28964db558bcc7 \ | ||
26 | file://inference-engine/thirdparty/clDNN/common/khronos_ocl_clhpp/LICENSE.txt;md5=88b295a48d2b3244ba65d3c055472c8a \ | ||
27 | " | ||
28 | LICENSE_${PN}-vpu-firmware = "ISSL" | ||
29 | |||
30 | inherit cmake ptest python3native | ||
31 | |||
32 | S = "${WORKDIR}/git" | ||
33 | |||
34 | EXTRA_OECMAKE += " \ | ||
35 | -DENABLE_OPENCV=0 \ | ||
36 | -DENABLE_PLUGIN_RPATH=0 \ | ||
37 | -DENABLE_GNA=0 \ | ||
38 | -DPYTHON_EXECUTABLE=${PYTHON} \ | ||
39 | -DCMAKE_BUILD_TYPE=DebugWithRelInfo \ | ||
40 | -DTHREADING=TBB -DTBB_DIR=${STAGING_LIBDIR} \ | ||
41 | -DENABLE_TESTS="${@bb.utils.contains('PTEST_ENABLED', '1', '1', '0', d)}" \ | ||
42 | -DBUILD_GMOCK=1 \ | ||
43 | -DBUILD_GTEST=0 \ | ||
44 | -DINSTALL_GMOCK=0 \ | ||
45 | -DINSTALL_GTEST=0 \ | ||
46 | -DENABLE_SAMPLES=0 \ | ||
47 | -DENABLE_NGRAPH=ON \ | ||
48 | -DENABLE_MKL_DNN=ON \ | ||
49 | -DIE_CPACK_IE_DIR=${prefix} \ | ||
50 | " | ||
51 | |||
52 | DEPENDS += "libusb1 \ | ||
53 | ade \ | ||
54 | opencv \ | ||
55 | pugixml \ | ||
56 | ngraph \ | ||
57 | tbb \ | ||
58 | ${@bb.utils.contains('PTEST_ENABLED', '1', 'gflags', '', d)} \ | ||
59 | " | ||
60 | |||
61 | COMPATIBLE_HOST = '(x86_64).*-linux' | ||
62 | COMPATIBLE_HOST_libc-musl = "null" | ||
63 | |||
64 | PACKAGECONFIG ?= "vpu" | ||
65 | 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, opencl-icd-loader libva, intel-compute-runtime" | ||
66 | PACKAGECONFIG[python3] = "-DENABLE_PYTHON=ON -DPYTHON_LIBRARY=${PYTHON_LIBRARY} -DPYTHON_INCLUDE_DIR=${PYTHON_INCLUDE_DIR}, -DENABLE_PYTHON=OFF, python3-cython-native, python3" | ||
67 | PACKAGECONFIG[vpu] = "-DENABLE_VPU=ON -DVPU_FIRMWARE_USB-MA2450_FILE=../mvnc/usb-ma2450.mvcmd -DVPU_FIRMWARE_USB-MA2X8X_FILE=../mvnc/usb-ma2x8x.mvcmd -DVPU_FIRMWARE_PCIE-MA248X_FILE=../mvnc/pcie-ma248x.mvcmd,-DENABLE_VPU=OFF,,${PN}-vpu-firmware" | ||
68 | PACKAGECONFIG[verbose] = "-DVERBOSE_BUILD=1,-DVERBOSE_BUILD=0" | ||
69 | |||
70 | do_install_append() { | ||
71 | if ${@bb.utils.contains('PACKAGECONFIG', 'vpu', 'true', 'false', d)}; then | ||
72 | install -m0644 ${WORKDIR}/mvnc/usb-ma2450.mvcmd ${D}${libdir}/ | ||
73 | install -m0644 ${WORKDIR}/mvnc/usb-ma2x8x.mvcmd ${D}${libdir}/ | ||
74 | install -m0644 ${WORKDIR}/mvnc/pcie-ma248x.mvcmd ${D}${libdir}/ | ||
75 | fi | ||
76 | |||
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}/ | ||
79 | fi | ||
80 | } | ||
81 | |||
82 | do_install_ptest_base_prepend() { | ||
83 | # While not a Makefile based project that strictly falls into the category of | ||
84 | # what ptest helps with, adding the unit tests here as ptest would help. | ||
85 | # Create a dummy Makefile so installation doesn't fail. | ||
86 | touch ${WORKDIR}/Makefile | ||
87 | mv ${D}${bindir}/InferenceEngineUnitTests ${D}${PTEST_PATH}/ | ||
88 | mv ${D}${libdir}/libmock_engine.so ${D}${PTEST_PATH}/ | ||
89 | } | ||
90 | |||
91 | # Otherwise e.g. ros-openvino-toolkit-dynamic-vino-sample when using dldt-inference-engine uses dldt-inference-engine WORKDIR | ||
92 | # instead of RSS | ||
93 | SSTATE_SCAN_FILES_append = " *.cmake" | ||
94 | |||
95 | FILES_${PN}-dev = "${includedir} \ | ||
96 | ${libdir}/cmake \ | ||
97 | " | ||
98 | |||
99 | FILES_${PN} += "${libdir}/lib*${SOLIBSDEV} \ | ||
100 | ${datadir}/openvino \ | ||
101 | ${libdir}/cldnn_global_custom_kernels \ | ||
102 | ${libdir}/custom_kernels \ | ||
103 | ${libdir}/plugins.xml \ | ||
104 | ${libdir}/cache.json \ | ||
105 | " | ||
106 | |||
107 | # Move inference engine samples into a separate package | ||
108 | PACKAGES =+ "${PN}-samples ${PN}-vpu-firmware" | ||
109 | |||
110 | FILES_${PN}-samples = "${datadir}/inference_engine" | ||
111 | FILES_${PN}-vpu-firmware += "${libdir}/*.mvcmd" | ||
112 | |||
113 | # Package for inference engine python API | ||
114 | PACKAGES =+ "${PN}-${PYTHON_PN}" | ||
115 | |||
116 | FILES_${PN}-${PYTHON_PN} = "${PYTHON_SITEPACKAGES_DIR}/openvino" | ||