Skip to content

Commit 8ee5f2a

Browse files
committed
Merge pull request opencv#18534 from alalek:build_opencv_winpack_dldt_2021.1.0
2 parents ee76cef + 1546b9b commit 8ee5f2a

8 files changed

+279
-2
lines changed
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
diff --git a/inference-engine/thirdparty/clDNN/kernel_selector/common/tensor_type.h b/inference-engine/thirdparty/clDNN/kernel_selector/common/tensor_type.h
2+
index 3dbdfd0b..6b04b910 100644
3+
--- a/inference-engine/thirdparty/clDNN/kernel_selector/common/tensor_type.h
4+
+++ b/inference-engine/thirdparty/clDNN/kernel_selector/common/tensor_type.h
5+
@@ -15,6 +15,7 @@
6+
7+
#pragma once
8+
9+
+#include <stdexcept>
10+
#include "common_types.h"
11+
#include "common_tools.h"
12+
#include <vector>
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
applyPatch('20200701-dldt-disable-unused-targets.patch')
22
applyPatch('20200413-dldt-pdb.patch')
33
applyPatch('20200604-dldt-disable-multidevice.patch')
4+
applyPatch('20201005-dldt-fix-cldnn-compilation.patch')
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
diff --git a/CMakeLists.txt b/CMakeLists.txt
2+
index 1f981ed2..90eb500a 100644
3+
--- a/CMakeLists.txt
4+
+++ b/CMakeLists.txt
5+
@@ -22,6 +22,9 @@ endif()
6+
7+
project(OpenVINO)
8+
9+
+set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /Zi /FS")
10+
+set(CMAKE_SHARED_LINKER_FLAGS_RELEASE "${CMAKE_SHARED_LINKER_FLAGS_RELEASE} /DEBUG /OPT:REF /OPT:ICF")
11+
+
12+
set(OpenVINO_MAIN_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR})
13+
set(IE_MAIN_SOURCE_DIR ${OpenVINO_MAIN_SOURCE_DIR}/inference-engine)
14+
list(APPEND CMAKE_MODULE_PATH "${OpenVINO_MAIN_SOURCE_DIR}/cmake")
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
diff --git a/inference-engine/src/CMakeLists.txt b/inference-engine/src/CMakeLists.txt
2+
index 0ba0dd78..7d34e7cb 100644
3+
--- a/inference-engine/src/CMakeLists.txt
4+
+++ b/inference-engine/src/CMakeLists.txt
5+
@@ -26,7 +26,7 @@ endif()
6+
7+
add_subdirectory(hetero_plugin)
8+
9+
-add_subdirectory(multi_device)
10+
+#add_subdirectory(multi_device)
11+
12+
add_subdirectory(transformations)
13+
Lines changed: 178 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,178 @@
1+
diff --git a/inference-engine/CMakeLists.txt b/inference-engine/CMakeLists.txt
2+
index 7f45ab02..a7bac7e9 100644
3+
--- a/inference-engine/CMakeLists.txt
4+
+++ b/inference-engine/CMakeLists.txt
5+
@@ -70,7 +70,7 @@ if(ENABLE_TESTS)
6+
add_subdirectory(tests)
7+
endif()
8+
9+
-add_subdirectory(tools)
10+
+#add_subdirectory(tools)
11+
12+
function(ie_build_samples)
13+
# samples should be build with the same flags as from OpenVINO package,
14+
@@ -89,7 +89,7 @@ endfunction()
15+
16+
# gflags and format_reader targets are kept inside of samples directory and
17+
# they must be built even if samples build is disabled (required for tests and tools).
18+
-ie_build_samples()
19+
+#ie_build_samples()
20+
21+
file(GLOB_RECURSE SAMPLES_SOURCES samples/*.cpp samples/*.hpp samples/*.h)
22+
add_cpplint_target(sample_cpplint
23+
@@ -180,7 +180,7 @@ endif()
24+
# Developer package
25+
#
26+
27+
-ie_developer_export_targets(format_reader)
28+
+#ie_developer_export_targets(format_reader)
29+
ie_developer_export_targets(${NGRAPH_LIBRARIES})
30+
31+
# for Template plugin
32+
@@ -188,7 +188,7 @@ if(NGRAPH_INTERPRETER_ENABLE)
33+
ie_developer_export_targets(ngraph_backend interpreter_backend)
34+
endif()
35+
36+
-ie_developer_export()
37+
+#ie_developer_export()
38+
39+
configure_file(
40+
"${IE_MAIN_SOURCE_DIR}/cmake/developer_package_config.cmake.in"
41+
diff --git a/inference-engine/src/inference_engine/CMakeLists.txt b/inference-engine/src/inference_engine/CMakeLists.txt
42+
index 9ab88898..8badb591 100644
43+
--- a/inference-engine/src/inference_engine/CMakeLists.txt
44+
+++ b/inference-engine/src/inference_engine/CMakeLists.txt
45+
@@ -118,7 +118,7 @@ add_cpplint_target(${TARGET_NAME}_plugin_api_cpplint FOR_SOURCES ${plugin_api_sr
46+
47+
# Create common base object library
48+
49+
-add_library(${TARGET_NAME}_common_obj OBJECT
50+
+add_library(${TARGET_NAME}_common_obj OBJECT EXCLUDE_FROM_ALL
51+
${IE_BASE_SOURCE_FILES})
52+
53+
target_compile_definitions(${TARGET_NAME}_common_obj PRIVATE IMPLEMENT_INFERENCE_ENGINE_API)
54+
@@ -132,7 +132,7 @@ target_include_directories(${TARGET_NAME}_common_obj SYSTEM PRIVATE
55+
56+
# Create object library
57+
58+
-add_library(${TARGET_NAME}_obj OBJECT
59+
+add_library(${TARGET_NAME}_obj OBJECT EXCLUDE_FROM_ALL
60+
${LIBRARY_SRC}
61+
${LIBRARY_HEADERS}
62+
${PUBLIC_HEADERS})
63+
@@ -183,7 +183,7 @@ ie_register_plugins(MAIN_TARGET ${TARGET_NAME}
64+
65+
# Static library used for unit tests which are always built
66+
67+
-add_library(${TARGET_NAME}_s STATIC
68+
+add_library(${TARGET_NAME}_s STATIC EXCLUDE_FROM_ALL
69+
$<TARGET_OBJECTS:${TARGET_NAME}_obj>
70+
$<TARGET_OBJECTS:${TARGET_NAME}_common_obj>
71+
$<TARGET_OBJECTS:${TARGET_NAME}_legacy_obj>
72+
diff --git a/inference-engine/src/legacy_api/CMakeLists.txt b/inference-engine/src/legacy_api/CMakeLists.txt
73+
index ed87a073..b30e6671 100644
74+
--- a/inference-engine/src/legacy_api/CMakeLists.txt
75+
+++ b/inference-engine/src/legacy_api/CMakeLists.txt
76+
@@ -26,7 +26,7 @@ endif()
77+
78+
# Create object library
79+
80+
-add_library(${TARGET_NAME}_obj OBJECT
81+
+add_library(${TARGET_NAME}_obj OBJECT EXCLUDE_FROM_ALL
82+
${LIBRARY_SRC}
83+
${PUBLIC_HEADERS})
84+
85+
diff --git a/inference-engine/src/mkldnn_plugin/CMakeLists.txt b/inference-engine/src/mkldnn_plugin/CMakeLists.txt
86+
index 166818cd..6c1e8e36 100644
87+
--- a/inference-engine/src/mkldnn_plugin/CMakeLists.txt
88+
+++ b/inference-engine/src/mkldnn_plugin/CMakeLists.txt
89+
@@ -193,7 +193,7 @@ cross_compiled_file(${TARGET_NAME}
90+
91+
# add test object library
92+
93+
-add_library(${TARGET_NAME}_obj OBJECT ${SOURCES} ${HEADERS})
94+
+add_library(${TARGET_NAME}_obj OBJECT EXCLUDE_FROM_ALL ${SOURCES} ${HEADERS})
95+
96+
target_include_directories(${TARGET_NAME}_obj PRIVATE $<TARGET_PROPERTY:inference_engine_preproc_s,INTERFACE_INCLUDE_DIRECTORIES>
97+
$<TARGET_PROPERTY:inference_engine_lp_transformations,INTERFACE_INCLUDE_DIRECTORIES>
98+
diff --git a/inference-engine/src/preprocessing/CMakeLists.txt b/inference-engine/src/preprocessing/CMakeLists.txt
99+
index f4fed72a..9cedd6b5 100644
100+
--- a/inference-engine/src/preprocessing/CMakeLists.txt
101+
+++ b/inference-engine/src/preprocessing/CMakeLists.txt
102+
@@ -124,7 +124,7 @@ endif()
103+
104+
# Create object library
105+
106+
-add_library(${TARGET_NAME}_obj OBJECT
107+
+add_library(${TARGET_NAME}_obj OBJECT EXCLUDE_FROM_ALL
108+
${LIBRARY_SRC}
109+
${LIBRARY_HEADERS})
110+
111+
@@ -175,7 +175,7 @@ add_cpplint_target(${TARGET_NAME}_cpplint FOR_TARGETS ${TARGET_NAME}
112+
113+
# Static library used for unit tests which are always built
114+
115+
-add_library(${TARGET_NAME}_s STATIC
116+
+add_library(${TARGET_NAME}_s STATIC EXCLUDE_FROM_ALL
117+
$<TARGET_OBJECTS:${TARGET_NAME}_obj>)
118+
119+
set_ie_threading_interface_for(${TARGET_NAME}_s)
120+
diff --git a/inference-engine/src/vpu/common/CMakeLists.txt b/inference-engine/src/vpu/common/CMakeLists.txt
121+
index b291d5b4..74ab8287 100644
122+
--- a/inference-engine/src/vpu/common/CMakeLists.txt
123+
+++ b/inference-engine/src/vpu/common/CMakeLists.txt
124+
@@ -57,7 +57,7 @@ add_common_target("vpu_common_lib" FALSE)
125+
126+
# Unit tests support for graph transformer
127+
if(WIN32)
128+
- add_common_target("vpu_common_lib_test_static" TRUE)
129+
+ #add_common_target("vpu_common_lib_test_static" TRUE)
130+
else()
131+
add_library("vpu_common_lib_test_static" ALIAS "vpu_common_lib")
132+
endif()
133+
diff --git a/inference-engine/src/vpu/graph_transformer/CMakeLists.txt b/inference-engine/src/vpu/graph_transformer/CMakeLists.txt
134+
index a4543745..807b8e36 100644
135+
--- a/inference-engine/src/vpu/graph_transformer/CMakeLists.txt
136+
+++ b/inference-engine/src/vpu/graph_transformer/CMakeLists.txt
137+
@@ -65,7 +65,7 @@ add_graph_transformer_target("vpu_graph_transformer" FALSE)
138+
139+
# Unit tests support for graph transformer
140+
if(WIN32)
141+
- add_graph_transformer_target("vpu_graph_transformer_test_static" TRUE)
142+
+ #add_graph_transformer_target("vpu_graph_transformer_test_static" TRUE)
143+
else()
144+
add_library("vpu_graph_transformer_test_static" ALIAS "vpu_graph_transformer")
145+
endif()
146+
diff --git a/inference-engine/thirdparty/CMakeLists.txt b/inference-engine/thirdparty/CMakeLists.txt
147+
index a2550bfa..10ce316f 100644
148+
--- a/inference-engine/thirdparty/CMakeLists.txt
149+
+++ b/inference-engine/thirdparty/CMakeLists.txt
150+
@@ -56,13 +56,13 @@ function(build_with_lto)
151+
endfunction()
152+
153+
ie_build_pugixml()
154+
- add_subdirectory(stb_lib)
155+
+ #add_subdirectory(stb_lib)
156+
add_subdirectory(ade)
157+
add_subdirectory(fluid/modules/gapi)
158+
159+
target_include_directories(pugixml INTERFACE "$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/pugixml/src>")
160+
161+
- set_target_properties(pugixml ade fluid stb_image
162+
+ set_target_properties(pugixml ade fluid
163+
PROPERTIES FOLDER thirdparty)
164+
165+
# developer package
166+
diff --git a/inference-engine/thirdparty/pugixml/CMakeLists.txt b/inference-engine/thirdparty/pugixml/CMakeLists.txt
167+
index 8bcb2801..380fb468 100644
168+
--- a/inference-engine/thirdparty/pugixml/CMakeLists.txt
169+
+++ b/inference-engine/thirdparty/pugixml/CMakeLists.txt
170+
@@ -41,7 +41,7 @@ if(BUILD_SHARED_LIBS)
171+
else()
172+
add_library(pugixml STATIC ${SOURCES})
173+
if (MSVC)
174+
- add_library(pugixml_mt STATIC ${SOURCES})
175+
+ #add_library(pugixml_mt STATIC ${SOURCES})
176+
#if (WIN32)
177+
# set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /MT")
178+
# set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /MTd")
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
applyPatch('20201005-dldt-disable-unused-targets.patch')
2+
applyPatch('20200413-dldt-pdb.patch')
3+
applyPatch('20200604-dldt-disable-multidevice.patch')
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
sysroot_bin_dir = prepare_dir(self.sysrootdir / 'bin')
2+
copytree(self.build_dir / 'install', self.sysrootdir / 'ngraph')
3+
#rm_one(self.sysrootdir / 'ngraph' / 'lib' / 'ngraph.dll')
4+
5+
build_config = 'Release' if not self.config.build_debug else 'Debug'
6+
build_bin_dir = self.build_dir / 'bin' / 'intel64' / build_config
7+
8+
def copy_bin(name):
9+
global build_bin_dir, sysroot_bin_dir
10+
copytree(build_bin_dir / name, sysroot_bin_dir / name)
11+
12+
dll_suffix = 'd' if self.config.build_debug else ''
13+
def copy_dll(name):
14+
global copy_bin, dll_suffix
15+
copy_bin(name + dll_suffix + '.dll')
16+
copy_bin(name + dll_suffix + '.pdb')
17+
18+
copy_bin('cache.json')
19+
copy_dll('clDNNPlugin')
20+
copy_dll('HeteroPlugin')
21+
copy_dll('inference_engine')
22+
copy_dll('inference_engine_ir_reader')
23+
copy_dll('inference_engine_legacy')
24+
copy_dll('inference_engine_transformations') # runtime
25+
copy_dll('inference_engine_lp_transformations') # runtime
26+
copy_dll('MKLDNNPlugin') # runtime
27+
copy_dll('myriadPlugin') # runtime
28+
#copy_dll('MultiDevicePlugin') # runtime, not used
29+
copy_dll('ngraph')
30+
copy_bin('plugins.xml')
31+
copytree(self.build_dir / 'bin' / 'intel64' / 'pcie-ma248x.elf', sysroot_bin_dir / 'pcie-ma248x.elf')
32+
copytree(self.build_dir / 'bin' / 'intel64' / 'usb-ma2x8x.mvcmd', sysroot_bin_dir / 'usb-ma2x8x.mvcmd')
33+
copytree(self.build_dir / 'bin' / 'intel64' / 'usb-ma2450.mvcmd', sysroot_bin_dir / 'usb-ma2450.mvcmd')
34+
35+
copytree(self.srcdir / 'inference-engine' / 'temp' / 'tbb' / 'bin', sysroot_bin_dir)
36+
copytree(self.srcdir / 'inference-engine' / 'temp' / 'tbb', self.sysrootdir / 'tbb')
37+
38+
sysroot_ie_dir = prepare_dir(self.sysrootdir / 'deployment_tools' / 'inference_engine')
39+
sysroot_ie_lib_dir = prepare_dir(sysroot_ie_dir / 'lib' / 'intel64')
40+
41+
copytree(self.srcdir / 'inference-engine' / 'include', sysroot_ie_dir / 'include')
42+
if not self.config.build_debug:
43+
copytree(self.build_dir / 'install' / 'lib' / 'ngraph.lib', sysroot_ie_lib_dir / 'ngraph.lib')
44+
copytree(build_bin_dir / 'inference_engine.lib', sysroot_ie_lib_dir / 'inference_engine.lib')
45+
copytree(build_bin_dir / 'inference_engine_ir_reader.lib', sysroot_ie_lib_dir / 'inference_engine_ir_reader.lib')
46+
copytree(build_bin_dir / 'inference_engine_legacy.lib', sysroot_ie_lib_dir / 'inference_engine_legacy.lib')
47+
else:
48+
copytree(self.build_dir / 'install' / 'lib' / 'ngraphd.lib', sysroot_ie_lib_dir / 'ngraphd.lib')
49+
copytree(build_bin_dir / 'inference_engined.lib', sysroot_ie_lib_dir / 'inference_engined.lib')
50+
copytree(build_bin_dir / 'inference_engine_ir_readerd.lib', sysroot_ie_lib_dir / 'inference_engine_ir_readerd.lib')
51+
copytree(build_bin_dir / 'inference_engine_legacyd.lib', sysroot_ie_lib_dir / 'inference_engine_legacyd.lib')
52+
53+
sysroot_license_dir = prepare_dir(self.sysrootdir / 'etc' / 'licenses')
54+
copytree(self.srcdir / 'LICENSE', sysroot_license_dir / 'dldt-LICENSE')
55+
copytree(self.srcdir / 'ngraph/LICENSE', sysroot_license_dir / 'ngraph-LICENSE')
56+
copytree(self.sysrootdir / 'tbb/LICENSE', sysroot_license_dir / 'tbb-LICENSE')

platforms/winpack_dldt/build_package.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -443,8 +443,8 @@ def package_sources(self):
443443
def main():
444444

445445
dldt_src_url = 'https://github.com/openvinotoolkit/openvino'
446-
dldt_src_commit = '2020.4'
447-
dldt_release = '2020040000'
446+
dldt_src_commit = '2021.1'
447+
dldt_release = '2021010000'
448448

449449
build_cache_dir_default = os.environ.get('BUILD_CACHE_DIR', '.build_cache')
450450
build_subst_drive = os.environ.get('BUILD_SUBST_DRIVE', None)

0 commit comments

Comments
 (0)