blob: 118606f31c26bebdfca267df78b1ed9b2c84f7a1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
|
# Maintainer: Daniel Bermond <dbermond@archlinux.org>
pkgname=openvino
pkgver=2021.4.1
pkgrel=1
pkgdesc='A toolkit for developing artificial inteligence and deep learning applications'
arch=('x86_64')
url='https://docs.openvinotoolkit.org/'
license=('Apache')
depends=('protobuf' 'numactl' 'libxml2')
# GPU (clDNN) plugin: only Intel GPUs are supported:
# https://github.com/openvinotoolkit/openvino/issues/452#issuecomment-722941119
optdepends=('intel-compute-runtime: for GPU (clDNN) plugin'
'ocl-icd: for GPU (clDNN) plugin'
'libusb: for Myriad plugin'
'python: for Python API'
'python-numpy: for Python API'
'cython: for Python API'
'python-py-cpuinfo: for benchmark tool'
'python-progress: for benchmark tool'
'opencv: for benchmark and cross_check tools')
makedepends=('git' 'git-lfs' 'cmake' 'intel-compute-runtime' 'libusb' 'ocl-icd' 'opencv'
'python' 'cython' 'shellcheck')
options=('!emptydirs')
provides=('intel-openvino')
conflicts=('intel-openvino')
replaces=('intel-openvino')
# supported firmwares: VPU_SUPPORTED_FIRMWARES in inference-engine/cmake/vpu_dependencies.cmake
_firmware_ver=1736 # FIRMWARE_PACKAGE_VERSION in inference-engine/cmake/vpu_dependencies.cmake
_gnaver=03.00.00.1377 # GNA_VERSION (GNA2) in inference-engine/cmake/dependencies.cmake
_tbbver=2020_20200415 # inference-engine/cmake/dependencies.cmake
_tbbbind_ver=2_4_static_lin_v2 # inference-engine/cmake/dependencies.cmake
source=("git+https://github.com/openvinotoolkit/openvino.git#tag=${pkgver}"
'git+https://github.com/opencv/ade.git'
'git+https://github.com/openvinotoolkit/oneDNN.git'
'googletest-openvinotoolkit'::'git+https://github.com/openvinotoolkit/googletest.git'
'git+https://github.com/gflags/gflags.git'
'git+https://github.com/herumi/xbyak.git'
'git+https://github.com/madler/zlib.git'
"https://download.01.org/opencv/master/openvinotoolkit/thirdparty/unified/VPU/usb-ma2x8x/firmware_usb-ma2x8x_${_firmware_ver}.zip"
"https://download.01.org/opencv/master/openvinotoolkit/thirdparty/unified/VPU/pcie-ma2x8x/firmware_pcie-ma2x8x_${_firmware_ver}.zip"
"https://download.01.org/opencv/master/openvinotoolkit/thirdparty/unified/GNA/GNA_${_gnaver}.zip"
"https://download.01.org/opencv/master/openvinotoolkit/thirdparty/linux/tbb${_tbbver}_lin_strip.tgz"
"https://download.01.org/opencv/master/openvinotoolkit/thirdparty/linux/tbbbind_${_tbbbind_ver}.tgz"
'openvino.conf'
'openvino.sh'
'setupvars.sh'
'010-ade-disable-werror.patch'
'020-openvino-cldnn-disable-werror.patch'
'030-openvino-ngraph-disable-werror.patch')
noextract=("firmware_usb-ma2x8x_${_firmware_ver}.zip"
"firmware_pcie-ma2x8x_${_firmware_ver}.zip"
"GNA_${_gnaver}.zip"
"tbb${_tbbver}_lin_strip.tgz"
"tbbbind_${_tbbbind_ver}.tgz")
sha256sums=('SKIP'
'SKIP'
'SKIP'
'SKIP'
'SKIP'
'SKIP'
'SKIP'
'28ed086ac52b964d9a1f5a54c017237d2d03ea39013e7910df678b176b9ce0c3'
'c2268e700eb597329376cbe830eeb6504203d765a1bde4da917242ca535a7ab3'
'd45fb48994d8c2803a16e88e29ae48851066325b97c1c6c4a5bf4f4573d55c65'
'95b2f3b0b70c7376a0c7de351a355c2c514b42c4966e77e3e34271a599501008'
'6dc926258c6cd3cba0f5c2cc672fd2ad599a1650fe95ab11122e8f361a726cb6'
'66cbaab93a6097207ff0908db155d590ad30b5fe12b429473e0bdfa99d1fd37f'
'49a1cdd2357ac3c657b28d72aea1294e4af46389e41ed0d55ccbd12bd995058d'
'cfcc5af35d7a50f83c780716f69f8a800b14bcf143f7abafd31a7a0dcb8c9ae8'
'502fcbb3fcbb66aa5149ad2cc5f1fa297b51ed12c5c9396a16b5795a03860ed0'
'bd5ede546abb49f7f07bf9f2aa7d9c7b1ecd9deba35ea6f4338ac4dfa8887542'
'cc35be4846faca62aa7b34a6e98f126499fbdfd52a34ba839be1bdf98b5dbe20')
export GIT_LFS_SKIP_SMUDGE='1'
prepare() {
git -C openvino lfs install --local
git -C openvino lfs pull "$(printf '%s' "${source[0]/git+/}" | sed 's/#.*$//')"
git -C openvino submodule init
git -C openvino config --local submodule.inference-engine/thirdparty/ade.url "${srcdir}/ade"
git -C openvino config --local submodule.inference-engine/thirdparty/mkl-dnn.url "${srcdir}/oneDNN"
git -C openvino config --local submodule.inference-engine/tests/ie_test_utils/common_test_utils/gtest.url "${srcdir}/googletest-openvinotoolkit"
git -C openvino config --local submodule.inference-engine/samples/thirdparty/gflags.url "${srcdir}/gflags"
git -C openvino config --local submodule.thirdparty/xbyak.url "${srcdir}/xbyak"
git -C openvino config --local submodule.thirdparty/zlib/zlib.url "${srcdir}/zlib"
git -C openvino submodule update
install -D -m644 "firmware_usb-ma2x8x_${_firmware_ver}.zip" -t thirdparty/unified/VPU/usb-ma2x8x
install -D -m644 "firmware_pcie-ma2x8x_${_firmware_ver}.zip" -t thirdparty/unified/VPU/pcie-ma2x8x
install -D -m644 "GNA_${_gnaver}.zip" -t thirdparty/unified/GNA
install -D -m644 "tbb${_tbbver}_lin_strip.tgz" "tbbbind_${_tbbbind_ver}.tgz" -t thirdparty/linux
patch -d openvino/inference-engine/thirdparty/ade -Np1 -i "${srcdir}/010-ade-disable-werror.patch"
patch -d openvino -Np1 -i "${srcdir}/020-openvino-cldnn-disable-werror.patch"
patch -d openvino -Np1 -i "${srcdir}/030-openvino-ngraph-disable-werror.patch"
}
build() {
local _ocvmaj
local _pyver
_ocvmaj="$(opencv_version | awk -F'.' '{ print $1 }')"
_pyver="$(python -c 'import sys; print("%s.%s" %sys.version_info[0:2])')"
export IE_PATH_TO_DEPS="$srcdir"
export OpenCV_DIR="/usr/lib/cmake/opencv${_ocvmaj}"
# note: does not accept 'None' build type
cmake -B build -S openvino \
-DBUILD_TESTING:BOOL='OFF' \
-DCMAKE_BUILD_TYPE:STRING='Release' \
-DCMAKE_INSTALL_PREFIX:PATH='/opt/intel/openvino' \
-DENABLE_AVX512F:BOOL='OFF' \
-DENABLE_PROFILING_ITT:BOOL='OFF' \
-DENABLE_PYTHON:BOOL='ON' \
-DPYTHON_EXECUTABLE='/usr/bin/python' \
-DPYTHON_LIBRARY="/usr/lib/libpython${_pyver}.so" \
-DPYTHON_INCLUDE_DIR="/usr/include/python${_pyver}" \
-DENABLE_SPEECH_DEMO:BOOL='OFF' \
-DENABLE_OPENCV:BOOL='OFF' \
-DNGRAPH_UNIT_TEST_ENABLE:BOOL='FALSE' \
-DNGRAPH_USE_SYSTEM_PROTOBUF:BOOL='ON' \
-DTREAT_WARNING_AS_ERROR:BOOL='OFF' \
-Wno-dev
make -C build
}
package() {
make -C build DESTDIR="$pkgdir" install
install -D -m644 openvino.conf -t "${pkgdir}/etc/ld.so.conf.d"
install -D -m755 openvino.sh -t "${pkgdir}/etc/profile.d"
install -D -m755 setupvars.sh -t "${pkgdir}/opt/intel/openvino/bin"
cp -dr --no-preserve='ownership' "openvino/inference-engine/temp/gna_${_gnaver}/include" \
"${pkgdir}/opt/intel/openvino/deployment_tools/inference_engine/external/gna"
chmod -R a+r "${pkgdir}/opt/intel/openvino/deployment_tools/inference_engine/external/gna/include"
}
|