diff options
Diffstat (limited to 'dynamic-layers/openembedded-layer/recipes-support/opencv/openvino-inference-engine_2023.1.0.bb')
-rw-r--r-- | dynamic-layers/openembedded-layer/recipes-support/opencv/openvino-inference-engine_2023.1.0.bb | 131 |
1 files changed, 131 insertions, 0 deletions
diff --git a/dynamic-layers/openembedded-layer/recipes-support/opencv/openvino-inference-engine_2023.1.0.bb b/dynamic-layers/openembedded-layer/recipes-support/opencv/openvino-inference-engine_2023.1.0.bb new file mode 100644 index 00000000..1b93b0ce --- /dev/null +++ b/dynamic-layers/openembedded-layer/recipes-support/opencv/openvino-inference-engine_2023.1.0.bb | |||
@@ -0,0 +1,131 @@ | |||
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/1;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 | file://fix-build.patch \ | ||
15 | file://cython-cmake.patch \ | ||
16 | file://7cecc9138b89e1946e3e515727bb69b2ab119806.patch;patchdir=thirdparty/ade \ | ||
17 | file://fix-build-with-gcc13.patch \ | ||
18 | file://onednn-fix-build-with-gcc13.patch;patchdir=src/plugins/intel_gpu/thirdparty/onednn_gpu \ | ||
19 | file://0001-protobuf-allow-target-protoc-to-be-built.patch \ | ||
20 | " | ||
21 | |||
22 | SRCREV_openvino = "47b736f63edda256d66e2bbb572f42a9d6549f6e" | ||
23 | SRCREV_mkl = "ae825539bd850d1ad5c83d4bb0d56c65d46d5842" | ||
24 | SRCREV_onednn = "4b82a66ed38ecaa993352e5cc6ed7753656b8a26" | ||
25 | SRCREV_xbyak = "740dff2e866f3ae1a70dd42d6e8836847ed95cc2" | ||
26 | SRCREV_json = "bc889afb4c5bf1c0d8ee29ef35eaaf4c8bef8a5d" | ||
27 | SRCREV_ade = "58b2595a1a95cc807be8bf6222f266a9a1f393a9" | ||
28 | SRCREV_protobuf = "fe271ab76f2ad2b2b28c10443865d2af21e27e0e" | ||
29 | SRCREV_FORMAT = "openvino_mkl_onednn_xbyak_json_ade_protobuf" | ||
30 | |||
31 | LICENSE = "Apache-2.0 & MIT & BSD-3-Clause" | ||
32 | LIC_FILES_CHKSUM = "file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327 \ | ||
33 | file://thirdparty/xbyak/COPYRIGHT;md5=3c98edfaa50a86eeaef4c6109e803f16 \ | ||
34 | file://thirdparty/cnpy/LICENSE;md5=689f10b06d1ca2d4b1057e67b16cd580 \ | ||
35 | file://thirdparty/json/nlohmann_json/LICENSE.MIT;md5=f969127d7b7ed0a8a63c2bbeae002588 \ | ||
36 | file://thirdparty/ade/LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57 \ | ||
37 | file://src/plugins/intel_cpu/thirdparty/onednn/LICENSE;md5=3b64000f6e7d52516017622a37a94ce9 \ | ||
38 | file://src/plugins/intel_gpu/thirdparty/onednn_gpu/LICENSE;md5=3b64000f6e7d52516017622a37a94ce9 \ | ||
39 | " | ||
40 | |||
41 | inherit cmake python3native pkgconfig qemu | ||
42 | |||
43 | S = "${WORKDIR}/git" | ||
44 | EXTRA_OECMAKE += " \ | ||
45 | -DCMAKE_CROSSCOMPILING_EMULATOR=${WORKDIR}/qemuwrapper \ | ||
46 | -DENABLE_OPENCV=OFF \ | ||
47 | -DENABLE_INTEL_GNA=OFF \ | ||
48 | -DENABLE_SYSTEM_TBB=ON \ | ||
49 | -DPYTHON_EXECUTABLE=${PYTHON} \ | ||
50 | -DCMAKE_BUILD_TYPE=RelWithDebInfo \ | ||
51 | -DTHREADING=TBB -DTBB_DIR="${STAGING_LIBDIR}/cmake/TBB" \ | ||
52 | -DTREAT_WARNING_AS_ERROR=FALSE \ | ||
53 | -DENABLE_DATA=FALSE \ | ||
54 | -DENABLE_SYSTEM_PUGIXML=TRUE \ | ||
55 | -DENABLE_OV_ONNX_FRONTEND=FALSE \ | ||
56 | -DUSE_BUILD_TYPE_SUBFOLDER=OFF \ | ||
57 | -DENABLE_FUZZING=OFF \ | ||
58 | -DENABLE_TBBBIND_2_5=OFF \ | ||
59 | -DCPACK_GENERATOR=RPM \ | ||
60 | -DENABLE_SYSTEM_FLATBUFFERS=ON \ | ||
61 | -DENABLE_SYSTEM_SNAPPY=ON \ | ||
62 | -DENABLE_MLAS_FOR_CPU=OFF \ | ||
63 | " | ||
64 | |||
65 | DEPENDS += "\ | ||
66 | flatbuffers-native \ | ||
67 | gflags \ | ||
68 | pugixml \ | ||
69 | python3-pybind11 \ | ||
70 | python3-pybind11-native \ | ||
71 | qemu-native \ | ||
72 | snappy \ | ||
73 | tbb \ | ||
74 | zlib \ | ||
75 | " | ||
76 | |||
77 | COMPATIBLE_HOST = '(x86_64).*-linux' | ||
78 | COMPATIBLE_HOST:libc-musl = "null" | ||
79 | |||
80 | PACKAGECONFIG ?= "opencl samples" | ||
81 | PACKAGECONFIG[opencl] = "-DENABLE_INTEL_GPU=TRUE, -DENABLE_INTEL_GPU=FALSE, virtual/opencl-icd opencl-headers opencl-clhpp," | ||
82 | 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" | ||
83 | PACKAGECONFIG[samples] = "-DENABLE_SAMPLES=ON -DENABLE_COMPILE_TOOL=ON, -DENABLE_SAMPLES=OFF -DENABLE_COMPILE_TOOL=OFF, opencv" | ||
84 | PACKAGECONFIG[verbose] = "-DVERBOSE_BUILD=1,-DVERBOSE_BUILD=0" | ||
85 | |||
86 | do_configure:prepend() { | ||
87 | # Dont set PROJECT_ROOT_DIR | ||
88 | sed -i -e 's:\${OpenVINO_SOURCE_DIR}::;' ${S}/src/CMakeLists.txt | ||
89 | |||
90 | # qemu wrapper that can be used by cmake to run target binaries. | ||
91 | qemu_binary="${@qemu_wrapper_cmdline(d, d.getVar('STAGING_DIR_HOST'), [d.expand('${STAGING_DIR_HOST}${libdir}'),d.expand('${STAGING_DIR_HOST}${base_libdir}')])}" | ||
92 | cat > ${WORKDIR}/qemuwrapper << EOF | ||
93 | #!/bin/sh | ||
94 | $qemu_binary "\$@" | ||
95 | EOF | ||
96 | chmod +x ${WORKDIR}/qemuwrapper | ||
97 | } | ||
98 | |||
99 | do_install:append() { | ||
100 | rm -rf ${D}${prefix}/install_dependencies | ||
101 | rm -rf ${D}${prefix}/setupvars.sh | ||
102 | |||
103 | 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 | ||
104 | } | ||
105 | |||
106 | # Otherwise e.g. ros-openvino-toolkit-dynamic-vino-sample when using dldt-inference-engine uses dldt-inference-engine WORKDIR | ||
107 | # instead of RSS | ||
108 | SSTATE_SCAN_FILES:append = " *.cmake" | ||
109 | |||
110 | FILES:${PN} += "\ | ||
111 | ${libdir}/openvino-${PV}/lib*${SOLIBSDEV} \ | ||
112 | ${libdir}/openvino-${PV}/plugins.xml \ | ||
113 | ${libdir}/openvino-${PV}/cache.json \ | ||
114 | " | ||
115 | |||
116 | # Move inference engine samples into a separate package | ||
117 | PACKAGES =+ "${PN}-samples" | ||
118 | |||
119 | FILES:${PN}-samples = "${datadir}/openvino \ | ||
120 | ${bindir} \ | ||
121 | ${libdir}/libformat_reader.a \ | ||
122 | ${libdir}/libopencv_c_wrapper.a \ | ||
123 | " | ||
124 | RDEPENDS:${PN}-samples += "python3-core" | ||
125 | |||
126 | # Package for inference engine python API | ||
127 | PACKAGES =+ "${PN}-${PYTHON_PN}" | ||
128 | |||
129 | FILES:${PN}-${PYTHON_PN} = "${PYTHON_SITEPACKAGES_DIR}" | ||
130 | |||
131 | UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>(\d+\.\d+\.\d+))$" | ||