diff options
author | Daniel Bermond | 2020-07-05 22:36:18 +0000 |
---|---|---|
committer | Daniel Bermond | 2020-07-05 22:36:18 +0000 |
commit | 445e11599c6b8a3a723ebdbdf85b2a0a105fc535 (patch) | |
tree | 873e66ea97e19b12fe232a6a3a053bc92c989148 | |
download | aur-445e11599c6b8a3a723ebdbdf85b2a0a105fc535.tar.gz |
Initial commit of intel-openvino-git
-rw-r--r-- | .SRCINFO | 52 | ||||
-rw-r--r-- | 010-ade-disable-werror.patch | 11 | ||||
-rw-r--r-- | 020-intel-openvino-cldnn-disable-werror.patch | 11 | ||||
-rw-r--r-- | 030-intel-openvino-do-not-install-tbb.patch | 33 | ||||
-rw-r--r-- | PKGBUILD | 99 | ||||
-rw-r--r-- | intel-openvino.conf | 3 | ||||
-rw-r--r-- | intel-openvino.sh | 2 | ||||
-rw-r--r-- | setupvars.sh | 21 |
8 files changed, 232 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..8038bcd06a47 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,52 @@ +pkgbase = intel-openvino-git + pkgdesc = Toolkit for developing applications and solutions that emulate human vision using Intel hardware (git version) + pkgver = 2020.2.r461.gdf772e082 + pkgrel = 1 + url = https://docs.openvinotoolkit.org/ + arch = x86_64 + license = Apache + makedepends = git + makedepends = cmake + makedepends = python + makedepends = cython + makedepends = opencv + makedepends = aria2 + makedepends = wget + depends = ocl-icd + depends = intel-compute-runtime + depends = libusb + depends = protobuf + depends = tbb + optdepends = python: for using the Python API + optdepends = python-numpy: for using the Python API + optdepends = cython: for using the Python API + optdepends = python-py-cpuinfo: for running the benchmark tool + optdepends = python-progress: for running the benchmark tool + optdepends = opencv: for running the benchmark tool + provides = intel-openvino + conflicts = intel-openvino + 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 = intel-openvino.conf + source = intel-openvino.sh + source = setupvars.sh + source = 010-ade-disable-werror.patch + source = 020-intel-openvino-cldnn-disable-werror.patch + source = 030-intel-openvino-do-not-install-tbb.patch + sha256sums = SKIP + sha256sums = SKIP + sha256sums = SKIP + sha256sums = SKIP + sha256sums = SKIP + sha256sums = f485aa97d88d424dd3a223e0eddbbc382ec6c8d5094d51cbd3f0524b915e3d68 + sha256sums = 49a1cdd2357ac3c657b28d72aea1294e4af46389e41ed0d55ccbd12bd995058d + sha256sums = 3b72b36f9e7ae69fce4a72dc8b6bb73cd80298b53733353dcae074a5ced3e418 + sha256sums = 502fcbb3fcbb66aa5149ad2cc5f1fa297b51ed12c5c9396a16b5795a03860ed0 + sha256sums = b58aa9ec526cb6c528c58fc8b1a1b93b425999d1de29f0dd15a8b680c9eb8c77 + sha256sums = 806a8fd32f45e03d88e22f171fc831a319a1ef78c9da6b0700ca8ef43cb7a94d + +pkgname = intel-openvino-git + diff --git a/010-ade-disable-werror.patch b/010-ade-disable-werror.patch new file mode 100644 index 000000000000..bc242009c94c --- /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-intel-openvino-cldnn-disable-werror.patch b/020-intel-openvino-cldnn-disable-werror.patch new file mode 100644 index 000000000000..7670afb474d9 --- /dev/null +++ b/020-intel-openvino-cldnn-disable-werror.patch @@ -0,0 +1,11 @@ +--- a/inference-engine/thirdparty/clDNN/CMakeLists.txt ++++ b/inference-engine/thirdparty/clDNN/CMakeLists.txt +@@ -770,7 +770,7 @@ foreach(__CLDNN_CompilerFlagName IN ITEMS "CMAKE_CXX_FLAGS" "CMAKE_C_FLAGS") + MultiProcessorCompilation + DeadCodeEliminate + ExtensionsEnabled +- TreatWarnAsErrorEnabled ++ TreatWarnAsErrorDisabled + WarnLevel4 + NoFastMath + StackProtector diff --git a/030-intel-openvino-do-not-install-tbb.patch b/030-intel-openvino-do-not-install-tbb.patch new file mode 100644 index 000000000000..feb4646939ad --- /dev/null +++ b/030-intel-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 +@@ -230,30 +230,6 @@ ie_developer_export_targets(${TARGET_NAME} ${TARGET_NAME}_plugin_api xbyak) + + list(APPEND core_components ngraph) + +-if(THREADING STREQUAL "TBB" OR THREADING STREQUAL "TBB_AUTO") +- 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() +- + ie_cpack_add_component(core REQUIRED DEPENDS ${core_components}) + + install(DIRECTORY "${IE_MAIN_SOURCE_DIR}/include" DESTINATION ${IE_CPACK_IE_DIR} diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..d8f546efed91 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,99 @@ +# Maintainer: Daniel Bermond <dbermond@archlinux.org> + +pkgname=intel-openvino-git +pkgver=2020.2.r461.gdf772e082 +pkgrel=1 +pkgdesc='Toolkit for developing applications and solutions that emulate human vision using Intel hardware (git version)' +arch=('x86_64') +url='https://docs.openvinotoolkit.org/' +license=('Apache') +depends=('ocl-icd' 'intel-compute-runtime' 'libusb' 'protobuf' 'tbb') +optdepends=('python: for using the Python API' + 'python-numpy: for using the Python API' + 'cython: for using the Python API' + 'python-py-cpuinfo: for running the benchmark tool' + 'python-progress: for running the benchmark tool' + 'opencv: for running the benchmark tool') +makedepends=('git' 'cmake' 'python' 'cython' 'opencv' 'aria2' 'wget') +provides=('intel-openvino') +conflicts=('intel-openvino') +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' + 'intel-openvino.conf' + 'intel-openvino.sh' + 'setupvars.sh' + '010-ade-disable-werror.patch' + '020-intel-openvino-cldnn-disable-werror.patch' + '030-intel-openvino-do-not-install-tbb.patch') +sha256sums=('SKIP' + 'SKIP' + 'SKIP' + 'SKIP' + 'SKIP' + 'f485aa97d88d424dd3a223e0eddbbc382ec6c8d5094d51cbd3f0524b915e3d68' + '49a1cdd2357ac3c657b28d72aea1294e4af46389e41ed0d55ccbd12bd995058d' + '3b72b36f9e7ae69fce4a72dc8b6bb73cd80298b53733353dcae074a5ced3e418' + '502fcbb3fcbb66aa5149ad2cc5f1fa297b51ed12c5c9396a16b5795a03860ed0' + 'b58aa9ec526cb6c528c58fc8b1a1b93b425999d1de29f0dd15a8b680c9eb8c77' + '806a8fd32f45e03d88e22f171fc831a319a1ef78c9da6b0700ca8ef43cb7a94d') + +prepare() { + 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-intel-openvino-cldnn-disable-werror.patch" + patch -d openvino -Np1 -i "${srcdir}/030-intel-openvino-do-not-install-tbb.patch" +} + +pkgver() { + git -C openvino describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g;s/^v//' +} + +build() { + local _pyver + _pyver="$(python -c 'import sys; print("%s.%s" %sys.version_info[0:2])')" + export OpenCV_DIR='/usr/lib/cmake/opencv4' + + # 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_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 intel-openvino.conf -t "${pkgdir}/etc/ld.so.conf.d" + install -D -m755 intel-openvino.sh -t "${pkgdir}/etc/profile.d" + install -D -m755 setupvars.sh -t "${pkgdir}/opt/intel/openvino/bin" + + local _gnaver + _gnaver="$(find openvino/inference-engine/temp -type d -name 'gna_*' | sed 's/^.*gna_//')" + rm -r "${pkgdir}/opt/intel/openvino/deployment_tools/inference_engine/external/gna/lib" + cp -a "openvino/inference-engine/temp/gna_${_gnaver}/include" "${pkgdir}/opt/intel/openvino/deployment_tools/inference_engine/external/gna" + cp -a "openvino/inference-engine/temp/gna_${_gnaver}/linux/x64" "${pkgdir}/opt/intel/openvino/deployment_tools/inference_engine/external/gna/lib" +} diff --git a/intel-openvino.conf b/intel-openvino.conf new file mode 100644 index 000000000000..a7ebeb4fa747 --- /dev/null +++ b/intel-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/intel-openvino.sh b/intel-openvino.sh new file mode 100644 index 000000000000..0687ecd671cf --- /dev/null +++ b/intel-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 000000000000..66bf284dfae0 --- /dev/null +++ b/setupvars.sh @@ -0,0 +1,21 @@ +[ -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}/include" |