summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWook Song <wook16.song@samsung.com>2020-01-08 10:44:24 +0900
committerWook Song <wook16.song@samsung.com>2020-01-08 10:44:24 +0900
commit58939b524c67d7a82baf899d6ef3724eeda1fcd6 (patch)
treec8827f081539b42310e06f5addef4cf874d87416
parentd7a9410a3068000f604a9c4e9959d058fcf0fb30 (diff)
downloaddldt-58939b524c67d7a82baf899d6ef3724eeda1fcd6.tar.gz
dldt-58939b524c67d7a82baf899d6ef3724eeda1fcd6.tar.bz2
dldt-58939b524c67d7a82baf899d6ef3724eeda1fcd6.zip
[Dist/Debian] Add a patch that support pre-installed VPU firmware
In order to build the plugin of OpenVino using firmware pre-installed or provided by other packages, the existing CMake build scripts should be modified. This patch adds such patch set modifying the CMake build scripts and enables that option in debian/rules. Change-Id: Ia51fda33df226b5fdabd913121bba6d25e8fdf77 Signed-off-by: Wook Song <wook16.song@samsung.com>
-rw-r--r--debian/patches/0003-VPU-CMake-Add-a-cmake-option-to-skip-downloading-MVN.patch68
-rw-r--r--debian/patches/series1
-rwxr-xr-xdebian/rules7
3 files changed, 73 insertions, 3 deletions
diff --git a/debian/patches/0003-VPU-CMake-Add-a-cmake-option-to-skip-downloading-MVN.patch b/debian/patches/0003-VPU-CMake-Add-a-cmake-option-to-skip-downloading-MVN.patch
new file mode 100644
index 000000000..280611743
--- /dev/null
+++ b/debian/patches/0003-VPU-CMake-Add-a-cmake-option-to-skip-downloading-MVN.patch
@@ -0,0 +1,68 @@
+From 5ffd669730e185d4e7f2d4c56a701d035f2186b6 Mon Sep 17 00:00:00 2001
+From: Wook Song <wook16.song@samsung.com>
+Date: Mon, 6 Jan 2020 18:44:39 +0900
+Subject: [PATCH 1/1] [VPU/CMake] Add a cmake option to skip downloading MVNC
+ firmwares
+
+In order to build via GBS/OBS (Tizen) or pdebuild/debuild (Ubuntu),
+which does not support resolving dependencies via network, this patch
+adds a cmake option to skip downloading MVNC firmwares while building
+the inference-engine and its VPU plugin.
+
+Change-Id: I913cd3fc59c5ebada0f7d11ebc55a7df9f2537a8
+Signed-off-by: Wook Song <wook16.song@samsung.com>
+---
+ inference-engine/cmake/dependencies.cmake | 6 +++++-
+ inference-engine/src/vpu/myriad_plugin/CMakeLists.txt | 4 +++-
+ inference-engine/thirdparty/movidius/XLink/CMakeLists.txt | 4 +++-
+ 3 files changed, 11 insertions(+), 3 deletions(-)
+
+diff --git a/inference-engine/cmake/dependencies.cmake b/inference-engine/cmake/dependencies.cmake
+index 682f2e55..aa5d76c9 100644
+--- a/inference-engine/cmake/dependencies.cmake
++++ b/inference-engine/cmake/dependencies.cmake
+@@ -17,7 +17,11 @@ if(COMMAND get_linux_name)
+ endif()
+
+ if (ENABLE_MYRIAD)
+- include(vpu_dependencies)
++ if (USE_MYRIAD_SYSTEM_DEPS)
++ message(STATUS "Use MVNC firmware provided by other packages or pre-installed in the system")
++ else ()
++ include(vpu_dependencies)
++ endif ()
+ endif()
+
+ ## enable cblas_gemm from OpenBLAS package
+diff --git a/inference-engine/src/vpu/myriad_plugin/CMakeLists.txt b/inference-engine/src/vpu/myriad_plugin/CMakeLists.txt
+index 7023513d..7a2c9da7 100644
+--- a/inference-engine/src/vpu/myriad_plugin/CMakeLists.txt
++++ b/inference-engine/src/vpu/myriad_plugin/CMakeLists.txt
+@@ -11,7 +11,9 @@ ie_add_plugin(NAME ${TARGET_NAME}
+ SOURCES ${SOURCES}
+ VERSION_DEFINES_FOR api/myriad_api.cpp)
+
+-add_dependencies(${TARGET_NAME} vpu_copy_firmware)
++if (NOT USE_MYRIAD_SYSTEM_DEPS)
++ add_dependencies(${TARGET_NAME} vpu_copy_firmware)
++endif ()
+ if(TARGET vpu_compile_custom_kernels)
+ add_dependencies(${TARGET_NAME} vpu_compile_custom_kernels)
+ endif()
+diff --git a/inference-engine/thirdparty/movidius/XLink/CMakeLists.txt b/inference-engine/thirdparty/movidius/XLink/CMakeLists.txt
+index 658081f4..96424502 100644
+--- a/inference-engine/thirdparty/movidius/XLink/CMakeLists.txt
++++ b/inference-engine/thirdparty/movidius/XLink/CMakeLists.txt
+@@ -57,6 +57,8 @@ if (ENABLE_MYRIAD_NO_BOOT)
+ NO_BOOT)
+ endif()
+
+-add_dependencies(${TARGET_NAME} vpu_copy_firmware)
++if (NOT USE_MYRIAD_SYSTEM_DEPS)
++ add_dependencies(${TARGET_NAME} vpu_copy_firmware)
++endif ()
+
+ set_property(TARGET ${TARGET_NAME} PROPERTY C_STANDARD 99)
+--
+2.17.1
+
diff --git a/debian/patches/series b/debian/patches/series
index d7e779969..6485071c0 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +1,3 @@
0001-CMake-Do-not-call-get_linux_name-when-LINUX_OS_NAME-.patch
0002-CMake-Add-a-variable-to-resolve-dependency-on-TBB-us.patch
+0003-VPU-CMake-Add-a-cmake-option-to-skip-downloading-MVN.patch
diff --git a/debian/rules b/debian/rules
index 0a1ccd93c..cdf300972 100755
--- a/debian/rules
+++ b/debian/rules
@@ -45,14 +45,15 @@ override_dh_auto_configure:
-DCMAKE_INSTALL_LIBDIR:PATH=$(LIBDIR) -DINCLUDE_INSTALL_DIR:PATH=$(INCDIR) \
-DLIB_INSTALL_DIR:PATH=$(LIBDIR) -DSYSCONF_INSTALL_DIR:PATH=$(SYSCONFDIR) \
-DSHARE_INSTALL_PREFIX:PATH=$(DATADIR) \
- -DBUILD_SHARED_LIBS:BOOL=OFF -DBUILD_PKGCONFIG=OFF \
+ -DBUILD_SHARED_LIBS:BOOL=OFF -DENABLE_ALTERNATIVE_TEMP=OFF \
+ -DUSE_TBB_SYSTEM_DEPS=ON -DUSE_MYRIAD_SYSTEM_DEPS=ON \
-DENABLE_VPU=ON -DENABLE_MYRIAD=ON -DENABLE_MYRIAD_MVNC_TESTS=OFF -DENABLE_MYRIAD_NO_BOOT=OFF \
-DENABLE_MKL_DNN=$(ENABLE_MKL_DNN) -DENABLE_GNA=OFF \
- -DUSE_TBB_SYSTEM_DEPS=ON -DBUILD_ADE_DOCUMENTATION=OFF -DBUILD_ADE_TUTORIAL=OFF \
+ -DBUILD_ADE_DOCUMENTATION=OFF -DBUILD_ADE_TUTORIAL=OFF \
-DBUILD_TESTING=OFF -DBUILD_TESTS=OFF \
-DCLDNN__INCLUDE_EXAMPLES=OFF -DCMAKE_BUILD_TYPE=Release -DCOVERAGE=OFF \
-DDEVELOPMENT_PLUGIN_MODE=OFF -DENABLE_ADE_TESTING=OFF \
- -DENABLE_AFFINITY_GENERATOR=OFF -DENABLE_ALTERNATIVE_TEMP=OFF -DENABLE_CLDNN=OFF \
+ -DENABLE_AFFINITY_GENERATOR=OFF -DENABLE_CLDNN=OFF -DBUILD_PKGCONFIG=OFF \
-DENABLE_CLDNN_BUILD=OFF -DENABLE_CLDNN_TESTS=OFF -DENABLE_CPPCHECK=OFF -DENABLE_CPPLINT=OFF \
-DENABLE_CPPLINT_REPORT=OFF -DENABLE_CPP_CCT=OFF -DENABLE_DEBUG_SYMBOLS=OFF \
-DENABLE_FUZZING=OFF -DENABLE_GAPI_TESTS=OFF -DENABLE_LTO=OFF \