summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Bermond2020-12-23 22:28:33 +0000
committerDaniel Bermond2020-12-23 22:28:33 +0000
commit3690f71e07315c0cbd49262ace2fffaeddbb063f (patch)
tree98234181fde44974e6c85097e5e5fd3e19170ed1
downloadaur-3690f71e07315c0cbd49262ace2fffaeddbb063f.tar.gz
Initial commit
-rw-r--r--.SRCINFO60
-rw-r--r--010-ade-disable-werror.patch11
-rw-r--r--020-openvino-cldnn-disable-werror.patch11
-rw-r--r--030-openvino-do-not-install-tbb.patch33
-rw-r--r--PKGBUILD122
-rw-r--r--openvino.conf3
-rw-r--r--openvino.sh2
-rw-r--r--setupvars.sh22
8 files changed, 264 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..960f8897fcd
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,60 @@
+pkgbase = openvino-git
+ pkgdesc = A toolkit for developing artificial inteligence and deep learning applications (git version)
+ pkgver = 2020.2.r2088.g4f0720176
+ pkgrel = 1
+ url = https://docs.openvinotoolkit.org/
+ arch = x86_64
+ license = Apache
+ makedepends = git
+ makedepends = git-lfs
+ makedepends = cmake
+ makedepends = libusb
+ makedepends = ocl-icd
+ makedepends = opencv
+ makedepends = python
+ makedepends = cython
+ makedepends = shellcheck
+ makedepends = aria2
+ makedepends = wget
+ depends = protobuf
+ depends = tbb
+ optdepends = intel-compute-runtime: for GPU (clDNN) plugin
+ optdepends = ocl-icd: for GPU (clDNN) plugin
+ optdepends = libusb: for Myriad plugin
+ optdepends = python: for Python API
+ optdepends = python-numpy: for Python API
+ optdepends = cython: for Python API
+ optdepends = python-py-cpuinfo: for benchmark tool
+ optdepends = python-progress: for benchmark tool
+ optdepends = opencv: for benchmark and cross_check tools
+ provides = openvino
+ provides = intel-openvino-git
+ conflicts = openvino
+ conflicts = intel-openvino-git
+ replaces = intel-openvino-git
+ options = !emptydirs
+ source = git+https://github.com/openvinotoolkit/openvino.git
+ source = git+https://github.com/opencv/ade.git
+ source = git+https://github.com/openvinotoolkit/oneDNN.git
+ source = googletest-openvinotoolkit::git+https://github.com/openvinotoolkit/googletest.git
+ source = git+https://github.com/gflags/gflags.git
+ source = openvino.conf
+ source = openvino.sh
+ source = setupvars.sh
+ source = 010-ade-disable-werror.patch
+ source = 020-openvino-cldnn-disable-werror.patch
+ source = 030-openvino-do-not-install-tbb.patch
+ sha256sums = SKIP
+ sha256sums = SKIP
+ sha256sums = SKIP
+ sha256sums = SKIP
+ sha256sums = SKIP
+ sha256sums = f485aa97d88d424dd3a223e0eddbbc382ec6c8d5094d51cbd3f0524b915e3d68
+ sha256sums = 49a1cdd2357ac3c657b28d72aea1294e4af46389e41ed0d55ccbd12bd995058d
+ sha256sums = 093199ae759e8755166b9737562438866123eda9b1afbbef2f7107b3cf827be5
+ sha256sums = 502fcbb3fcbb66aa5149ad2cc5f1fa297b51ed12c5c9396a16b5795a03860ed0
+ sha256sums = 013c96d0842d8778b0719ee29b9d9d7d8b61dc9b3b8b4e03d2293a8948e15377
+ sha256sums = 53e7405d1118edb1717a15ba6ac0521bbd4c75e494a1aa32b4cfccf43498efec
+
+pkgname = openvino-git
+
diff --git a/010-ade-disable-werror.patch b/010-ade-disable-werror.patch
new file mode 100644
index 00000000000..bc242009c94
--- /dev/null
+++ b/010-ade-disable-werror.patch
@@ -0,0 +1,11 @@
+--- a/sources/ade/CMakeLists.txt
++++ b/sources/ade/CMakeLists.txt
+@@ -11,7 +11,7 @@ file( GLOB_RECURSE sources source/*.cpp )
+ file( GLOB_RECURSE include *.hpp )
+
+ if (CMAKE_CXX_COMPILER_ID STREQUAL GNU)
+- set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror -Wall -Wextra -Wconversion -Wshadow -Wno-error=cpp -Wformat -Wformat-security" )
++ set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wconversion -Wshadow -Wno-error=cpp -Wformat -Wformat-security" )
+ endif()
+
+ add_library( ${PROJECT_NAME} STATIC ${include} ${sources} )
diff --git a/020-openvino-cldnn-disable-werror.patch b/020-openvino-cldnn-disable-werror.patch
new file mode 100644
index 00000000000..73ea94d4dcd
--- /dev/null
+++ b/020-openvino-cldnn-disable-werror.patch
@@ -0,0 +1,11 @@
+--- a/inference-engine/thirdparty/clDNN/CMakeLists.txt
++++ b/inference-engine/thirdparty/clDNN/CMakeLists.txt
+@@ -702,7 +702,7 @@ foreach(__CLDNN_CompilerFlagName IN ITEMS "CMAKE_CXX_FLAGS" "CMAKE_C_FLAGS")
+ MultiProcessorCompilation
+ DeadCodeEliminate
+ ExtensionsEnabled
+- TreatWarnAsErrorEnabled
++ TreatWarnAsErrorDisabled
+ WarnLevel4
+ NoFastMath
+ StackProtector
diff --git a/030-openvino-do-not-install-tbb.patch b/030-openvino-do-not-install-tbb.patch
new file mode 100644
index 00000000000..b7b8204e8d0
--- /dev/null
+++ b/030-openvino-do-not-install-tbb.patch
@@ -0,0 +1,33 @@
+--- a/inference-engine/src/inference_engine/CMakeLists.txt
++++ b/inference-engine/src/inference_engine/CMakeLists.txt
+@@ -223,30 +223,6 @@ ie_developer_export_targets(${TARGET_NAME} ${TARGET_NAME}_plugin_api)
+
+ list(APPEND core_components ngraph)
+
+-if((THREADING STREQUAL "TBB" OR THREADING STREQUAL "TBB_AUTO") AND TBBROOT MATCHES ${TEMP})
+- ie_cpack_add_component(tbb REQUIRED)
+- list(APPEND core_components tbb)
+-
+- install(DIRECTORY "${TBB}/include"
+- DESTINATION ${IE_CPACK_IE_DIR}/external/tbb
+- COMPONENT tbb)
+- install(DIRECTORY "${TBB}/lib"
+- DESTINATION ${IE_CPACK_IE_DIR}/external/tbb
+- COMPONENT tbb)
+- if(EXISTS "${TBB}/bin")
+- install(DIRECTORY "${TBB}/bin"
+- DESTINATION ${IE_CPACK_IE_DIR}/external/tbb
+- COMPONENT tbb)
+- endif()
+- install(FILES "${TBB}/LICENSE"
+- DESTINATION ${IE_CPACK_IE_DIR}/external/tbb
+- COMPONENT tbb)
+- install(FILES "${TBB}/cmake/TBBConfig.cmake"
+- "${TBB}/cmake/TBBConfigVersion.cmake"
+- DESTINATION ${IE_CPACK_IE_DIR}/external/tbb/cmake
+- COMPONENT tbb)
+-endif()
+-
+ # Install Inference Engine
+
+ ie_cpack_add_component(core REQUIRED DEPENDS ${core_components})
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..ec92da84519
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,122 @@
+# Maintainer: Daniel Bermond <dbermond@archlinux.org>
+
+pkgname=openvino-git
+pkgver=2020.2.r2088.g4f0720176
+pkgrel=1
+pkgdesc='A toolkit for developing artificial inteligence and deep learning applications (git version)'
+arch=('x86_64')
+url='https://docs.openvinotoolkit.org/'
+license=('Apache')
+depends=('protobuf' 'tbb')
+# 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' 'libusb' 'ocl-icd' 'opencv' 'python'
+ 'cython' 'shellcheck' 'aria2' 'wget')
+provides=('openvino' 'intel-openvino-git')
+conflicts=('openvino' 'intel-openvino-git')
+replaces=('intel-openvino-git')
+options=('!emptydirs')
+source=('git+https://github.com/openvinotoolkit/openvino.git'
+ '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'
+ 'openvino.conf'
+ 'openvino.sh'
+ 'setupvars.sh'
+ '010-ade-disable-werror.patch'
+ '020-openvino-cldnn-disable-werror.patch'
+ '030-openvino-do-not-install-tbb.patch')
+sha256sums=('SKIP'
+ 'SKIP'
+ 'SKIP'
+ 'SKIP'
+ 'SKIP'
+ 'f485aa97d88d424dd3a223e0eddbbc382ec6c8d5094d51cbd3f0524b915e3d68'
+ '49a1cdd2357ac3c657b28d72aea1294e4af46389e41ed0d55ccbd12bd995058d'
+ '093199ae759e8755166b9737562438866123eda9b1afbbef2f7107b3cf827be5'
+ '502fcbb3fcbb66aa5149ad2cc5f1fa297b51ed12c5c9396a16b5795a03860ed0'
+ '013c96d0842d8778b0719ee29b9d9d7d8b61dc9b3b8b4e03d2293a8948e15377'
+ '53e7405d1118edb1717a15ba6ac0521bbd4c75e494a1aa32b4cfccf43498efec')
+
+export GIT_LFS_SKIP_SMUDGE='1'
+
+prepare() {
+ git -C openvino lfs install --local
+ git -C openvino lfs pull "${source[0]/git+/}"
+
+ 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 submodule update
+
+ 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-do-not-install-tbb.patch"
+}
+
+pkgver() {
+ git -C openvino describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g;s/^v//'
+}
+
+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 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_TEST_UTIL_ENABLE:BOOL='OFF' \
+ -DNGRAPH_UNIT_TEST_ENABLE:BOOL='FALSE' \
+ -DNGRAPH_USE_SYSTEM_PROTOBUF:BOOL='ON' \
+ -DTBBROOT:PATH='/usr' \
+ -DTBB_DIR:PATH='/usr/lib/cmake/TBB' \
+ -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"
+
+ local _gnaver
+ local _gnasover
+ local _gnasover_full
+ local _gnadir="${pkgdir}/opt/intel/openvino/deployment_tools/inference_engine/external/gna"
+ _gnaver="$(find openvino/inference-engine/temp -type d -name 'gna_*' | sed 's/^.*gna_//')"
+ _gnasover="$(find "${_gnadir}/lib" -type f -regextype 'posix-basic' -regex '.*/libgna\.so\.[0-9]*$' | sed 's/.*\.//')"
+ _gnasover_full="$(find "${_gnadir}/lib" -type f -regextype 'posix-basic' -regex '.*/libgna\.so\.[0-9]*\..*' | sed 's/.*\.so\.//')"
+ cp -dr --no-preserve='ownership' "openvino/inference-engine/temp/gna_${_gnaver}/include" "$_gnadir"
+ rm "${_gnadir}/lib"/libgna.so{,".${_gnasover}"}
+ ln -s "libgna.so.${_gnasover_full}" "${_gnadir}/lib/libgna.so.${_gnasover}"
+ ln -s "libgna.so.${_gnasover}" "${_gnadir}/lib/libgna.so"
+}
diff --git a/openvino.conf b/openvino.conf
new file mode 100644
index 00000000000..a7ebeb4fa74
--- /dev/null
+++ b/openvino.conf
@@ -0,0 +1,3 @@
+/opt/intel/openvino/deployment_tools/inference_engine/lib/intel64
+/opt/intel/openvino/deployment_tools/inference_engine/external/gna/lib
+/opt/intel/openvino/lib
diff --git a/openvino.sh b/openvino.sh
new file mode 100644
index 00000000000..0687ecd671c
--- /dev/null
+++ b/openvino.sh
@@ -0,0 +1,2 @@
+export INTEL_OPENVINO_DIR='/opt/intel/openvino'
+export INTEL_CVSDK_DIR="$INTEL_OPENVINO_DIR"
diff --git a/setupvars.sh b/setupvars.sh
new file mode 100644
index 00000000000..77ed913c001
--- /dev/null
+++ b/setupvars.sh
@@ -0,0 +1,22 @@
+[ -z "$INTEL_OPENVINO_DIR" ] && export INTEL_OPENVINO_DIR='/opt/intel/openvino'
+
+export InferenceEngine_DIR="${INTEL_OPENVINO_DIR}/deployment_tools/inference_engine/share"
+export ngraph_DIR="${INTEL_OPENVINO_DIR}/cmake"
+
+if command -v python >/dev/null 2>&1
+then
+ _pyver=$(python -c 'import sys; print("%s.%s" %sys.version_info[0:2])')
+ export PYTHONPATH="${PYTHONPATH:+${PYTHONPATH}:}${INTEL_OPENVINO_DIR}/python/python${_pyver}"
+fi
+
+export LD_LIBRARY_PATH="${LD_LIBRARY_PATH:+${LD_LIBRARY_PATH}:}${INTEL_OPENVINO_DIR}/deployment_tools/inference_engine/lib/intel64"
+export LD_LIBRARY_PATH+=":${INTEL_OPENVINO_DIR}/deployment_tools/inference_engine/external/gna/lib"
+export LD_LIBRARY_PATH+=":${INTEL_OPENVINO_DIR}/lib"
+
+export LIBRARY_PATH="${LIBRARY_PATH:+${LIBRARY_PATH}:}${INTEL_OPENVINO_DIR}/deployment_tools/inference_engine/lib/intel64"
+export LIBRARY_PATH+=":${INTEL_OPENVINO_DIR}/deployment_tools/inference_engine/external/gna/lib"
+export LIBRARY_PATH+=":${INTEL_OPENVINO_DIR}/lib"
+
+export CPATH="${CPATH:+${CPATH}:}${INTEL_OPENVINO_DIR}/deployment_tools/inference_engine/include"
+export CPATH+=":${INTEL_OPENVINO_DIR}/deployment_tools/inference_engine/external/gna/include"
+export CPATH+=":${INTEL_OPENVINO_DIR}/include"