Commit 8118a8c3 authored by Dennis Krupenik's avatar Dennis Krupenik

testing/openvino: new aport

parent d21265f6
Pipeline #46001 failed with stages
in 4 minutes and 13 seconds
# Contributor: Dennis Krupenik <dennis@krupenik.com>
# Maintainer: Dennis Krupenik <dennis@krupenik.com>
pkgname=openvino
pkgver=2020.4
pkgrel=0
pkgdesc="OpenVINO™ Toolkit - Deep Learning Deployment Toolkit repository"
url="https://github.com/openvinotoolkit/openvino"
arch="x86_64"
license="Apache-2.0"
depends_dev="libtbb libtbb-dev opencl-headers opencl-icd-loader-dev opencv-dev python3-dev py3-setuptools"
makedepends="autoconf automake cmake cython gcompat git libtool $depends_dev"
subpackages="$pkgname-static py3-$pkgname:py3 $pkgname-dev"
source="https://github.com/openvinotoolkit/openvino/archive/$pkgver.zip
https://github.com/gflags/gflags/archive/46f73f88b18aee341538c0dfc22b1710a6abedef.zip
https://github.com/opencv/ade/archive/cbe2db61a659c2cc304c3837406f95c39dfa938e.zip
https://github.com/openvinotoolkit/googletest/archive/9bd163b993459b2ca6ba2dc508577bbc8774c851.zip
https://github.com/openvinotoolkit/oneDNN/archive/2706f56ebab54415be48add2751072065f4b52ab.zip
cmake-config.patch
pessimizing-move.patch
deprecated-copy.patch"
prepare() {
cp -r "$srcdir"/ade-*/* inference-engine/thirdparty/ade/
cp -r "$srcdir"/gflags-*/* inference-engine/samples/thirdparty/gflags/
cp -r "$srcdir"/googletest-*/* inference-engine/tests/ie_test_utils/common_test_utils/gtest/
cp -r "$srcdir"/oneDNN-*/* inference-engine/thirdparty/mkl-dnn/
default_prepare
}
build() {
if [ "$CBUILD" != "$CHOST" ]; then
CMAKE_CROSSOPTS="-DCMAKE_SYSTEM_NAME=Linux -DCMAKE_HOST_SYSTEM_NAME=Linux"
fi
cmake -B build \
-Wno-dev \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr/openvino \
-DENABLE_ALTERNATIVE_TEMP=OFF \
-DENABLE_CLANG_FORMAT=OFF \
-DENABLE_CPPLINT=OFF \
-DENABLE_GNA=OFF \
-DENABLE_MYRIAD=OFF \
-DENABLE_OPENCV=OFF \
-DENABLE_PROFILING_ITT=OFF \
-DENABLE_PYTHON=ON \
-DENABLE_SAMPLES=OFF \
-DENABLE_SPEECH_DEMO=OFF \
-DENABLE_VPU=OFF \
-DNGRAPH_DYNAMIC_COMPONENTS_ENABLE=OFF \
-DNGRAPH_EXPORT_TARGETS_ENABLE=OFF \
-DNGRAPH_IE_ENABLE=ON \
-DNGRAPH_JSON_ENABLE=OFF \
-DNGRAPH_ONNX_IMPORT_ENABLE=OFF \
-DNGRAPH_PYTHON_BUILD_ENABLE=OFF \
-DNGRAPH_TEST_UTIL_ENABLE=OFF \
-DNGRAPH_UNIT_TEST_ENABLE=OFF \
-DOpenCV_DIR=/usr/lib/cmake/opencv4 \
-DTBB_DIR=/usr/lib/cmake/TBB \
-DTHREADING=TBB \
$CMAKE_CROSSOPTS .
make -C build
}
check() {
CTEST_OUTPUT_ON_FAILURE=1 make -C build test
}
package() {
make -C build DESTDIR="$pkgdir" install
cd "$pkgdir"
mkdir -p usr/bin usr/include usr/lib usr/share/openvino
mv usr/openvino/include/* usr/include/
mv usr/openvino/deployment_tools/inference_engine/include/* usr/include/
mv usr/openvino/deployment_tools/inference_engine/lib/intel64/compile_tool usr/bin/
mv usr/openvino/deployment_tools/inference_engine/lib/intel64/*.so usr/lib/
mv usr/openvino/deployment_tools/inference_engine/lib/intel64/cache.json usr/share/openvino
mv usr/openvino/deployment_tools/inference_engine/lib/intel64/plugins.xml usr/share/openvino
mv usr/openvino/lib*/* usr/lib/
mv usr/openvino/python/* usr/lib/
mv usr/openvino/share/* usr/share/
mv usr/openvino/deployment_tools/inference_engine/share/* usr/share/
rm -rf usr/openvino
}
dev() {
default_dev
mkdir -p "$subpkgdir"/usr/lib/cmake/InferenceEngine
mv "$pkgdir"/usr/share/InferenceEngine*.cmake "$subpkgdir"/usr/lib/cmake/InferenceEngine/
mv "$pkgdir"/usr/share/ie_parallel.cmake "$subpkgdir"/usr/lib/cmake/InferenceEngine/
mv "$pkgdir"/usr/share/ade "$subpkgdir"/usr/lib/cmake/
}
py3() {
pkgdesc="$pkgname python bindings"
mkdir -p "$subpkgdir"/usr/lib
mv "$pkgdir"/usr/lib/python* "$subpkgdir"/usr/lib/
}
static() {
pkgdesc="$pkgname static libs"
mkdir -p "$subpkgdir"/usr/lib
mv "$pkgdir"/usr/lib/*.a "$subpkgdir"/usr/lib/
}
sha512sums="ffb91e684ce7176657f5d7332ae7ac218e870945dd4f4656c636c0a99ff18501e33026f61d492d0870b67124ae53e02afd171552f311c10d1e322c7d59524d4f 2020.4.zip
c453eafa7e74b74c1607af485e7772e8eb37c664c5386767f8ecd273125ad7ec599c23325f434303bc3737386e579218948f7bec2ed3ab72fe8cd5faf076cdad 46f73f88b18aee341538c0dfc22b1710a6abedef.zip
269c77c4287de3199a455d149dd372731aad0ce883c861dea6d9c7d8c8e5b53cb9c2af5bef4f9296841c6d19eacfb9dcad3730e298e4f1d6852bdcc0fed7c632 cbe2db61a659c2cc304c3837406f95c39dfa938e.zip
dc45f98d3a5ad5bc46525c4761a46cf44b89813f8385717d0b971f2a81f9b76f5b9614f507fb25ec06a26c664af80b5557dbaa5df2acb3541fc62258137b60da 9bd163b993459b2ca6ba2dc508577bbc8774c851.zip
75fe7bae8dfc7b32aff384fca95f66a1cd6aa82f0aa0b61e23f564593e68777932178133709c08c49387e213f7d2848725f203f40864bf16bd79e1186657fa1d 2706f56ebab54415be48add2751072065f4b52ab.zip
b6347720e08746a4fdbb6e09691644597c900a6c440283baac6b1008399c78c5c34157dbfdb21476a71a7c4fd47c2912c7a7629076761d1bcb26d2a34ba73ba8 cmake-config.patch
9a93c41120189166bfcd5986954de812ebb16e429711b3f637907d2abf79dab75aac55eb1ee04ccbcee06e47709c3dcdd22b56aef89e64bb82b30fa10ca3dfd2 pessimizing-move.patch
d02374561f469f5818a9c76e697d68a84550c191459a2b4f9c7085f5b5e39eb6767a143e281dc0952a950cc7de12e11dd4a4602082f596553e2755c20a7a4867 deprecated-copy.patch"
Fix CMake scripts
---
--- a/docs/template_extension/CMakeLists.txt
+++ b/docs/template_extension/CMakeLists.txt
@@ -5,7 +5,10 @@
# [cmake:extension]
set(TARGET_NAME "template_extension")
-find_package(ngraph REQUIRED)
+find_package(ngraph QUIET)
+if(NOT ngraph_FOUND)
+ set(ngraph_DIR ${CMAKE_BINARY_DIR}/ngraph)
+endif()
find_package(InferenceEngine REQUIRED)
file(GLOB_RECURSE SRC *.cpp)
--- a/inference-engine/thirdparty/clDNN/CMakeLists.txt
+++ b/inference-engine/thirdparty/clDNN/CMakeLists.txt
@@ -465,8 +465,8 @@
# ======================================================================================================
# Check for python 2.7 interpreter (required tool).
-find_package(PythonInterp 2.7)
-if(NOT PYTHONINTERP_FOUND)
+find_package(Python)
+if(NOT Python_FOUND)
message(WARNING "[clDNN] Project requires Python 2.7 interpreter to build (with python loader). CMake could not detect it correctly.
If you have installed this interpreter, please disregard this warning or specify PYTHON_EXECUTABLE in CMake command-line."
)
--- a/inference-engine/thirdparty/clDNN/kernel_selector/CMakeLists.txt
+++ b/inference-engine/thirdparty/clDNN/kernel_selector/CMakeLists.txt
@@ -167,7 +167,7 @@
# =================================== Custom pre- and post-steps =======================================
add_custom_command(OUTPUT "${__CLDNN_CGDirectory__cg_cache}/${__CLDNN_File__cg_cache__prim_db}"
COMMAND "${CMAKE_COMMAND}" -E make_directory "${__CLDNN_CGDirectory__cg_cache}"
- COMMAND "${PYTHON_EXECUTABLE}" "${__CLDNN_Directory__core_common}/primitive_db_gen.py" -out_path "${__CLDNN_CGDirectory__cg_cache}" -out_file_name "${__CLDNN_File__cg_cache__prim_db}" -kernels "${__CLDNN_Directory__cl_kernels}"
+ COMMAND "${Python_EXECUTABLE}" "${__CLDNN_Directory__core_common}/primitive_db_gen.py" -out_path "${__CLDNN_CGDirectory__cg_cache}" -out_file_name "${__CLDNN_File__cg_cache__prim_db}" -kernels "${__CLDNN_Directory__cl_kernels}"
DEPENDS ${__CLDNN_Sources__cl_kernels} "${__CLDNN_Directory__core_common}/primitive_db_gen.py"
COMMENT "Generating ${__CLDNN_File__cg_cache__prim_db} ..."
)
--- a/ngraph/CMakeLists.txt
+++ b/ngraph/CMakeLists.txt
@@ -258,13 +258,8 @@
set(NGRAPH_INSTALL_DOC "${NGRAPH_COMPONENT_PREFIX}${CMAKE_INSTALL_DOCDIR}")
set(NGRAPH_INSTALL_BIN "${NGRAPH_COMPONENT_PREFIX}${CMAKE_INSTALL_BINDIR}")
if (LINUX)
- if (DEFINED NGRAPH_RPATH)
- set(CMAKE_BUILD_RPATH "$ORIGIN:${NGRAPH_RPATH}")
- set(CMAKE_INSTALL_RPATH "$ORIGIN:${NGRAPH_RPATH}")
- else()
- set(CMAKE_BUILD_RPATH "$ORIGIN")
- set(CMAKE_INSTALL_RPATH "$ORIGIN")
- endif()
+ set(CMAKE_BUILD_RPATH "$ORIGIN")
+ set(CMAKE_INSTALL_RPATH "$ORIGIN")
endif()
#-----------------------------------------------------------------------------------------------
--- a/inference-engine/src/inference_engine/CMakeLists.txt
+++ b/inference-engine/src/inference_engine/CMakeLists.txt
@@ -230,30 +230,6 @@
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}
Fix error: implicitly-declared 'constexpr ...' is deprecated [-Werror=deprecated-copy]
---
--- a/inference-engine/thirdparty/clDNN/src/gpu/memory_gpu.cpp
+++ b/inference-engine/thirdparty/clDNN/src/gpu/memory_gpu.cpp
@@ -127,8 +127,7 @@
CLDNN_ERROR_MESSAGE("2D image allocation", "unsupported image type!");
}
- cl::ImageFormat imageFormat(order, type);
- _buffer = cl::Image2D(_context->context(), CL_MEM_READ_WRITE, imageFormat, _width, _height, 0);
+ _buffer = cl::Image2D(_context->context(), CL_MEM_READ_WRITE, cl::ImageFormat(order, type), _width, _height, 0);
if (reset) zero_image();
}
Fix error: moving a local object in a return statement prevents copy elision [-Werror=pessimizing-move]
---
--- a/inference-engine/thirdparty/ade/sources/ade/source/execution_engine.cpp
+++ b/inference-engine/thirdparty/ade/sources/ade/source/execution_engine.cpp
@@ -138,7 +138,7 @@
}
}
- return std::move(ret);
+ return ret;
}
void ExecutionEngine::addExecutableDependency(const std::string& lazyPassName)
--- a/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/fully_connected/fully_connected_kernel_fs_byx_fsv32.cpp
+++ b/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/fully_connected/fully_connected_kernel_fs_byx_fsv32.cpp
@@ -60,7 +60,7 @@
runInfo.efficiency = FORCE_PRIORITY_5;
- return std::move(runInfo);
+ return runInfo;
}
JitConstants FullyConnected_fs_byx_fsv32::GetJitConstants(const fully_connected_params& params,
--- a/inference-engine/thirdparty/clDNN/src/gpu/kernels_cache.cpp
+++ b/inference-engine/thirdparty/clDNN/src/gpu/kernels_cache.cpp
@@ -74,7 +74,7 @@
undefs += "#endif\n";
}
- return std::move(undefs);
+ return undefs;
}
std::string reorder_options(const std::string& org_options) {
@@ -159,7 +159,7 @@
current_bucket.kernels_counter++;
}
- return std::move(scode);
+ return scode;
}
kernels_cache::kernels_cache(gpu_toolkit& context, uint32_t prog_id) : _context(context), _prog_id(prog_id) {}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment