diff options
Diffstat (limited to 'dynamic-layers/openembedded-layer/recipes-support/opencv/openvino-inference-engine_2023.2.0.bb')
-rw-r--r-- | dynamic-layers/openembedded-layer/recipes-support/opencv/openvino-inference-engine_2023.2.0.bb | 133 |
1 files changed, 133 insertions, 0 deletions
diff --git a/dynamic-layers/openembedded-layer/recipes-support/opencv/openvino-inference-engine_2023.2.0.bb b/dynamic-layers/openembedded-layer/recipes-support/opencv/openvino-inference-engine_2023.2.0.bb new file mode 100644 index 00000000..7df511f0 --- /dev/null +++ b/dynamic-layers/openembedded-layer/recipes-support/opencv/openvino-inference-engine_2023.2.0.bb | |||
@@ -0,0 +1,133 @@ | |||
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=https;name=openvino;branch=releases/2023/2;lfs=0 \ | ||
8 | git://github.com/openvinotoolkit/oneDNN.git;protocol=https;destsuffix=git/src/plugins/intel_cpu/thirdparty/onednn;name=mkl;nobranch=1 \ | ||
9 | git://github.com/oneapi-src/oneDNN.git;protocol=https;destsuffix=git/src/plugins/intel_gpu/thirdparty/onednn_gpu;name=onednn;nobranch=1 \ | ||
10 | git://github.com/herumi/xbyak.git;protocol=https;destsuffix=git/thirdparty/xbyak;name=xbyak;branch=master \ | ||
11 | git://github.com/nlohmann/json.git;protocol=https;destsuffix=git/thirdparty/json/nlohmann_json;name=json;branch=develop \ | ||
12 | git://github.com/opencv/ade.git;protocol=https;destsuffix=git/thirdparty/ade;name=ade;nobranch=1 \ | ||
13 | git://github.com/protocolbuffers/protobuf.git;protocol=https;destsuffix=git/thirdparty/protobuf/protobuf;name=protobuf;branch=3.20.x \ | ||
14 | git://github.com/gflags/gflags.git;protocol=https;destsuffix=git/thirdparty/gflags/gflags;name=gflags;nobranch=1 \ | ||
15 | git://github.com/madler/zlib.git;protocol=https;destsuffix=git/thirdparty/zlib/zlib;name=zlib;nobranch=1 \ | ||
16 | file://0001-cmake-yocto-specific-tweaks-to-the-build-process.patch \ | ||
17 | file://0002-Change-the-working-directory-to-source-to-workaround.patch \ | ||
18 | file://0003-cmake-Fix-overloaded-virtual-error.patch \ | ||
19 | file://0004-protobuf-allow-target-protoc-to-be-built.patch \ | ||
20 | " | ||
21 | |||
22 | SRCREV_openvino = "7e18bd074a2487a7a98adcd313abd09c58d88072" | ||
23 | SRCREV_mkl = "2ead5d4fe5993a797d9a7a4b8b5557b96f6ec90e" | ||
24 | SRCREV_onednn = "284ad4574939fa784e4ddaa1f4aa577b8eb7a017" | ||
25 | SRCREV_xbyak = "740dff2e866f3ae1a70dd42d6e8836847ed95cc2" | ||
26 | SRCREV_json = "bc889afb4c5bf1c0d8ee29ef35eaaf4c8bef8a5d" | ||
27 | SRCREV_ade = "0e8a2ccdd34f29dba55894f5f3c5179809888b9e" | ||
28 | SRCREV_protobuf = "fe271ab76f2ad2b2b28c10443865d2af21e27e0e" | ||
29 | SRCREV_gflags = "e171aa2d15ed9eb17054558e0b3a6a413bb01067" | ||
30 | SRCREV_zlib = "04f42ceca40f73e2978b50e93806c2a18c1281fc" | ||
31 | SRCREV_FORMAT = "openvino_mkl_onednn_xbyak_json_ade_protobuf_gflags_zlib" | ||
32 | |||
33 | LICENSE = "Apache-2.0 & MIT & BSD-3-Clause & Zlib" | ||
34 | LIC_FILES_CHKSUM = "file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327 \ | ||
35 | file://thirdparty/xbyak/COPYRIGHT;md5=3c98edfaa50a86eeaef4c6109e803f16 \ | ||
36 | file://thirdparty/cnpy/LICENSE;md5=689f10b06d1ca2d4b1057e67b16cd580 \ | ||
37 | file://thirdparty/json/nlohmann_json/LICENSE.MIT;md5=f969127d7b7ed0a8a63c2bbeae002588 \ | ||
38 | file://thirdparty/ade/LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57 \ | ||
39 | file://thirdparty/gflags/gflags/COPYING.txt;md5=c80d1a3b623f72bb85a4c75b556551df \ | ||
40 | file://thirdparty/zlib/zlib/LICENSE;md5=b51a40671bc46e961c0498897742c0b8 \ | ||
41 | file://src/plugins/intel_cpu/thirdparty/onednn/LICENSE;md5=3b64000f6e7d52516017622a37a94ce9 \ | ||
42 | file://src/plugins/intel_gpu/thirdparty/onednn_gpu/LICENSE;md5=3b64000f6e7d52516017622a37a94ce9 \ | ||
43 | " | ||
44 | |||
45 | inherit cmake python3native pkgconfig qemu | ||
46 | |||
47 | S = "${WORKDIR}/git" | ||
48 | EXTRA_OECMAKE += " \ | ||
49 | -DCMAKE_CROSSCOMPILING_EMULATOR=${WORKDIR}/qemuwrapper \ | ||
50 | -DENABLE_OPENCV=OFF \ | ||
51 | -DENABLE_INTEL_GNA=OFF \ | ||
52 | -DENABLE_SYSTEM_TBB=ON \ | ||
53 | -DPYTHON_EXECUTABLE=${PYTHON} \ | ||
54 | -DCMAKE_BUILD_TYPE=RelWithDebInfo \ | ||
55 | -DTHREADING=TBB -DTBB_DIR="${STAGING_LIBDIR}/cmake/TBB" \ | ||
56 | -DTREAT_WARNING_AS_ERROR=FALSE \ | ||
57 | -DENABLE_DATA=FALSE \ | ||
58 | -DENABLE_SYSTEM_PUGIXML=TRUE \ | ||
59 | -DENABLE_OV_ONNX_FRONTEND=FALSE \ | ||
60 | -DUSE_BUILD_TYPE_SUBFOLDER=OFF \ | ||
61 | -DENABLE_FUZZING=OFF \ | ||
62 | -DENABLE_TBBBIND_2_5=OFF \ | ||
63 | -DCPACK_GENERATOR=RPM \ | ||
64 | -DENABLE_SYSTEM_FLATBUFFERS=ON \ | ||
65 | -DENABLE_SYSTEM_SNAPPY=ON \ | ||
66 | -DENABLE_MLAS_FOR_CPU=OFF \ | ||
67 | " | ||
68 | |||
69 | DEPENDS += "\ | ||
70 | flatbuffers-native \ | ||
71 | pugixml \ | ||
72 | python3-pybind11 \ | ||
73 | python3-pybind11-native \ | ||
74 | qemu-native \ | ||
75 | snappy \ | ||
76 | tbb \ | ||
77 | " | ||
78 | |||
79 | COMPATIBLE_HOST = '(x86_64).*-linux' | ||
80 | COMPATIBLE_HOST:libc-musl = "null" | ||
81 | |||
82 | PACKAGECONFIG ?= "opencl samples" | ||
83 | PACKAGECONFIG[opencl] = "-DENABLE_INTEL_GPU=TRUE, -DENABLE_INTEL_GPU=FALSE, virtual/opencl-icd opencl-headers opencl-clhpp," | ||
84 | PACKAGECONFIG[python3] = "-DENABLE_PYTHON=ON -DPYTHON_LIBRARY=${PYTHON_LIBRARY} -DPYTHON_INCLUDE_DIR=${PYTHON_INCLUDE_DIR} -DENABLE_PYTHON_PACKAGING=ON, -DENABLE_PYTHON=OFF, python3-cython-native patchelf-native, python3 python3-numpy python3-progress python3-cython" | ||
85 | PACKAGECONFIG[samples] = "-DENABLE_SAMPLES=ON -DENABLE_COMPILE_TOOL=ON, -DENABLE_SAMPLES=OFF -DENABLE_COMPILE_TOOL=OFF, opencv" | ||
86 | PACKAGECONFIG[verbose] = "-DVERBOSE_BUILD=1,-DVERBOSE_BUILD=0" | ||
87 | |||
88 | do_configure:prepend() { | ||
89 | # Dont set PROJECT_ROOT_DIR | ||
90 | sed -i -e 's:\${OpenVINO_SOURCE_DIR}::;' ${S}/src/CMakeLists.txt | ||
91 | |||
92 | # qemu wrapper that can be used by cmake to run target binaries. | ||
93 | qemu_binary="${@qemu_wrapper_cmdline(d, d.getVar('STAGING_DIR_HOST'), [d.expand('${STAGING_DIR_HOST}${libdir}'),d.expand('${STAGING_DIR_HOST}${base_libdir}')])}" | ||
94 | cat > ${WORKDIR}/qemuwrapper << EOF | ||
95 | #!/bin/sh | ||
96 | $qemu_binary "\$@" | ||
97 | EOF | ||
98 | chmod +x ${WORKDIR}/qemuwrapper | ||
99 | } | ||
100 | |||
101 | do_install:append() { | ||
102 | rm -rf ${D}${prefix}/install_dependencies | ||
103 | rm -rf ${D}${prefix}/setupvars.sh | ||
104 | |||
105 | sed -i -e 's:^#include.*imp.hpp"$:#include "/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR}/git/src/plugins/intel_cpu/src/nodes/proposal_imp.hpp":g;' ${B}/src/plugins/intel_cpu/cross-compiled/proposal_imp_disp.cpp | ||
106 | } | ||
107 | |||
108 | # Otherwise e.g. ros-openvino-toolkit-dynamic-vino-sample when using dldt-inference-engine uses dldt-inference-engine WORKDIR | ||
109 | # instead of RSS | ||
110 | SSTATE_SCAN_FILES:append = " *.cmake" | ||
111 | |||
112 | FILES:${PN} += "\ | ||
113 | ${libdir}/openvino-${PV}/lib*${SOLIBSDEV} \ | ||
114 | ${libdir}/openvino-${PV}/plugins.xml \ | ||
115 | ${libdir}/openvino-${PV}/cache.json \ | ||
116 | " | ||
117 | |||
118 | # Move inference engine samples into a separate package | ||
119 | PACKAGES =+ "${PN}-samples" | ||
120 | |||
121 | FILES:${PN}-samples = "${datadir}/openvino \ | ||
122 | ${bindir} \ | ||
123 | ${libdir}/libformat_reader.a \ | ||
124 | ${libdir}/libopencv_c_wrapper.a \ | ||
125 | " | ||
126 | RDEPENDS:${PN}-samples += "python3-core" | ||
127 | |||
128 | # Package for inference engine python API | ||
129 | PACKAGES =+ "${PN}-${PYTHON_PN}" | ||
130 | |||
131 | FILES:${PN}-${PYTHON_PN} = "${PYTHON_SITEPACKAGES_DIR}" | ||
132 | |||
133 | UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>(\d+\.\d+\.\d+))$" | ||