openvino-inference-engine: upgrade 2020.1 -> 2020.3.0

* Point to the renamed repository and change the project name to
  openvino-inference-engine.

* Include ngraph as a submodule instead of using it as a separate
  project.

* Use the new unit tests, the old ones have been deprecated.

Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
This commit is contained in:
Anuj Mittal 2020-06-05 01:26:01 +08:00
parent 7006412eb1
commit 78386dd80b
9 changed files with 609 additions and 409 deletions

View File

@ -1,383 +0,0 @@
From 1c78ff3ff1f77c78a618f7a780985cef1933bb2b Mon Sep 17 00:00:00 2001
From: Anuj Mittal <anuj.mittal@intel.com>
Date: Mon, 13 Apr 2020 15:20:28 +0800
Subject: [PATCH] Installation and build fixes
- Install libs, samples and binaries at appropriate places.
- Use system installed pugixml, ade, gflags, ngraph, opencl-headers
and icd-loader.
- Disable usage of Werror.
- Use find_library to look for tbb instead of looking for cmake module.
Upstream-Status: Inappropriate [OS-specific]
Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
---
CMakeLists.txt | 2 --
cmake/developer_package.cmake | 8 +++++---
cmake/os_flags.cmake | 1 -
inference-engine/CMakeLists.txt | 7 ++-----
inference-engine/cmake/ie_parallel.cmake | 10 ++--------
.../include/gpu/gpu_ocl_wrapper.hpp | 2 +-
inference-engine/samples/CMakeLists.txt | 8 +++-----
.../samples/common/format_reader/CMakeLists.txt | 2 ++
.../src/cldnn_engine/CMakeLists.txt | 1 +
.../src/inference_engine/CMakeLists.txt | 17 +----------------
.../src/vpu/myriad_plugin/CMakeLists.txt | 2 +-
.../tests/mock_engine/CMakeLists.txt | 2 ++
inference-engine/tests/unit/CMakeLists.txt | 2 ++
inference-engine/thirdparty/CMakeLists.txt | 4 +---
.../clDNN/CMakeCompilerLinkerOpts.txt | 2 --
.../thirdparty/clDNN/CMakeLists.txt | 1 -
.../clDNN/common/khronos_ocl_clhpp/cl2_ext.hpp | 2 +-
.../tools/compile_tool/CMakeLists.txt | 2 +-
.../tools/vpu/vpu_compile/CMakeLists.txt | 4 ++--
.../tools/vpu/vpu_perfcheck/CMakeLists.txt | 2 +-
20 files changed, 28 insertions(+), 53 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index e48cee57..e9598455 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -120,8 +120,6 @@ function(build_ngraph)
endif()
ie_cpack_add_component(ngraph)
-
- add_subdirectory(ngraph)
endfunction()
build_ngraph()
diff --git a/cmake/developer_package.cmake b/cmake/developer_package.cmake
index e59edb2b..35672cac 100644
--- a/cmake/developer_package.cmake
+++ b/cmake/developer_package.cmake
@@ -5,7 +5,9 @@
include(CPackComponent)
unset(IE_CPACK_COMPONENTS_ALL CACHE)
-set(IE_CPACK_IE_DIR deployment_tools/inference_engine)
+if (NOT DEFINED IE_CPACK_IE_DIR)
+ set(IE_CPACK_IE_DIR deployment_tools/inference_engine)
+endif()
function(ie_cpack_set_library_dir)
string(TOLOWER ${CMAKE_SYSTEM_PROCESSOR} ARCH)
@@ -18,7 +20,7 @@ function(ie_cpack_set_library_dir)
if(WIN32)
set(IE_CPACK_LIBRARY_PATH ${IE_CPACK_IE_DIR}/lib/$<CONFIG>/${ARCH} PARENT_SCOPE)
else()
- set(IE_CPACK_LIBRARY_PATH ${IE_CPACK_IE_DIR}/lib/${ARCH} PARENT_SCOPE)
+ set(IE_CPACK_LIBRARY_PATH ${CMAKE_INSTALL_LIBDIR} PARENT_SCOPE)
endif()
endfunction()
@@ -99,7 +101,7 @@ if(UNIX)
SET(LIB_DL ${CMAKE_DL_LIBS})
endif()
-set(OUTPUT_ROOT ${OpenVINO_MAIN_SOURCE_DIR})
+set(OUTPUT_ROOT ${CMAKE_CURRENT_BINARY_DIR})
# Enable postfixes for Debug/Release builds
set(IE_DEBUG_POSTFIX_WIN "d")
diff --git a/cmake/os_flags.cmake b/cmake/os_flags.cmake
index 6f70768f..40141aca 100644
--- a/cmake/os_flags.cmake
+++ b/cmake/os_flags.cmake
@@ -139,7 +139,6 @@ if(WIN32)
else()
# TODO: enable for C sources as well
# ie_add_compiler_flags(-Werror)
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror")
ie_add_compiler_flags(-ffunction-sections -fdata-sections)
ie_add_compiler_flags(-fvisibility=hidden)
ie_add_compiler_flags(-fdiagnostics-show-option)
diff --git a/inference-engine/CMakeLists.txt b/inference-engine/CMakeLists.txt
index d5feedb4..1ee656a1 100644
--- a/inference-engine/CMakeLists.txt
+++ b/inference-engine/CMakeLists.txt
@@ -123,12 +123,13 @@ install(FILES samples/CMakeLists.txt
# install Python samples
+if (ENABLE_PYTHON)
ie_cpack_add_component(python_samples REQUIRED DEPENDS core)
install(DIRECTORY ${ie_python_api_SOURCE_DIR}/sample/
DESTINATION ${IE_CPACK_IE_DIR}/samples/python
COMPONENT python_samples)
-
+endif()
# Custom target to build only Inference Engine Developer Package targets
add_custom_target(ie_dev_targets ALL DEPENDS inference_engine HeteroPlugin)
@@ -136,10 +137,6 @@ add_custom_target(ie_dev_targets ALL DEPENDS inference_engine HeteroPlugin)
# Developer package
ie_developer_export_targets(format_reader)
-if (ENABLE_NGRAPH)
- ie_developer_export_targets(${NGRAPH_LIBRARIES})
-endif()
-
export(TARGETS ${IEDeveloperPackageTargets} NAMESPACE IE::
APPEND FILE "${CMAKE_BINARY_DIR}/targets_developer.cmake")
diff --git a/inference-engine/cmake/ie_parallel.cmake b/inference-engine/cmake/ie_parallel.cmake
index 9ea885be..71733fd9 100644
--- a/inference-engine/cmake/ie_parallel.cmake
+++ b/inference-engine/cmake/ie_parallel.cmake
@@ -42,14 +42,8 @@ function(set_ie_threading_interface_for TARGET_NAME)
set(IE_THREAD_DEFINE "IE_THREAD_SEQ")
if (THREADING STREQUAL "TBB" OR THREADING STREQUAL "TBB_AUTO")
- find_package(TBB COMPONENTS tbb tbbmalloc)
- if (TBB_FOUND)
- set(IE_THREAD_DEFINE "IE_THREAD_TBB")
- ie_target_link_libraries(${TARGET_NAME} PUBLIC ${TBB_IMPORTED_TARGETS})
- else ()
- ext_message(WARNING "TBB was not found by the configured TBB_DIR path. \
- SEQ method will be used for ${TARGET_NAME}")
- endif ()
+ set(IE_THREAD_DEFINE "IE_THREAD_TBB")
+ target_link_libraries(${TARGET_NAME} PUBLIC tbb tbbmalloc)
elseif (THREADING STREQUAL "OMP")
if (WIN32)
set(omp_lib_name libiomp5md)
diff --git a/inference-engine/include/gpu/gpu_ocl_wrapper.hpp b/inference-engine/include/gpu/gpu_ocl_wrapper.hpp
index fce7d8f1..827e5764 100644
--- a/inference-engine/include/gpu/gpu_ocl_wrapper.hpp
+++ b/inference-engine/include/gpu/gpu_ocl_wrapper.hpp
@@ -21,4 +21,4 @@
# pragma GCC system_header
#endif
-#include <CL/cl2.hpp>
+#include <cl2.hpp>
diff --git a/inference-engine/samples/CMakeLists.txt b/inference-engine/samples/CMakeLists.txt
index f355e7b9..d24c7c78 100644
--- a/inference-engine/samples/CMakeLists.txt
+++ b/inference-engine/samples/CMakeLists.txt
@@ -24,7 +24,7 @@ endif()
if(IE_MAIN_SOURCE_DIR)
# in case if samples are built from IE repo
- set(IE_MAIN_SAMPLES_DIR ${OpenVINO_MAIN_SOURCE_DIR})
+ set(IE_MAIN_SAMPLES_DIR ${CMAKE_BINARY_DIR})
# hint for find_package(InferenceEngine in the samples folder)
set(InferenceEngine_DIR "${CMAKE_BINARY_DIR}")
else()
@@ -91,10 +91,6 @@ set (HAVE_INTTYPES_H 1)
set (INTTYPES_FORMAT C99)
set (BUILD_TESTING OFF)
-if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/gflags")
- add_subdirectory(thirdparty/gflags)
-endif()
-
if (CMAKE_CXX_COMPILER_ID STREQUAL GNU)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall")
endif()
@@ -203,6 +199,8 @@ macro(ie_add_sample)
if(COMMAND add_cpplint_target AND NOT IE_SAMPLE_EXCLUDE_CPPLINT)
add_cpplint_target(${IE_SAMPLE_NAME}_cpplint FOR_TARGETS ${IE_SAMPLE_NAME})
endif()
+
+ install(TARGETS ${IE_SAMPLE_NAME} DESTINATION bin)
endmacro()
# collect all samples subdirectories
diff --git a/inference-engine/samples/common/format_reader/CMakeLists.txt b/inference-engine/samples/common/format_reader/CMakeLists.txt
index 6d935135..fe12eeb7 100644
--- a/inference-engine/samples/common/format_reader/CMakeLists.txt
+++ b/inference-engine/samples/common/format_reader/CMakeLists.txt
@@ -40,3 +40,5 @@ target_include_directories(${TARGET_NAME} PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}"
"${CMAKE_CURRENT_SOURCE_DIR}/..")
set_target_properties(${TARGET_NAME} PROPERTIES COMPILE_PDB_NAME ${TARGET_NAME})
+
+install(TARGETS ${TARGET_NAME} DESTINATION ${CMAKE_INSTALL_LIBDIR})
diff --git a/inference-engine/src/cldnn_engine/CMakeLists.txt b/inference-engine/src/cldnn_engine/CMakeLists.txt
index 43344e7f..50beda23 100644
--- a/inference-engine/src/cldnn_engine/CMakeLists.txt
+++ b/inference-engine/src/cldnn_engine/CMakeLists.txt
@@ -32,6 +32,7 @@ target_include_directories(${TARGET_NAME} PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}
${CLDNN__IOCL_ICD_INCDIRS}
${CLDNN_TOP_FOLDER}
+ ${CLDNN_TOP_FOLDER}/common/khronos_ocl_clhpp
${IE_MAIN_SOURCE_DIR}/thirdparty/pugixml/src)
# copy default global xml file describing the custom kernels and the *.cl files
diff --git a/inference-engine/src/inference_engine/CMakeLists.txt b/inference-engine/src/inference_engine/CMakeLists.txt
index 54e264c8..e3809654 100644
--- a/inference-engine/src/inference_engine/CMakeLists.txt
+++ b/inference-engine/src/inference_engine/CMakeLists.txt
@@ -292,20 +292,6 @@ if(threading_tbb)
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)
endif()
ie_cpack_add_component(core REQUIRED DEPENDS ${core_components})
@@ -318,10 +304,9 @@ install(TARGETS ${TARGET_NAME} ${TARGET_NAME}_nn_builder
LIBRARY DESTINATION ${IE_CPACK_LIBRARY_PATH}
COMPONENT core)
install(FILES "${OpenVINO_BINARY_DIR}/share/ie_parallel.cmake"
- "${OpenVINO_BINARY_DIR}/share/ie_rh_decoder.cmake"
"${OpenVINO_BINARY_DIR}/share/InferenceEngineConfig.cmake"
"${OpenVINO_BINARY_DIR}/share/InferenceEngineConfig-version.cmake"
- DESTINATION ${IE_CPACK_IE_DIR}/share
+ DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/InferenceEngine
COMPONENT core)
install(FILES $<TARGET_FILE_DIR:${TARGET_NAME}>/plugins.xml
DESTINATION ${IE_CPACK_LIBRARY_PATH}
diff --git a/inference-engine/src/vpu/myriad_plugin/CMakeLists.txt b/inference-engine/src/vpu/myriad_plugin/CMakeLists.txt
index 32cb534a..858ffefc 100644
--- a/inference-engine/src/vpu/myriad_plugin/CMakeLists.txt
+++ b/inference-engine/src/vpu/myriad_plugin/CMakeLists.txt
@@ -41,5 +41,5 @@ target_link_libraries(${TARGET_NAME}
# install
install(FILES ${IE_MAIN_SOURCE_DIR}/thirdparty/movidius/mvnc/src/97-myriad-usbboot.rules
- DESTINATION deployment_tools/inference_engine/external
+ DESTINATION ${CMAKE_INSTALL_SYSCONFDIR}/udev/rules.d
COMPONENT myriad)
diff --git a/inference-engine/tests/mock_engine/CMakeLists.txt b/inference-engine/tests/mock_engine/CMakeLists.txt
index f3fb53e1..09fb66ce 100644
--- a/inference-engine/tests/mock_engine/CMakeLists.txt
+++ b/inference-engine/tests/mock_engine/CMakeLists.txt
@@ -38,3 +38,5 @@ target_compile_definitions(${TARGET_NAME} PRIVATE IMPLEMENT_INFERENCE_ENGINE_PLU
set_property(TARGET ${TARGET_NAME} PROPERTY CXX_STANDARD 11)
set_property(TARGET ${TARGET_NAME} PROPERTY CXX_STANDARD_REQUIRED ON)
set_property(TARGET ${TARGET_NAME} PROPERTY COMPILE_PDB_NAME ${TARGET_NAME})
+
+install(TARGETS ${TARGET_NAME} EXPORT ${TARGET_NAME} LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
diff --git a/inference-engine/tests/unit/CMakeLists.txt b/inference-engine/tests/unit/CMakeLists.txt
index a5c945ae..eabe70d3 100644
--- a/inference-engine/tests/unit/CMakeLists.txt
+++ b/inference-engine/tests/unit/CMakeLists.txt
@@ -187,3 +187,5 @@ add_test(NAME ${TARGET_NAME}
COMMAND ${TARGET_NAME})
add_dependencies(${TARGET_NAME} mock_engine)
+
+install(TARGETS ${TARGET_NAME} DESTINATION ${CMAKE_INSTALL_BINDIR})
diff --git a/inference-engine/thirdparty/CMakeLists.txt b/inference-engine/thirdparty/CMakeLists.txt
index ec22761d..3962d924 100644
--- a/inference-engine/thirdparty/CMakeLists.txt
+++ b/inference-engine/thirdparty/CMakeLists.txt
@@ -35,14 +35,12 @@ function(build_with_lto)
add_subdirectory(clDNN)
endif()
- add_subdirectory(pugixml)
add_subdirectory(stb_lib)
- add_subdirectory(ade)
add_subdirectory(fluid/modules/gapi)
# developer package
- ie_developer_export_targets(ade fluid pugixml)
+ ie_developer_export_targets(fluid)
if(TARGET pugixml_mt)
ie_developer_export_targets(pugixml_mt)
endif()
diff --git a/inference-engine/thirdparty/clDNN/CMakeCompilerLinkerOpts.txt b/inference-engine/thirdparty/clDNN/CMakeCompilerLinkerOpts.txt
index 6b799cdd..91755b35 100644
--- a/inference-engine/thirdparty/clDNN/CMakeCompilerLinkerOpts.txt
+++ b/inference-engine/thirdparty/clDNN/CMakeCompilerLinkerOpts.txt
@@ -206,7 +206,6 @@ elseif(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)
ALIAS RttiDisabled "-fno-rtti"
ALIAS RttiEnabled "-frtti"
ALIAS TreatWarnAsErrorDisabled TreatWarnAsError REMOVE_GROUP
- ALIAS TreatWarnAsErrorEnabled "-Werror" "-pedantic-errors"
ALIAS WarnLevel0 "-w"
ALIAS WarnLevel1 WarnLevels REMOVE_GROUP
ALIAS WarnLevel2 "-Wall"
@@ -290,7 +289,6 @@ elseif((CMAKE_C_COMPILER_ID MATCHES "^Clang$") OR (CMAKE_CXX_COMPILER_ID MATCHES
ALIAS RttiDisabled "-fno-rtti"
ALIAS RttiEnabled Rtti REMOVE_GROUP
ALIAS TreatWarnAsErrorDisabled TreatWarnAsError REMOVE_GROUP
- ALIAS TreatWarnAsErrorEnabled "-Werror"
ALIAS WarnLevel0 "-w"
ALIAS WarnLevel1 WarnLevels REMOVE_GROUP
ALIAS WarnLevel2 "-Wall"
diff --git a/inference-engine/thirdparty/clDNN/CMakeLists.txt b/inference-engine/thirdparty/clDNN/CMakeLists.txt
index b08c2744..42ca79e6 100644
--- a/inference-engine/thirdparty/clDNN/CMakeLists.txt
+++ b/inference-engine/thirdparty/clDNN/CMakeLists.txt
@@ -767,7 +767,6 @@ foreach(__CLDNN_CompilerFlagName IN ITEMS "CMAKE_CXX_FLAGS" "CMAKE_C_FLAGS")
MultiProcessorCompilation
DeadCodeEliminate
ExtensionsEnabled
- TreatWarnAsErrorEnabled
WarnLevel4
NoFastMath
StackProtector
diff --git a/inference-engine/thirdparty/clDNN/common/khronos_ocl_clhpp/cl2_ext.hpp b/inference-engine/thirdparty/clDNN/common/khronos_ocl_clhpp/cl2_ext.hpp
index a9e379bd..8b822223 100644
--- a/inference-engine/thirdparty/clDNN/common/khronos_ocl_clhpp/cl2_ext.hpp
+++ b/inference-engine/thirdparty/clDNN/common/khronos_ocl_clhpp/cl2_ext.hpp
@@ -30,7 +30,7 @@ typedef cl_d3d11_device_set_khr cl_device_set_intel;
typedef cl_va_api_device_source_intel cl_device_source_intel;
typedef cl_va_api_device_set_intel cl_device_set_intel;
#endif
-#include <CL/cl_intel_planar_yuv.h>
+#include <CL/cl_ext_intel.h>
namespace cl {
typedef CL_API_ENTRY cl_int(CL_API_CALL *PFN_clEnqueueAcquireMediaSurfacesINTEL)(
diff --git a/inference-engine/tools/compile_tool/CMakeLists.txt b/inference-engine/tools/compile_tool/CMakeLists.txt
index 25168bac..1c57116f 100644
--- a/inference-engine/tools/compile_tool/CMakeLists.txt
+++ b/inference-engine/tools/compile_tool/CMakeLists.txt
@@ -48,5 +48,5 @@ add_cpplint_target(${TARGET_NAME}_cpplint FOR_TARGETS ${TARGET_NAME})
# install
install(TARGETS compile_tool
- RUNTIME DESTINATION ${IE_CPACK_LIBRARY_PATH}
+ RUNTIME DESTINATION bin
COMPONENT core)
diff --git a/inference-engine/tools/vpu/vpu_compile/CMakeLists.txt b/inference-engine/tools/vpu/vpu_compile/CMakeLists.txt
index 4123de6f..52179fac 100644
--- a/inference-engine/tools/vpu/vpu_compile/CMakeLists.txt
+++ b/inference-engine/tools/vpu/vpu_compile/CMakeLists.txt
@@ -50,5 +50,5 @@ add_cpplint_target(${TARGET_NAME}_cpplint FOR_TARGETS ${TARGET_NAME})
# install
install(TARGETS ${TARGET_NAME}
- RUNTIME DESTINATION ${IE_CPACK_LIBRARY_PATH}
- COMPONENT myriad)
\ No newline at end of file
+ RUNTIME DESTINATION bin
+ COMPONENT myriad)
diff --git a/inference-engine/tools/vpu/vpu_perfcheck/CMakeLists.txt b/inference-engine/tools/vpu/vpu_perfcheck/CMakeLists.txt
index a7a801d4..b8f9e26f 100644
--- a/inference-engine/tools/vpu/vpu_perfcheck/CMakeLists.txt
+++ b/inference-engine/tools/vpu/vpu_perfcheck/CMakeLists.txt
@@ -55,6 +55,6 @@ if(ENABLE_MYRIAD)
add_perfcheck_target(myriad_perfcheck myriadPlugin)
install(TARGETS myriad_perfcheck
- RUNTIME DESTINATION ${IE_CPACK_LIBRARY_PATH}
+ RUNTIME DESTINATION bin
COMPONENT myriad)
endif()
--
2.25.2

View File

@ -0,0 +1,45 @@
From 5d0f3782ba264880b3bb5b96b6d78e2581aa6efd Mon Sep 17 00:00:00 2001
From: Anuj Mittal <anuj.mittal@intel.com>
Date: Tue, 9 Jun 2020 11:35:59 +0800
Subject: [PATCH] don't install licenses and version
Upstream-Status: Inappropriate
Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
---
CMakeLists.txt | 13 ++-----------
1 file changed, 2 insertions(+), 11 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index c347cb465d..d0ec643eb0 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -641,7 +641,7 @@ if (NGRAPH_EXPORT_TARGETS_ENABLE)
install(EXPORT ngraphTargets
FILE ngraphTargets.cmake
NAMESPACE ngraph::
- DESTINATION ${NGRAPH_COMPONENT_PREFIX}cmake
+ DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake
COMPONENT ngraph)
configure_package_config_file(${CMAKE_CURRENT_SOURCE_DIR}/cmake/share/ngraphConfig.cmake.in
@@ -654,15 +654,6 @@ if (NGRAPH_EXPORT_TARGETS_ENABLE)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/ngraphConfig.cmake
${CMAKE_CURRENT_BINARY_DIR}/ngraphConfigVersion.cmake
- DESTINATION ${NGRAPH_COMPONENT_PREFIX}cmake
+ DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake
COMPONENT ngraph)
endif()
-
-install(DIRECTORY
- ${CMAKE_CURRENT_SOURCE_DIR}/licenses
- DESTINATION "${NGRAPH_COMPONENT_PREFIX}."
- COMPONENT ngraph
-)
-
-install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/LICENSE DESTINATION "${NGRAPH_COMPONENT_PREFIX}." COMPONENT ngraph)
-install(FILES ${CMAKE_CURRENT_BINARY_DIR}/VERSION DESTINATION "${NGRAPH_COMPONENT_PREFIX}." COMPONENT ngraph)
--
2.25.4

View File

@ -0,0 +1,206 @@
From e7730e68795c8ed0b9e1772ddc21ec931da462d0 Mon Sep 17 00:00:00 2001
From: Anuj Mittal <anuj.mittal@intel.com>
Date: Wed, 10 Jun 2020 09:43:55 +0800
Subject: [PATCH 1/5] inference-engine: use system installed packages
Use installed versions of pugixml, ade, protobuf and tbb.
Upstream-Status: Pending
Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
---
cmake/dependencies.cmake | 17 --------------
inference-engine/cmake/ie_parallel.cmake | 10 ++-------
.../src/inference_engine/CMakeLists.txt | 22 +------------------
.../src/legacy_api/CMakeLists.txt | 3 +--
.../src/vpu/graph_transformer/CMakeLists.txt | 1 -
.../common_test_utils/CMakeLists.txt | 3 +--
.../tests_deprecated/helpers/CMakeLists.txt | 1 -
inference-engine/thirdparty/CMakeLists.txt | 11 +---------
8 files changed, 6 insertions(+), 62 deletions(-)
diff --git a/cmake/dependencies.cmake b/cmake/dependencies.cmake
index 2a5a74db..9cc9a6c9 100644
--- a/cmake/dependencies.cmake
+++ b/cmake/dependencies.cmake
@@ -13,25 +13,8 @@ if(CMAKE_CROSSCOMPILING)
set(protoc_version "3.7.1")
if(CMAKE_HOST_SYSTEM_NAME MATCHES Linux)
- RESOLVE_DEPENDENCY(SYSTEM_PROTOC_ROOT
- ARCHIVE_LIN "protoc-${protoc_version}-linux-x86_64.tar.gz"
- TARGET_PATH "${TEMP}/protoc-${protoc_version}-linux-x86_64")
- debug_message(STATUS "host protoc-${protoc_version} root path = " ${SYSTEM_PROTOC_ROOT})
else()
message(FATAL_ERROR "Unsupported host system (${CMAKE_HOST_SYSTEM_NAME}) and arch (${CMAKE_HOST_SYSTEM_PROCESSOR}) for cross-compilation")
endif()
- reset_deps_cache(SYSTEM_PROTOC)
-
- message("${SYSTEM_PROTOC_ROOT}/bin")
- find_program(
- SYSTEM_PROTOC
- NAMES protoc
- PATHS "${SYSTEM_PROTOC_ROOT}/bin"
- NO_DEFAULT_PATH)
- if(NOT SYSTEM_PROTOC)
- message(FATAL_ERROR "[ONNX IMPORTER] Missing host protoc binary")
- endif()
-
- update_deps_cache(SYSTEM_PROTOC "${SYSTEM_PROTOC}" "Path to host protoc for ONNX Importer")
endif()
diff --git a/inference-engine/cmake/ie_parallel.cmake b/inference-engine/cmake/ie_parallel.cmake
index 0f3c41e0..b3b2dfda 100644
--- a/inference-engine/cmake/ie_parallel.cmake
+++ b/inference-engine/cmake/ie_parallel.cmake
@@ -48,14 +48,8 @@ function(set_ie_threading_interface_for TARGET_NAME)
set(IE_THREAD_DEFINE "IE_THREAD_SEQ")
if (THREADING STREQUAL "TBB" OR THREADING STREQUAL "TBB_AUTO")
- find_package(TBB COMPONENTS tbb tbbmalloc)
- if (TBB_FOUND)
- set(IE_THREAD_DEFINE "IE_THREAD_TBB")
- ie_target_link_libraries(${TARGET_NAME} ${LINK_TYPE} ${TBB_IMPORTED_TARGETS})
- else ()
- ext_message(WARNING "TBB was not found by the configured TBB_DIR path. \
- SEQ method will be used for ${TARGET_NAME}")
- endif ()
+ set(IE_THREAD_DEFINE "IE_THREAD_TBB")
+ target_link_libraries(${TARGET_NAME} INTERFACE tbb tbbmalloc)
elseif (THREADING STREQUAL "OMP")
if (WIN32)
set(omp_lib_name libiomp5md)
diff --git a/inference-engine/src/inference_engine/CMakeLists.txt b/inference-engine/src/inference_engine/CMakeLists.txt
index c8cd4b27..d98ba55d 100644
--- a/inference-engine/src/inference_engine/CMakeLists.txt
+++ b/inference-engine/src/inference_engine/CMakeLists.txt
@@ -117,8 +117,7 @@ add_library(${TARGET_NAME}_obj OBJECT
target_compile_definitions(${TARGET_NAME}_obj PRIVATE IMPLEMENT_INFERENCE_ENGINE_API)
-target_include_directories(${TARGET_NAME}_obj SYSTEM PRIVATE $<TARGET_PROPERTY:ngraph::ngraph,INTERFACE_INCLUDE_DIRECTORIES>
- $<TARGET_PROPERTY:pugixml,INTERFACE_INCLUDE_DIRECTORIES>)
+target_include_directories(${TARGET_NAME}_obj SYSTEM PRIVATE $<TARGET_PROPERTY:ngraph::ngraph,INTERFACE_INCLUDE_DIRECTORIES>)
target_include_directories(${TARGET_NAME}_obj PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}"
$<TARGET_PROPERTY:${TARGET_NAME}_plugin_api,INTERFACE_INCLUDE_DIRECTORIES>)
@@ -257,25 +256,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})
diff --git a/inference-engine/src/legacy_api/CMakeLists.txt b/inference-engine/src/legacy_api/CMakeLists.txt
index d54c5906..90920ab3 100644
--- a/inference-engine/src/legacy_api/CMakeLists.txt
+++ b/inference-engine/src/legacy_api/CMakeLists.txt
@@ -33,8 +33,7 @@ target_compile_definitions(${TARGET_NAME}_obj PRIVATE IMPLEMENT_INFERENCE_ENGINE
target_include_directories(${TARGET_NAME}_obj PRIVATE ${PUBLIC_HEADERS_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/src
$<TARGET_PROPERTY:inference_engine_plugin_api,INTERFACE_INCLUDE_DIRECTORIES>
- $<TARGET_PROPERTY:ngraph::ngraph,INTERFACE_INCLUDE_DIRECTORIES>
- $<TARGET_PROPERTY:pugixml,INTERFACE_INCLUDE_DIRECTORIES>)
+ $<TARGET_PROPERTY:ngraph::ngraph,INTERFACE_INCLUDE_DIRECTORIES>)
function(nn_builder_disable_warnings)
disable_deprecated_warnings()
diff --git a/inference-engine/src/vpu/graph_transformer/CMakeLists.txt b/inference-engine/src/vpu/graph_transformer/CMakeLists.txt
index 982d3c7f..db881246 100644
--- a/inference-engine/src/vpu/graph_transformer/CMakeLists.txt
+++ b/inference-engine/src/vpu/graph_transformer/CMakeLists.txt
@@ -35,7 +35,6 @@ function(add_graph_transformer_target TARGET_NAME STATIC_IE)
target_include_directories(${TARGET_NAME}
SYSTEM PUBLIC
- $<TARGET_PROPERTY:pugixml,INTERFACE_INCLUDE_DIRECTORIES>
$<TARGET_PROPERTY:inference_engine_plugin_api,INTERFACE_INCLUDE_DIRECTORIES>
"${IE_MAIN_SOURCE_DIR}/thirdparty/movidius/mvnc/include")
diff --git a/inference-engine/tests/ie_test_utils/common_test_utils/CMakeLists.txt b/inference-engine/tests/ie_test_utils/common_test_utils/CMakeLists.txt
index 8a4ffd42..5bee450a 100644
--- a/inference-engine/tests/ie_test_utils/common_test_utils/CMakeLists.txt
+++ b/inference-engine/tests/ie_test_utils/common_test_utils/CMakeLists.txt
@@ -28,7 +28,6 @@ else ()
endif ()
list(APPEND EXPORT_DEPENDENCIES
- ${PUGI}
${NGRAPH_LIBRARIES}
gtest
gtest_main
@@ -70,7 +69,6 @@ function(add_common_utils ADD_TARGET_NAME)
PUBLIC
${IE_TESTS_ROOT}/ie_test_utils
$<TARGET_PROPERTY:inference_engine,INTERFACE_INCLUDE_DIRECTORIES>
- $<TARGET_PROPERTY:pugixml,INTERFACE_INCLUDE_DIRECTORIES>
PRIVATE
$<TARGET_PROPERTY:inference_engine_plugin_api,INTERFACE_INCLUDE_DIRECTORIES>
)
@@ -80,6 +78,7 @@ function(add_common_utils ADD_TARGET_NAME)
target_link_libraries(${ADD_TARGET_NAME}
PUBLIC
${EXPORT_DEPENDENCIES}
+ pugixml
)
endfunction()
diff --git a/inference-engine/tests_deprecated/helpers/CMakeLists.txt b/inference-engine/tests_deprecated/helpers/CMakeLists.txt
index 14265fa9..2482be78 100644
--- a/inference-engine/tests_deprecated/helpers/CMakeLists.txt
+++ b/inference-engine/tests_deprecated/helpers/CMakeLists.txt
@@ -23,7 +23,6 @@ function(add_helpers target_name)
target_include_directories(${target_name} PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}"
"${IE_MAIN_SOURCE_DIR}/src/inference_engine"
$<TARGET_PROPERTY:inference_engine_lp_transformations,INTERFACE_INCLUDE_DIRECTORIES>
- $<TARGET_PROPERTY:pugixml,INTERFACE_INCLUDE_DIRECTORIES>
"${IE_MAIN_SOURCE_DIR}/src/vpu/"
PRIVATE "${CMAKE_CURRENT_BINARY_DIR}")
diff --git a/inference-engine/thirdparty/CMakeLists.txt b/inference-engine/thirdparty/CMakeLists.txt
index ebf32c71..56b6bcb0 100644
--- a/inference-engine/thirdparty/CMakeLists.txt
+++ b/inference-engine/thirdparty/CMakeLists.txt
@@ -35,19 +35,10 @@ function(build_with_lto)
add_subdirectory(clDNN)
endif()
- add_subdirectory(pugixml)
add_subdirectory(stb_lib)
- add_subdirectory(ade)
add_subdirectory(fluid/modules/gapi)
- # developer package
-
- target_include_directories(pugixml INTERFACE "$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/pugixml/src>")
-
- ie_developer_export_targets(ade fluid pugixml)
- if(TARGET pugixml_mt)
- ie_developer_export_targets(pugixml_mt)
- endif()
+ ie_developer_export_targets(fluid)
endfunction()
build_with_lto()
--
2.25.4

View File

@ -0,0 +1,30 @@
From 65014a2703a6a3892fdebc86fe1c5a3a589dbf56 Mon Sep 17 00:00:00 2001
From: Anuj Mittal <anuj.mittal@intel.com>
Date: Wed, 10 Jun 2020 09:45:48 +0800
Subject: [PATCH 2/5] cldNN: disable Werror
Don't treat warnings as errors. This just leads to failures every time
we upgrade the compiler.
Upstream-Status: Inappropriate
Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
---
inference-engine/thirdparty/clDNN/CMakeLists.txt | 1 -
1 file changed, 1 deletion(-)
diff --git a/inference-engine/thirdparty/clDNN/CMakeLists.txt b/inference-engine/thirdparty/clDNN/CMakeLists.txt
index 4b444eca..8610b9b8 100644
--- a/inference-engine/thirdparty/clDNN/CMakeLists.txt
+++ b/inference-engine/thirdparty/clDNN/CMakeLists.txt
@@ -770,7 +770,6 @@ foreach(__CLDNN_CompilerFlagName IN ITEMS "CMAKE_CXX_FLAGS" "CMAKE_C_FLAGS")
MultiProcessorCompilation
DeadCodeEliminate
ExtensionsEnabled
- TreatWarnAsErrorEnabled
WarnLevel4
NoFastMath
StackProtector
--
2.25.4

View File

@ -0,0 +1,204 @@
From 0838608d9c2b09a845efbdde88a09e151ac9ff7d Mon Sep 17 00:00:00 2001
From: Anuj Mittal <anuj.mittal@intel.com>
Date: Thu, 11 Jun 2020 14:24:04 +0800
Subject: [PATCH] fixes
Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
---
CMakeLists.txt | 14 --------------
cmake/developer_package.cmake | 10 ++++++----
inference-engine/samples/CMakeLists.txt | 8 +++-----
.../samples/common/format_reader/CMakeLists.txt | 2 ++
.../src/inference_engine/CMakeLists.txt | 4 ++--
.../src/vpu/myriad_plugin/CMakeLists.txt | 2 +-
inference-engine/tests/unit/cpu/CMakeLists.txt | 4 +++-
.../tests/unit/inference_engine/CMakeLists.txt | 4 +++-
inference-engine/tests/unit/vpu/CMakeLists.txt | 4 +++-
9 files changed, 23 insertions(+), 29 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 902d3289..f1bfb3f5 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -123,12 +123,8 @@ add_subdirectory(docs)
# install setupvars
-ie_cpack_add_component(setupvars REQUIRED)
if(UNIX)
- install(PROGRAMS scripts/setupvars/setupvars.sh
- DESTINATION bin
- COMPONENT setupvars)
elseif(WIN32)
install(PROGRAMS scripts/setupvars/setupvars.bat
DESTINATION bin
@@ -138,22 +134,12 @@ endif()
# install install_dependencies
if(UNIX)
- ie_cpack_add_component(install_dependencies REQUIRED)
- install(DIRECTORY scripts/install_dependencies/
- DESTINATION install_dependencies
- COMPONENT install_dependencies)
endif()
# install files for demo
-ie_cpack_add_component(demo_scripts REQUIRED DEPENDS core)
if(UNIX)
- install(DIRECTORY scripts/demo/
- DESTINATION deployment_tools/demo
- COMPONENT demo_scripts
- USE_SOURCE_PERMISSIONS
- PATTERN *.bat EXCLUDE)
elseif(WIN32)
install(DIRECTORY scripts/demo/
DESTINATION deployment_tools/demo
diff --git a/cmake/developer_package.cmake b/cmake/developer_package.cmake
index 23cd9b2d..24c33711 100644
--- a/cmake/developer_package.cmake
+++ b/cmake/developer_package.cmake
@@ -7,7 +7,9 @@ set(CMAKE_MODULE_PATH "${OpenVINO_MAIN_SOURCE_DIR}/cmake/download" ${CMAKE_MODUL
include(CPackComponent)
unset(IE_CPACK_COMPONENTS_ALL CACHE)
-set(IE_CPACK_IE_DIR deployment_tools/inference_engine)
+if (NOT DEFINED IE_CPACK_IE_DIR)
+ set(IE_CPACK_IE_DIR deployment_tools/inference_engine)
+endif()
# Search packages for the host system instead of packages for the target system
# in case of cross compilation these macros should be defined by the toolchain file
@@ -40,8 +42,8 @@ function(ie_cpack_set_library_dir)
set(IE_CPACK_RUNTIME_PATH ${IE_CPACK_IE_DIR}/bin/${ARCH}/${CMAKE_BUILD_TYPE} PARENT_SCOPE)
set(IE_CPACK_ARCHIVE_PATH ${IE_CPACK_IE_DIR}/lib/${ARCH}/${CMAKE_BUILD_TYPE} PARENT_SCOPE)
else()
- set(IE_CPACK_LIBRARY_PATH ${IE_CPACK_IE_DIR}/lib/${ARCH} PARENT_SCOPE)
- set(IE_CPACK_RUNTIME_PATH ${IE_CPACK_IE_DIR}/lib/${ARCH} PARENT_SCOPE)
+ set(IE_CPACK_LIBRARY_PATH ${CMAKE_INSTALL_LIBDIR} PARENT_SCOPE)
+ set(IE_CPACK_RUNTIME_PATH ${CMAKE_INSTALL_BINDIR} PARENT_SCOPE)
set(IE_CPACK_ARCHIVE_PATH ${IE_CPACK_IE_DIR}/lib/${ARCH} PARENT_SCOPE)
endif()
endfunction()
@@ -143,7 +145,7 @@ if("${CMAKE_BUILD_TYPE}" STREQUAL "")
set(CMAKE_BUILD_TYPE "Release")
endif()
-set(OUTPUT_ROOT ${OpenVINO_MAIN_SOURCE_DIR})
+set(OUTPUT_ROOT ${CMAKE_CURRENT_BINARY_DIR})
# Enable postfixes for Debug/Release builds
set(IE_DEBUG_POSTFIX_WIN "d")
diff --git a/inference-engine/samples/CMakeLists.txt b/inference-engine/samples/CMakeLists.txt
index 033a8aab..4a871ca6 100644
--- a/inference-engine/samples/CMakeLists.txt
+++ b/inference-engine/samples/CMakeLists.txt
@@ -28,7 +28,7 @@ endif()
if(IE_MAIN_SOURCE_DIR)
# in case if samples are built from IE repo
- set(IE_MAIN_SAMPLES_DIR ${OpenVINO_MAIN_SOURCE_DIR})
+ set(IE_MAIN_SAMPLES_DIR ${CMAKE_BINARY_DIR})
# hint for find_package(InferenceEngine in the samples folder)
set(InferenceEngine_DIR "${CMAKE_BINARY_DIR}")
else()
@@ -110,10 +110,6 @@ set (HAVE_INTTYPES_H 1)
set (INTTYPES_FORMAT C99)
set (BUILD_TESTING OFF)
-if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/gflags")
- add_subdirectory(thirdparty/gflags)
-endif()
-
if (CMAKE_CXX_COMPILER_ID STREQUAL GNU)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall")
endif()
@@ -222,6 +218,8 @@ macro(ie_add_sample)
if(COMMAND add_cpplint_target AND NOT IE_SAMPLE_EXCLUDE_CPPLINT)
add_cpplint_target(${IE_SAMPLE_NAME}_cpplint FOR_TARGETS ${IE_SAMPLE_NAME})
endif()
+
+ install(TARGETS ${IE_SAMPLE_NAME} DESTINATION bin)
endmacro()
# collect all samples subdirectories
diff --git a/inference-engine/samples/common/format_reader/CMakeLists.txt b/inference-engine/samples/common/format_reader/CMakeLists.txt
index 6d935135..fe12eeb7 100644
--- a/inference-engine/samples/common/format_reader/CMakeLists.txt
+++ b/inference-engine/samples/common/format_reader/CMakeLists.txt
@@ -40,3 +40,5 @@ target_include_directories(${TARGET_NAME} PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}"
"${CMAKE_CURRENT_SOURCE_DIR}/..")
set_target_properties(${TARGET_NAME} PROPERTIES COMPILE_PDB_NAME ${TARGET_NAME})
+
+install(TARGETS ${TARGET_NAME} DESTINATION ${CMAKE_INSTALL_LIBDIR})
diff --git a/inference-engine/src/inference_engine/CMakeLists.txt b/inference-engine/src/inference_engine/CMakeLists.txt
index c8cd4b27..babe8ff5 100644
--- a/inference-engine/src/inference_engine/CMakeLists.txt
+++ b/inference-engine/src/inference_engine/CMakeLists.txt
@@ -289,8 +289,8 @@ install(TARGETS ${TARGET_NAME} ${TARGET_NAME}_nn_builder
install(FILES "${OpenVINO_BINARY_DIR}/share/ie_parallel.cmake"
"${OpenVINO_BINARY_DIR}/share/InferenceEngineConfig.cmake"
"${OpenVINO_BINARY_DIR}/share/InferenceEngineConfig-version.cmake"
- DESTINATION ${IE_CPACK_IE_DIR}/share
+ DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/InferenceEngine
COMPONENT core)
install(FILES $<TARGET_FILE_DIR:${TARGET_NAME}>/plugins.xml
- DESTINATION ${IE_CPACK_RUNTIME_PATH}
+ DESTINATION ${CMAKE_INSTALL_LIBDIR}
COMPONENT core)
diff --git a/inference-engine/src/vpu/myriad_plugin/CMakeLists.txt b/inference-engine/src/vpu/myriad_plugin/CMakeLists.txt
index b35910f6..304d6d40 100644
--- a/inference-engine/src/vpu/myriad_plugin/CMakeLists.txt
+++ b/inference-engine/src/vpu/myriad_plugin/CMakeLists.txt
@@ -48,5 +48,5 @@ target_link_libraries(${TARGET_NAME}
# install
install(FILES ${IE_MAIN_SOURCE_DIR}/thirdparty/movidius/mvnc/src/97-myriad-usbboot.rules
- DESTINATION ${IE_CPACK_IE_DIR}/external
+ DESTINATION ${CMAKE_INSTALL_SYSCONFDIR}/udev/rules.d
COMPONENT myriad)
diff --git a/inference-engine/tests/unit/cpu/CMakeLists.txt b/inference-engine/tests/unit/cpu/CMakeLists.txt
index 9ec5ad02..45c62571 100644
--- a/inference-engine/tests/unit/cpu/CMakeLists.txt
+++ b/inference-engine/tests/unit/cpu/CMakeLists.txt
@@ -22,4 +22,6 @@ addIeTargetTest(
ADD_CPPLINT
LABELS
CPU
-)
\ No newline at end of file
+)
+
+install(TARGETS ${TARGET_NAME} DESTINATION ${CMAKE_INSTALL_BINDIR})
diff --git a/inference-engine/tests/unit/inference_engine/CMakeLists.txt b/inference-engine/tests/unit/inference_engine/CMakeLists.txt
index 55e52b59..9d383d74 100644
--- a/inference-engine/tests/unit/inference_engine/CMakeLists.txt
+++ b/inference-engine/tests/unit/inference_engine/CMakeLists.txt
@@ -12,4 +12,6 @@ addIeTargetTest(
ADD_CPPLINT
LABELS
INFERENCE_ENGINE
-)
\ No newline at end of file
+)
+
+install(TARGETS ${TARGET_NAME} DESTINATION ${CMAKE_INSTALL_BINDIR})
diff --git a/inference-engine/tests/unit/vpu/CMakeLists.txt b/inference-engine/tests/unit/vpu/CMakeLists.txt
index 39fb1d5a..5ce82b5f 100644
--- a/inference-engine/tests/unit/vpu/CMakeLists.txt
+++ b/inference-engine/tests/unit/vpu/CMakeLists.txt
@@ -23,4 +23,6 @@ addIeTargetTest(
LABELS
VPU
MYRIAD
-)
\ No newline at end of file
+)
+
+install(TARGETS ${TARGET_NAME} DESTINATION ${CMAKE_INSTALL_BINDIR})
--
2.25.4

View File

@ -0,0 +1,35 @@
From deec5feef34f86eb5616252e2e5b685b6555f561 Mon Sep 17 00:00:00 2001
From: Anuj Mittal <anuj.mittal@intel.com>
Date: Wed, 10 Jun 2020 09:49:03 +0800
Subject: [PATCH 4/5] fix compilation errors
Fixes errors like:
build/tmp/work/skylake-64-poky-linux/dldt-inference-engine/2020r1-r0/git/inference-engine/thirdparty/clDNN/kernel_selector/common/tensor_type.h:295:28:
error: 'runtime_error' is not a member of 'std'
295 | throw std::runtime_error("Tensor pitches didn't
set correctly");
|
Upstream-Status: Pending
Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
---
.../thirdparty/clDNN/kernel_selector/common/tensor_type.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/inference-engine/thirdparty/clDNN/kernel_selector/common/tensor_type.h b/inference-engine/thirdparty/clDNN/kernel_selector/common/tensor_type.h
index 7f05b67f..641a4c9b 100644
--- a/inference-engine/thirdparty/clDNN/kernel_selector/common/tensor_type.h
+++ b/inference-engine/thirdparty/clDNN/kernel_selector/common/tensor_type.h
@@ -25,6 +25,7 @@
#include <array>
#include <string>
#include <utility>
+#include <stdexcept>
namespace kernel_selector {
#define KERNEL_SELECTOR_TENSOR_DIM_MAX 9
--
2.25.4

View File

@ -0,0 +1,52 @@
From 0d0810481186fc443fe65a6119ddcc71ba21e814 Mon Sep 17 00:00:00 2001
From: Anuj Mittal <anuj.mittal@intel.com>
Date: Wed, 10 Jun 2020 09:50:19 +0800
Subject: [PATCH 5/5] cldnn: fix inclusion of headers
Upstream-Status: Inappropriate
Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
---
inference-engine/include/gpu/gpu_ocl_wrapper.hpp | 2 +-
inference-engine/src/cldnn_engine/CMakeLists.txt | 1 +
.../thirdparty/clDNN/common/khronos_ocl_clhpp/cl2_ext.hpp | 2 +-
3 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/inference-engine/include/gpu/gpu_ocl_wrapper.hpp b/inference-engine/include/gpu/gpu_ocl_wrapper.hpp
index fce7d8f1..827e5764 100644
--- a/inference-engine/include/gpu/gpu_ocl_wrapper.hpp
+++ b/inference-engine/include/gpu/gpu_ocl_wrapper.hpp
@@ -21,4 +21,4 @@
# pragma GCC system_header
#endif
-#include <CL/cl2.hpp>
+#include <cl2.hpp>
diff --git a/inference-engine/src/cldnn_engine/CMakeLists.txt b/inference-engine/src/cldnn_engine/CMakeLists.txt
index de56ed8e..c81453ab 100644
--- a/inference-engine/src/cldnn_engine/CMakeLists.txt
+++ b/inference-engine/src/cldnn_engine/CMakeLists.txt
@@ -31,6 +31,7 @@ set (CLDNN_TOP_FOLDER ${IE_MAIN_SOURCE_DIR}/thirdparty/clDNN)
target_include_directories(${TARGET_NAME} PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}
${CLDNN__IOCL_ICD_INCDIRS}
+ ${CLDNN_TOP_FOLDER}/common/khronos_ocl_clhpp
${CLDNN_TOP_FOLDER})
# copy default global xml file describing the custom kernels and the *.cl files
diff --git a/inference-engine/thirdparty/clDNN/common/khronos_ocl_clhpp/cl2_ext.hpp b/inference-engine/thirdparty/clDNN/common/khronos_ocl_clhpp/cl2_ext.hpp
index 8f668b18..a1d24438 100644
--- a/inference-engine/thirdparty/clDNN/common/khronos_ocl_clhpp/cl2_ext.hpp
+++ b/inference-engine/thirdparty/clDNN/common/khronos_ocl_clhpp/cl2_ext.hpp
@@ -29,7 +29,7 @@ typedef cl_d3d11_device_set_khr cl_device_set_intel;
typedef cl_va_api_device_source_intel cl_device_source_intel;
typedef cl_va_api_device_set_intel cl_device_set_intel;
#endif
-#include <CL/cl_intel_planar_yuv.h>
+#include <CL/cl_ext_intel.h>
#include "cl_intel_usm_defs.h"
#include <memory>
--
2.25.4

View File

@ -1,13 +1,8 @@
#!/bin/sh
# InferenceEngineUnitTests requires libmock_engine.so, since they are
# installed in the same directory we will need to set LD_LIBRARY_PATH
# so that libmock_engine.so is picked up correctly. We also assume that
# this script is only execute within the same directory where it is
# installed.
export LD_LIBRARY_PATH=.
./InferenceEngineUnitTests |sed \
-e 's|\[.*OK.*\]\(.*\)|PASS:\1|' \
-e 's|\[.*FAILED.*\]\(.*\)|FAIL:\1|'
for i in cpu ie vpu
do
./$i"UnitTests" |sed \
-e 's|\[.*OK.*\]\(.*\)|PASS:\1|' \
-e 's|\[.*FAILED.*\]\(.*\)|FAIL:\1|'
done

View File

@ -4,27 +4,33 @@ DESCRIPTION = "This toolkit allows developers to deploy pre-trained \
deep learning models through a high-level C++ Inference Engine API \
integrated with application logic."
SRC_URI = "git://github.com/opencv/dldt.git;protocol=git;branch=2020 \
https://download.01.org/opencv/2020/openvinotoolkit/2020.1/inference_engine/firmware_usb-ma2450_942_R10.15.zip;name=ma2450 \
https://download.01.org/opencv/2020/openvinotoolkit/2020.1/inference_engine/firmware_pcie-ma248x_942_R10.15.zip;name=ma248x \
https://download.01.org/opencv/2020/openvinotoolkit/2020.1/inference_engine/firmware_usb-ma2x8x_942_R10.15.zip;name=ma2x8x \
file://0001-Installation-and-build-fixes.patch \
SRC_URI = "gitsm://github.com/openvinotoolkit/openvino.git;protocol=git;branch=releases/2020/3 \
https://download.01.org/opencv/2020/openvinotoolkit/2020.3/inference_engine/firmware_usb-ma2450_1119.zip;name=ma2450 \
https://download.01.org/opencv/2020/openvinotoolkit/2020.3/inference_engine/firmware_pcie-ma248x_1119.zip;name=ma248x \
https://download.01.org/opencv/2020/openvinotoolkit/2020.3/inference_engine/firmware_usb-ma2x8x_1119.zip;name=ma2x8x \
file://0001-inference-engine-use-system-installed-packages.patch \
file://0002-cldNN-disable-Werror.patch \
file://0003-inference-engine-installation-fixes.patch \
file://0004-fix-compilation-errors.patch \
file://0005-cldnn-fix-inclusion-of-headers.patch \
file://0001-mkldnn_memory_solver.hpp-include-stdint.h-to-avoid-b.patch \
file://0001-dont-install-licenses-and-version-file.patch;patchdir=ngraph \
file://run-ptest \
"
SRCREV = "b2140c083a068a63591e8c2e9b5f6b240790519d"
SRCREV = "2fe9b1523058e282ad374db7dc1b3538c7d2dd27"
SRC_URI[ma2450.sha256sum] = "32747515f0a387a8f878a88670aefe2788132fa24828b3775df791144627d9f6"
SRC_URI[ma248x.sha256sum] = "f32cd6396d0e6f0e4b24c8ee15e9f0b1b493ebbfc0f03371ca732f75b763d4a2"
SRC_URI[ma2x8x.sha256sum] = "c00f77692bfdccf92f32233b3dd1189f51dee73c15d79f35a612c7ba841d9c8d"
SRC_URI[ma2450.sha256sum] = "9b8f61954751343995dde9d714134e5082dbaadffb0c7c33d41ce84c1296a20e"
SRC_URI[ma248x.sha256sum] = "338940db127b16231e0afa948c83ed576458b130dd2a0a593c5edb29d9637f35"
SRC_URI[ma2x8x.sha256sum] = "94cd485105de47ef3f747baec1261a1254ddf30e308807948dd8b0176ecdfebf"
LICENSE = "Apache-2.0 & ISSL & MIT"
LIC_FILES_CHKSUM = "file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327 \
file://inference-engine/thirdparty/mkl-dnn/LICENSE;md5=afa44a3d001cc203032135324f9636b7 \
file://inference-engine/tests/libs/gtest/googlemock/LICENSE;md5=cbbd27594afd089daa160d3a16dd515a \
file://inference-engine/thirdparty/mkl-dnn/src/cpu/xbyak/COPYRIGHT;md5=3b9bf048d063d54cdb28964db558bcc7 \
file://inference-engine/thirdparty/clDNN/common/khronos_ocl_clhpp/LICENSE.txt;md5=88b295a48d2b3244ba65d3c055472c8a \
file://inference-engine/tests/ie_test_utils/common_test_utils/gtest/googlemock/LICENSE;md5=cbbd27594afd089daa160d3a16dd515a \
file://inference-engine/tests/ie_test_utils/common_test_utils/gtest/googletest/LICENSE;md5=cbbd27594afd089daa160d3a16dd515a \
"
LICENSE_${PN}-vpu-firmware = "ISSL"
@ -37,7 +43,7 @@ EXTRA_OECMAKE += " \
-DENABLE_PLUGIN_RPATH=0 \
-DENABLE_GNA=0 \
-DPYTHON_EXECUTABLE=${PYTHON} \
-DCMAKE_BUILD_TYPE=DebugWithRelInfo \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DTHREADING=TBB -DTBB_DIR=${STAGING_LIBDIR} \
-DENABLE_TESTS="${@bb.utils.contains('PTEST_ENABLED', '1', '1', '0', d)}" \
-DBUILD_GMOCK=1 \
@ -48,13 +54,21 @@ EXTRA_OECMAKE += " \
-DENABLE_NGRAPH=ON \
-DENABLE_MKL_DNN=ON \
-DIE_CPACK_IE_DIR=${prefix} \
-DNGRAPH_UNIT_TEST_ENABLE=FALSE \
-DNGRAPH_TEST_UTIL_ENABLE=FALSE \
-DNGRAPH_ONNX_IMPORT_ENABLE=OFF \
-DNGRAPH_JSON_ENABLE=FALSE \
-DNGRAPH_NATIVE_ARCH_ENABLE=FALSE \
-DNGRAPH_NOP_ENABLE=FALSE \
-DNGRAPH_GENERIC_CPU_ENABLE=FALSE \
-DTREAT_WARNING_AS_ERROR=FALSE \
"
DEPENDS += "libusb1 \
ade \
opencv \
pugixml \
ngraph \
protobuf-native \
tbb \
${@bb.utils.contains('PTEST_ENABLED', '1', 'gflags', '', d)} \
"
@ -63,7 +77,7 @@ COMPATIBLE_HOST = '(x86_64).*-linux'
COMPATIBLE_HOST_libc-musl = "null"
PACKAGECONFIG ?= "vpu"
PACKAGECONFIG[opencl] = "-DENABLE_CLDNN=1 -DCLDNN__IOCL_ICD_INCDIRS=${STAGING_INCDIR} -DCLDNN__IOCL_ICD_STLDIRS=${STAGING_LIBDIR} -DCLDNN__IOCL_ICD_SHLDIRS=${STAGING_LIBDIR}, -DENABLE_CLDNN=0, opencl-icd-loader libva, intel-compute-runtime"
PACKAGECONFIG[opencl] = "-DENABLE_CLDNN=1 -DCLDNN__IOCL_ICD_INCDIRS=${STAGING_INCDIR} -DCLDNN__IOCL_ICD_STLDIRS=${STAGING_LIBDIR} -DCLDNN__IOCL_ICD_SHLDIRS=${STAGING_LIBDIR}, -DENABLE_CLDNN=0, ocl-icd opencl-headers libva, intel-compute-runtime"
PACKAGECONFIG[python3] = "-DENABLE_PYTHON=ON -DPYTHON_LIBRARY=${PYTHON_LIBRARY} -DPYTHON_INCLUDE_DIR=${PYTHON_INCLUDE_DIR}, -DENABLE_PYTHON=OFF, python3-cython-native, python3 python3-numpy python3-opencv python3-progress python3-cython"
PACKAGECONFIG[vpu] = "-DENABLE_VPU=ON -DVPU_FIRMWARE_USB-MA2450_FILE=../mvnc/usb-ma2450.mvcmd -DVPU_FIRMWARE_USB-MA2X8X_FILE=../mvnc/usb-ma2x8x.mvcmd -DVPU_FIRMWARE_PCIE-MA248X_FILE=../mvnc/pcie-ma248x.mvcmd,-DENABLE_VPU=OFF,,${PN}-vpu-firmware"
PACKAGECONFIG[verbose] = "-DVERBOSE_BUILD=1,-DVERBOSE_BUILD=0"
@ -85,8 +99,10 @@ do_install_append() {
install -d ${D}${PYTHON_SITEPACKAGES_DIR}
mv ${D}${prefix}/python/${PYTHON_DIR}/openvino ${D}${PYTHON_SITEPACKAGES_DIR}/
mv ${D}${prefix}/deployment_tools/tools/benchmark_tool ${D}${PYTHON_SITEPACKAGES_DIR}/openvino/
rm -rf ${D}${prefix}/python
rm -rf ${D}${prefix}/deployment_tools
fi
# Remove the samples source directory. We install the built samples.
@ -98,8 +114,8 @@ do_install_ptest_base_prepend() {
# what ptest helps with, adding the unit tests here as ptest would help.
# Create a dummy Makefile so installation doesn't fail.
touch ${WORKDIR}/Makefile
mv ${D}${bindir}/InferenceEngineUnitTests ${D}${PTEST_PATH}/
mv ${D}${libdir}/libmock_engine.so ${D}${PTEST_PATH}/
mv ${D}${bindir}/*UnitTests ${D}${PTEST_PATH}/
}
# Otherwise e.g. ros-openvino-toolkit-dynamic-vino-sample when using dldt-inference-engine uses dldt-inference-engine WORKDIR