summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYongjoo Ahn <yongjoo1.ahn@samsung.com>2021-10-27 20:10:52 +0900
committerYongjoo Ahn <yongjoo1.ahn@samsung.com>2021-10-27 20:10:52 +0900
commitfff7c8b88a8ee9157b89bdd588521a267354dd8f (patch)
treed823781c94fbba9d34a0d4d362ce8eca9a710b2d
parent4795391b73381660b69b4cd3986c7a0bf902e868 (diff)
downloaddldt-sandbox/anyj0527/2021.2.tar.gz
dldt-sandbox/anyj0527/2021.2.tar.bz2
dldt-sandbox/anyj0527/2021.2.zip
Temp commit for openvino v2021.2sandbox/anyj0527/2021.2
-rw-r--r--packaging/Append-suffix-to-plugin-path.patch47
-rw-r--r--packaging/Enable-pkg-config-file-generation.patch45
-rw-r--r--packaging/Fix-GBS-build-issues.patch217
-rw-r--r--packaging/ade-0.1.1f.tar.gzbin0 -> 116074 bytes
-rw-r--r--packaging/openvino-ie.manifest5
-rw-r--r--packaging/openvino-ie.spec128
-rw-r--r--packaging/usb-ma2x8x.mvcmdbin0 -> 2224952 bytes
7 files changed, 442 insertions, 0 deletions
diff --git a/packaging/Append-suffix-to-plugin-path.patch b/packaging/Append-suffix-to-plugin-path.patch
new file mode 100644
index 000000000..d57e665dc
--- /dev/null
+++ b/packaging/Append-suffix-to-plugin-path.patch
@@ -0,0 +1,47 @@
+diff --git a/inference-engine/src/inference_engine/CMakeLists.txt b/inference-engine/src/inference_engine/CMakeLists.txt
+index f012a038a..72d8fc27e 100644
+--- a/inference-engine/src/inference_engine/CMakeLists.txt
++++ b/inference-engine/src/inference_engine/CMakeLists.txt
+@@ -3,6 +3,7 @@
+ #
+
+ set (TARGET_NAME "inference_engine")
++add_definitions("-DPLUGIN_DIR=\"${PLUGIN_DIR}\"")
+
+ file (GLOB LIBRARY_SRC
+ ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp
+diff --git a/inference-engine/src/inference_engine/ie_core.cpp b/inference-engine/src/inference_engine/ie_core.cpp
+index ddce658f9..b73864e1a 100644
+--- a/inference-engine/src/inference_engine/ie_core.cpp
++++ b/inference-engine/src/inference_engine/ie_core.cpp
+@@ -208,7 +208,8 @@ public:
+
+ // append IR library path for default IE plugins
+ {
+- FileUtils::FilePath absFilePath = FileUtils::makePath(getInferenceEngineLibraryPath(), pluginPath);
++ FileUtils::FilePath absFilePath = FileUtils::makePath(FileUtils::makePath(
++ getInferenceEngineLibraryPath(), FileUtils::toFilePath(PLUGIN_DIR)), pluginPath);
+ if (FileUtils::fileExist(absFilePath)) pluginPath = absFilePath;
+ }
+
+@@ -424,7 +425,8 @@ public:
+ {
+ pluginPath = FileUtils::makeSharedLibraryName({}, FileUtils::toFilePath(pluginName.c_str()));
+
+- FileUtils::FilePath absFilePath = FileUtils::makePath(getInferenceEngineLibraryPath(), pluginPath);
++ FileUtils::FilePath absFilePath = FileUtils::makePath(FileUtils::makePath(
++ getInferenceEngineLibraryPath(), FileUtils::toFilePath(PLUGIN_DIR)), pluginPath);
+ if (FileUtils::fileExist(absFilePath)) pluginPath = absFilePath;
+ }
+
+@@ -527,7 +529,9 @@ Core::Core(const std::string& xmlConfigFile) {
+ std::string xmlConfigFile_ = xmlConfigFile;
+ if (xmlConfigFile_.empty()) {
+ // register plugins from default plugins.xml config
+- FileUtils::FilePath xmlConfigFileDefault = FileUtils::makePath(getInferenceEngineLibraryPath(), FileUtils::toFilePath("plugins.xml"));
++ FileUtils::FilePath xmlConfigFileDefault = FileUtils::makePath(
++ FileUtils::makePath(getInferenceEngineLibraryPath(), FileUtils::toFilePath(PLUGIN_DIR)),
++ FileUtils::toFilePath("plugins.xml"));
+ xmlConfigFile_ = FileUtils::fromFilePath(xmlConfigFileDefault);
+ }
+
diff --git a/packaging/Enable-pkg-config-file-generation.patch b/packaging/Enable-pkg-config-file-generation.patch
new file mode 100644
index 000000000..6e48c7de9
--- /dev/null
+++ b/packaging/Enable-pkg-config-file-generation.patch
@@ -0,0 +1,45 @@
+From eb20aae0f0caa5af800e476b9729abd979e1d8f3 Mon Sep 17 00:00:00 2001
+From: Mu-Woong Lee <muwoong.lee@samsung.com>
+Date: Thu, 20 May 2021 19:24:07 +0900
+Subject: [PATCH] Enable pkg-config file generation
+
+---
+ CMakeLists.txt | 5 +++++
+ openvino-ie.pc.in | 12 ++++++++++++
+ 2 files changed, 17 insertions(+)
+ create mode 100644 openvino-ie.pc.in
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 5c3585a3e..ee9108d0e 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -216,3 +216,8 @@ elseif(WIN32)
+ endif()
+
+ ie_cpack(${IE_CPACK_COMPONENTS_ALL})
++
++set(PC_PREFIX ${CMAKE_INSTALL_PREFIX})
++set(PC_LIBDIR ${CMAKE_INSTALL_LIBDIR})
++set(PC_INCDIR ${CMAKE_INSTALL_INCLUDEDIR}/openvino-ie)
++configure_file(openvino-ie.pc.in openvino-ie.pc @ONLY)
+diff --git a/openvino-ie.pc.in b/openvino-ie.pc.in
+new file mode 100644
+index 000000000..fd209a524
+--- /dev/null
++++ b/openvino-ie.pc.in
+@@ -0,0 +1,12 @@
++# Package Information for pkg-config
++
++prefix=@PC_PREFIX@
++exec_prefix=${prefix}
++libdir=@PC_LIBDIR@
++includedir=${prefix}/@PC_INCDIR@
++
++Name: OpenVINO Inference Engine
++Description: OpenVINO inference engine library
++Version: 2021.2
++Libs: -L${libdir} -ldl -linference_engine -linference_engine_legacy -linference_engine_ir_v7_reader -linference_engine_transformations -linference_engine_lp_transformations -linference_engine_c_api -linference_engine_ir_reader -linference_engine_preproc -lngraph -lie_backend -lngraph_backend -linterpreter_backend
++Cflags: -DTHREADING=SEQ -I${includedir}
+--
+2.25.1
+
diff --git a/packaging/Fix-GBS-build-issues.patch b/packaging/Fix-GBS-build-issues.patch
new file mode 100644
index 000000000..d55888176
--- /dev/null
+++ b/packaging/Fix-GBS-build-issues.patch
@@ -0,0 +1,217 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 5c3585a3e..e0c756d8c 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -6,6 +6,10 @@ cmake_minimum_required(VERSION 3.13 FATAL_ERROR)
+
+ project(OpenVINO)
+
++add_compile_options(-Wno-sign-compare -Wno-unused-function -Wno-unused-variable
++ -Wno-unused-but-set-variable -Wno-reorder -Wno-parentheses
++ -Wno-strict-aliasing -Wno-comment)
++
+ set(OpenVINO_MAIN_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR})
+ set(IE_MAIN_SOURCE_DIR ${OpenVINO_MAIN_SOURCE_DIR}/inference-engine)
+ list(APPEND CMAKE_MODULE_PATH "${OpenVINO_MAIN_SOURCE_DIR}/cmake")
+@@ -18,7 +22,7 @@ include(developer_package)
+
+ # These options are shared with 3rdparty plugins by means of developer package
+ include(check_features)
+-include(dependencies)
++#include(dependencies)
+
+ # resolving dependencies for the project
+ message (STATUS "PROJECT ............................... " ${PROJECT_NAME})
+@@ -55,13 +59,13 @@ function(build_ngraph)
+ ngraph_set(NGRAPH_PYTHON_BUILD_ENABLE FALSE)
+
+ if(ENABLE_TESTS AND NOT ANDROID)
+- ngraph_set(NGRAPH_UNIT_TEST_ENABLE TRUE)
++ ngraph_set(NGRAPH_UNIT_TEST_ENABLE FALSE)
+ else()
+ ngraph_set(NGRAPH_UNIT_TEST_ENABLE FALSE)
+ endif()
+
+ if(NOT (ANDROID OR WINDOWS_STORE OR (MSVC AND (ARM OR AARCH64)) ))
+- ngraph_set(NGRAPH_ONNX_IMPORT_ENABLE TRUE)
++ ngraph_set(NGRAPH_ONNX_IMPORT_ENABLE FALSE)
+ else()
+ ngraph_set(NGRAPH_ONNX_IMPORT_ENABLE FALSE)
+ endif()
+diff --git a/inference-engine/CMakeLists.txt b/inference-engine/CMakeLists.txt
+index a3e4f74c4..8abdaac5b 100644
+--- a/inference-engine/CMakeLists.txt
++++ b/inference-engine/CMakeLists.txt
+@@ -69,7 +69,7 @@ if(ENABLE_TESTS)
+ add_subdirectory(tests)
+ endif()
+
+-add_subdirectory(tools)
++#add_subdirectory(tools)
+
+ function(ie_build_samples)
+ # samples should be build with the same flags as from OpenVINO package,
+@@ -88,7 +88,7 @@ endfunction()
+
+ # gflags and format_reader targets are kept inside of samples directory and
+ # they must be built even if samples build is disabled (required for tests and tools).
+-ie_build_samples()
++#ie_build_samples()
+
+ file(GLOB_RECURSE SAMPLES_SOURCES samples/*.cpp samples/*.hpp samples/*.h)
+ add_cpplint_target(sample_cpplint
+@@ -179,20 +179,15 @@ endif()
+ # Developer package
+ #
+
+-ie_developer_export_targets(format_reader)
+-ie_developer_export_targets(${NGRAPH_LIBRARIES})
++#ie_developer_export_targets(format_reader)
++#ie_developer_export_targets(${NGRAPH_LIBRARIES})
+
+ # for Template plugin
+ if(NGRAPH_INTERPRETER_ENABLE)
+ ie_developer_export_targets(ngraph_backend interpreter_backend)
+ endif()
+
+-ie_developer_export()
+-
+-configure_file(
+- "${IE_MAIN_SOURCE_DIR}/cmake/developer_package_config.cmake.in"
+- "${CMAKE_BINARY_DIR}/InferenceEngineDeveloperPackageConfig.cmake"
+- @ONLY)
++#ie_developer_export()
+
+ configure_file(
+ "${IE_MAIN_SOURCE_DIR}/cmake/share/InferenceEngineConfig-version.cmake.in"
+diff --git a/inference-engine/cmake/dependencies.cmake b/inference-engine/cmake/dependencies.cmake
+index e4d4327d1..af4f1cb6f 100644
+--- a/inference-engine/cmake/dependencies.cmake
++++ b/inference-engine/cmake/dependencies.cmake
+@@ -4,7 +4,7 @@
+
+ cmake_policy(SET CMP0054 NEW)
+
+-include(models)
++#include(models)
+
+ #we have number of dependencies stored on ftp
+ include(dependency_solver)
+@@ -30,9 +30,9 @@ endif()
+
+ message(STATUS "MODELS_PATH=" ${MODELS_PATH})
+
+-fetch_models_and_validation_set()
++#fetch_models_and_validation_set()
+
+-include(linux_name)
++#include(linux_name)
+ if(COMMAND get_linux_name)
+ get_linux_name(LINUX_OS_NAME)
+ endif()
+@@ -40,7 +40,7 @@ endif()
+ include(CMakeParseArguments)
+
+ if (ENABLE_MYRIAD)
+- include(vpu_dependencies)
++# include(vpu_dependencies)
+ endif()
+
+ ## enable cblas_gemm from OpenBLAS package
+diff --git a/inference-engine/src/inference_engine/CMakeLists.txt b/inference-engine/src/inference_engine/CMakeLists.txt
+index f012a038a..6efbbb9c1 100644
+--- a/inference-engine/src/inference_engine/CMakeLists.txt
++++ b/inference-engine/src/inference_engine/CMakeLists.txt
+@@ -213,6 +213,7 @@ 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") AND TBBROOT MATCHES ${TEMP})
+ ie_cpack_add_component(tbb REQUIRED)
+ list(APPEND core_components tbb)
+@@ -236,6 +237,7 @@ if((THREADING STREQUAL "TBB" OR THREADING STREQUAL "TBB_AUTO") AND TBBROOT MATCH
+ DESTINATION ${IE_CPACK_IE_DIR}/external/tbb/cmake
+ COMPONENT tbb)
+ endif()
++#]]
+
+ ie_cpack_add_component(core REQUIRED DEPENDS ${core_components})
+
+diff --git a/inference-engine/src/vpu/myriad_plugin/CMakeLists.txt b/inference-engine/src/vpu/myriad_plugin/CMakeLists.txt
+index 889f2e6e6..9191454ee 100644
+--- a/inference-engine/src/vpu/myriad_plugin/CMakeLists.txt
++++ b/inference-engine/src/vpu/myriad_plugin/CMakeLists.txt
+@@ -14,7 +14,7 @@ ie_add_plugin(
+ CPPLINT_FILTERS "+runtime/explicit"
+ )
+
+-add_dependencies(${TARGET_NAME} vpu_copy_firmware)
++#add_dependencies(${TARGET_NAME} vpu_copy_firmware)
+ if(TARGET vpu_compile_custom_kernels)
+ add_dependencies(${TARGET_NAME} vpu_compile_custom_kernels)
+ endif()
+diff --git a/inference-engine/thirdparty/pugixml/CMakeLists.txt b/inference-engine/thirdparty/pugixml/CMakeLists.txt
+index 8bcb2801a..11df2932d 100644
+--- a/inference-engine/thirdparty/pugixml/CMakeLists.txt
++++ b/inference-engine/thirdparty/pugixml/CMakeLists.txt
+@@ -36,9 +36,9 @@ if(DEFINED BUILD_DEFINES)
+ endforeach()
+ endif()
+
+-if(BUILD_SHARED_LIBS)
+- add_library(pugixml SHARED ${SOURCES})
+-else()
++#if(BUILD_SHARED_LIBS)
++# add_library(pugixml SHARED ${SOURCES})
++#else()
+ add_library(pugixml STATIC ${SOURCES})
+ if (MSVC)
+ add_library(pugixml_mt STATIC ${SOURCES})
+@@ -47,7 +47,7 @@ else()
+ # set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /MTd")
+ #endif()
+ endif()
+-endif()
++#endif()
+
+ # Enable C++11 long long for compilers that are capable of it
+ if(NOT ${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} STRLESS 3.1 AND ";${CMAKE_CXX_COMPILE_FEATURES};" MATCHES ";cxx_long_long_type;")
+diff --git a/ngraph/CMakeLists.txt b/ngraph/CMakeLists.txt
+index 99f32a618..803e9ae51 100644
+--- a/ngraph/CMakeLists.txt
++++ b/ngraph/CMakeLists.txt
+@@ -29,10 +29,11 @@ if (CMAKE_BUILD_TYPE)
+ endif()
+ endif()
+
+-include(git_tags)
++#include(git_tags)
+ include(var_functions)
+
+-NGRAPH_GET_VERSION_LABEL()
++#NGRAPH_GET_VERSION_LABEL()
++set(NGRAPH_VERSION_LABEL "v0.26.0+custom-build")
+
+ string(REGEX MATCH "([0-9?]+)\\.([0-9?]+)\\.([0-9?]+)(-(rc|dev)\\.[0-9?]+)?" NGRAPH_VERSION_SHORT "${NGRAPH_VERSION_LABEL}")
+ string(REGEX REPLACE "-rc." "rc" NGRAPH_WHEEL_VERSION "${NGRAPH_VERSION_SHORT}")
+@@ -108,8 +109,8 @@ if (APPLE)
+ endif()
+ endif()
+
+-option(NGRAPH_UNIT_TEST_ENABLE "Control the building of unit tests" TRUE)
+-option(NGRAPH_TEST_UTIL_ENABLE "Control the building of test utility" TRUE)
++option(NGRAPH_UNIT_TEST_ENABLE "Control the building of unit tests" FALSE)
++option(NGRAPH_TEST_UTIL_ENABLE "Control the building of test utility" FALSE)
+ option(NGRAPH_INTERPRETER_ENABLE "Control the building of the INTERPRETER backend" TRUE)
+ option(NGRAPH_DEBUG_ENABLE "Enable output for NGRAPH_DEBUG statements" FALSE)
+ option(NGRAPH_DEPRECATED_ENABLE "Enable compiler deprecation pragmas for deprecated APIs (recommended only for development use)" TRUE)
+@@ -126,7 +127,7 @@ option(NGRAPH_UB_SANITIZER_ENABLE "Compiles and links with Undefined Behavior Sa
+ option(NGRAPH_USE_PROTOBUF_LITE "Compiles and links with protobuf-lite" FALSE)
+
+ if (NGRAPH_ONNX_IMPORT_ENABLE)
+- option(NGRAPH_USE_SYSTEM_PROTOBUF "Use system provided Protobuf shared object" FALSE)
++ option(NGRAPH_USE_SYSTEM_PROTOBUF "Use system provided Protobuf shared object" TRUE)
+ endif()
+
+ if (NGRAPH_UNIT_TEST_ENABLE)
diff --git a/packaging/ade-0.1.1f.tar.gz b/packaging/ade-0.1.1f.tar.gz
new file mode 100644
index 000000000..6d66e8838
--- /dev/null
+++ b/packaging/ade-0.1.1f.tar.gz
Binary files differ
diff --git a/packaging/openvino-ie.manifest b/packaging/openvino-ie.manifest
new file mode 100644
index 000000000..86dbb267f
--- /dev/null
+++ b/packaging/openvino-ie.manifest
@@ -0,0 +1,5 @@
+<manifest>
+ <request>
+ <domain name="_" />
+ </request>
+</manifest>
diff --git a/packaging/openvino-ie.spec b/packaging/openvino-ie.spec
new file mode 100644
index 000000000..b7cbe4e79
--- /dev/null
+++ b/packaging/openvino-ie.spec
@@ -0,0 +1,128 @@
+Name: openvino-ie
+Summary: Configuration files and dependencies for OpenVINO Inference Engine
+Version: 2021.2
+Release: 0
+
+# ExcludeArch: %ix86
+
+# ==========================================================
+License: Apache-2.0
+# ==========================================================
+
+Source0: %{name}-%{version}.tar.gz
+Source1: ade-0.1.1f.tar.gz
+Source1001: %{name}.manifest
+Source1003: usb-ma2x8x.mvcmd
+Source2001: Append-suffix-to-plugin-path.patch
+Source2002: Fix-GBS-build-issues.patch
+Source2003: Enable-pkg-config-file-generation.patch
+
+# ==========================================================
+# BuildRequires
+# specifies build-time dependencies for the package
+# ==========================================================
+BuildRequires: cmake
+BuildRequires: protobuf-devel
+BuildRequires: libusb-devel
+
+
+%description
+OpenVINO allows developers to deploy pre-trained deep learning models
+through a high-level C++ Inference Engine API integrated with application logic.
+The Inference Engine can infer models in different formats with various input and output formats.
+
+
+%package devel
+Summary: %{name}-devel
+Requires: %{name} = %{version}
+
+
+%description devel
+%{name}-devel version %{version}
+
+
+%prep
+%setup -q
+cp %{SOURCE1001} .
+pushd inference-engine/thirdparty
+cp %{SOURCE1} .
+tar zxf %{SOURCE1}
+mv ade-0.1.1f/* ade/
+popd
+patch -p1 < %{SOURCE2001}
+patch -p1 < %{SOURCE2002}
+patch -p1 < %{SOURCE2003}
+
+# ==========================================================
+# build section
+# how to actually build the software we are packaging
+# ==========================================================
+%build
+mkdir -p build
+pushd build
+%{cmake} -DCMAKE_BUILD_TYPE=RelWithDebInfo \
+ -DCMAKE_SKIP_RPATH=ON \
+ -DENABLE_MKL_DNN=OFF \
+ -DENABLE_CLDNN=OFF \
+ -DENABLE_GNA=OFF \
+ -DENABLE_PROFILING_ITT=OFF \
+ -DENABLE_VPU=ON \
+ -DENABLE_TESTS=OFF \
+ -DENABLE_SAMPLES=OFF \
+ -DENABLE_OPENCV=OFF \
+ -DENABLE_DEBUG_SYMBOLS=ON \
+ -DENABLE_PYTHON=OFF \
+ -DENABLE_C=OFF \
+ -DENABLE_CPPLINT=OFF \
+ -DTHREADING=SEQ \
+ -DPLUGIN_DIR=%{name} ../
+%{make_build}
+popd
+
+
+# ==========================================================
+# install section
+# how to actually build the software we are packaging
+# ==========================================================
+%install
+mkdir -p %{buildroot}%{_includedir}/%{name}
+mkdir -p %{buildroot}%{_libdir}/%{name}
+mkdir -p %{buildroot}%{_libdir}/pkgconfig
+
+cp -R --no-dereference --preserve=mode,links -v inference-engine/include/* %{buildroot}%{_includedir}/%{name}
+
+OUTPUT_DIR=`find bin -name "libinference_engine.so" | sed -re 's/\/[a-zA-Z_\.]*$//g'`
+
+cp ${OUTPUT_DIR}/plugins.xml %{buildroot}%{_libdir}/%{name}
+cp ${OUTPUT_DIR}/*.so %{buildroot}%{_libdir}
+mv %{buildroot}%{_libdir}/lib*Plugin.so %{buildroot}%{_libdir}/%{name}/
+
+cp %{SOURCE1003} %{buildroot}%{_libdir}/%{name}
+cp build/%{name}.pc %{buildroot}%{_libdir}/pkgconfig
+
+%clean
+
+
+%post -p /sbin/ldconfig
+
+%postun -p /sbin/ldconfig
+
+
+# ==========================================================
+# files section
+# The list of files that will be installed in the end
+# user’s system.
+# ==========================================================
+%files
+%manifest %{name}.manifest
+%license LICENSE
+%{_libdir}/lib*.so
+%{_libdir}/%{name}/lib*.so
+%{_libdir}/%{name}/*.xml
+%{_libdir}/%{name}/*.mvcmd
+
+%files devel
+%manifest %{name}.manifest
+%license LICENSE
+%{_includedir}/%{name}/*
+%{_libdir}/pkgconfig/*.pc
diff --git a/packaging/usb-ma2x8x.mvcmd b/packaging/usb-ma2x8x.mvcmd
new file mode 100644
index 000000000..ee360b026
--- /dev/null
+++ b/packaging/usb-ma2x8x.mvcmd
Binary files differ