-
Notifications
You must be signed in to change notification settings - Fork 6.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[openvino] fixed build with standalone crashpad and onednn (#32773)
- Loading branch information
1 parent
90e7eab
commit 2ad5618
Showing
8 changed files
with
170 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
diff --git a/src/cmake/ie_parallel.cmake b/src/cmake/ie_parallel.cmake | ||
index e8aa1c30ef..259e4152c2 100644 | ||
--- a/src/cmake/ie_parallel.cmake | ||
+++ b/src/cmake/ie_parallel.cmake | ||
@@ -282,7 +282,7 @@ function(set_ie_threading_interface_for TARGET_NAME) | ||
foreach(include_directory IN LISTS include_directories) | ||
# cannot include /usr/include headers as SYSTEM | ||
if(NOT "${include_directory}" MATCHES "^/usr.*$") | ||
- target_include_directories(${TARGET_NAME} SYSTEM BEFORE | ||
+ target_include_directories(${TARGET_NAME} SYSTEM | ||
${LINK_TYPE} $<BUILD_INTERFACE:${include_directory}>) | ||
else() | ||
set(_system_library ON) | ||
diff --git a/src/plugins/intel_cpu/CMakeLists.txt b/src/plugins/intel_cpu/CMakeLists.txt | ||
index e1f04b4ad2..d1150fdab0 100644 | ||
--- a/src/plugins/intel_cpu/CMakeLists.txt | ||
+++ b/src/plugins/intel_cpu/CMakeLists.txt | ||
@@ -83,18 +83,19 @@ elseif(RISCV64) | ||
set_target_properties(${TARGET_NAME} PROPERTIES OUTPUT_NAME "openvino_riscv_cpu_plugin") | ||
endif() | ||
|
||
-set_ie_threading_interface_for(${TARGET_NAME}) | ||
- | ||
ie_mark_target_as_cc(${TARGET_NAME}) | ||
|
||
target_link_libraries(${TARGET_NAME} PRIVATE dnnl | ||
ov_shape_inference | ||
- openvino::pugixml | ||
inference_engine_snippets) | ||
|
||
+target_include_directories(${TARGET_NAME} SYSTEM PRIVATE $<TARGET_PROPERTY:dnnl,INCLUDE_DIRECTORIES>) | ||
target_compile_definitions(${TARGET_NAME} PRIVATE IMPLEMENT_INFERENCE_EXTENSION_API) | ||
target_include_directories(${TARGET_NAME} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src) | ||
-target_include_directories(${TARGET_NAME} SYSTEM PRIVATE $<TARGET_PROPERTY:dnnl,INCLUDE_DIRECTORIES>) | ||
+ | ||
+# system libraries must go last | ||
+target_link_libraries(${TARGET_NAME} PRIVATE openvino::pugixml) | ||
+set_ie_threading_interface_for(${TARGET_NAME}) | ||
|
||
# Cross compiled function | ||
# TODO: The same for proposal, proposalONNX, topk |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
diff --git a/src/common/util/CMakeLists.txt b/src/common/util/CMakeLists.txt | ||
index 4b538aab7c..1cae344ed6 100644 | ||
--- a/src/common/util/CMakeLists.txt | ||
+++ b/src/common/util/CMakeLists.txt | ||
@@ -2,7 +2,7 @@ | ||
# SPDX-License-Identifier: Apache-2.0 | ||
# | ||
|
||
-set(TARGET_NAME util) | ||
+set(TARGET_NAME openvino_util) | ||
|
||
file(GLOB_RECURSE LIBRARY_SRC ${CMAKE_CURRENT_SOURCE_DIR}/src/*.cpp) | ||
file(GLOB_RECURSE PUBLIC_HEADERS ${CMAKE_CURRENT_SOURCE_DIR}/include/*.hpp) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
diff --git a/cmake/OpenCL.cmake b/cmake/OpenCL.cmake | ||
index df86d3434..cf4274b47 100644 | ||
--- a/cmake/OpenCL.cmake | ||
+++ b/cmake/OpenCL.cmake | ||
@@ -42,5 +42,5 @@ endif() | ||
add_definitions(-DCL_TARGET_OPENCL_VERSION=120) | ||
|
||
set(DNNL_GPU_RUNTIME_CURRENT ${DNNL_GPU_RUNTIME}) | ||
-include_directories(${OpenCL_INCLUDE_DIRS}) | ||
+# include_directories(${OpenCL_INCLUDE_DIRS}) | ||
list(APPEND EXTRA_SHARED_LIBS OpenCL::OpenCL) | ||
diff --git a/cmake/TBB.cmake b/cmake/TBB.cmake | ||
index d6bbe3e80..a62a25117 100644 | ||
--- a/cmake/TBB.cmake | ||
+++ b/cmake/TBB.cmake | ||
@@ -26,7 +26,7 @@ include("cmake/Threading.cmake") | ||
macro(handle_tbb_target) | ||
if(TBB_FOUND) | ||
set_property(TARGET TBB::tbb PROPERTY "MAP_IMPORTED_CONFIG_RELWITHMDD" "DEBUG") | ||
- include_directories_with_host_compiler(${_tbb_include_dirs}) | ||
+ # include_directories_with_host_compiler(${_tbb_include_dirs}) | ||
list(APPEND EXTRA_SHARED_LIBS ${TBB_IMPORTED_TARGETS}) | ||
|
||
# Print TBB location | ||
diff --git a/src/common/CMakeLists.txt b/src/common/CMakeLists.txt | ||
index e38723312..f19c63f3d 100644 | ||
--- a/src/common/CMakeLists.txt | ||
+++ b/src/common/CMakeLists.txt | ||
@@ -50,5 +50,7 @@ endif() | ||
|
||
set(OBJ_LIB ${DNNL_LIBRARY_NAME}_common) | ||
add_library(${OBJ_LIB} OBJECT ${SOURCES}) | ||
+target_include_directories(${OBJ_LIB} PRIVATE | ||
+ $<TARGET_PROPERTY:OpenCL::OpenCL,INTERFACE_INCLUDE_DIRECTORIES>) | ||
set_property(GLOBAL APPEND PROPERTY DNNL_LIB_DEPS | ||
$<TARGET_OBJECTS:${OBJ_LIB}>) | ||
diff --git a/src/gpu/CMakeLists.txt b/src/gpu/CMakeLists.txt | ||
index e31655ec4..867dcac6f 100644 | ||
--- a/src/gpu/CMakeLists.txt | ||
+++ b/src/gpu/CMakeLists.txt | ||
@@ -27,6 +27,8 @@ add_definitions_with_host_compiler(-DNGEN_WINDOWS_COMPAT) | ||
|
||
set(OBJ_LIB ${DNNL_LIBRARY_NAME}_gpu) | ||
add_library(${OBJ_LIB} OBJECT ${SOURCES}) | ||
+target_include_directories(${OBJ_LIB} PRIVATE | ||
+ $<TARGET_PROPERTY:OpenCL::OpenCL,INTERFACE_INCLUDE_DIRECTORIES>) | ||
set_property(GLOBAL APPEND PROPERTY DNNL_LIB_DEPS | ||
$<TARGET_OBJECTS:${OBJ_LIB}>) | ||
|
||
diff --git a/src/gpu/compute/CMakeLists.txt b/src/gpu/compute/CMakeLists.txt | ||
index 3f08abbe1..51c59f026 100644 | ||
--- a/src/gpu/compute/CMakeLists.txt | ||
+++ b/src/gpu/compute/CMakeLists.txt | ||
@@ -23,5 +23,7 @@ file(GLOB_RECURSE SOURCES | ||
|
||
set(OBJ_LIB ${DNNL_LIBRARY_NAME}_gpu_compute) | ||
add_library(${OBJ_LIB} OBJECT ${SOURCES}) | ||
+target_include_directories(${OBJ_LIB} PRIVATE | ||
+ $<TARGET_PROPERTY:OpenCL::OpenCL,INTERFACE_INCLUDE_DIRECTORIES>) | ||
set_property(GLOBAL APPEND PROPERTY DNNL_LIB_DEPS | ||
$<TARGET_OBJECTS:${OBJ_LIB}>) | ||
diff --git a/src/gpu/jit/CMakeLists.txt b/src/gpu/jit/CMakeLists.txt | ||
index 178d325ed..a84b54b02 100644 | ||
--- a/src/gpu/jit/CMakeLists.txt | ||
+++ b/src/gpu/jit/CMakeLists.txt | ||
@@ -32,5 +32,7 @@ endif() | ||
|
||
set(OBJ_LIB ${DNNL_LIBRARY_NAME}_gpu_jit) | ||
add_library(${OBJ_LIB} OBJECT ${SOURCES}) | ||
+target_include_directories(${OBJ_LIB} PRIVATE | ||
+ $<TARGET_PROPERTY:OpenCL::OpenCL,INTERFACE_INCLUDE_DIRECTORIES>) | ||
set_property(GLOBAL APPEND PROPERTY DNNL_LIB_DEPS | ||
$<TARGET_OBJECTS:${OBJ_LIB}>) | ||
diff --git a/src/gpu/ocl/CMakeLists.txt b/src/gpu/ocl/CMakeLists.txt | ||
index 2ccb8d1f5..ab6310e39 100644 | ||
--- a/src/gpu/ocl/CMakeLists.txt | ||
+++ b/src/gpu/ocl/CMakeLists.txt | ||
@@ -39,5 +39,7 @@ list(APPEND SOURCES ${kernel_list_src}) | ||
|
||
set(OBJ_LIB ${DNNL_LIBRARY_NAME}_gpu_ocl) | ||
add_library(${OBJ_LIB} OBJECT ${SOURCES}) | ||
+target_include_directories(${OBJ_LIB} PRIVATE | ||
+ $<TARGET_PROPERTY:OpenCL::OpenCL,INTERFACE_INCLUDE_DIRECTORIES>) | ||
set_property(GLOBAL APPEND PROPERTY DNNL_LIB_DEPS | ||
$<TARGET_OBJECTS:${OBJ_LIB}>) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters