Skip to content

Commit 9645e6a

Browse files
committed
Added WA for multiple export sets
1 parent 695afdd commit 9645e6a

File tree

5 files changed

+10
-6
lines changed

5 files changed

+10
-6
lines changed

cmake/features.cmake

+1
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ else()
4242
endif()
4343

4444
ov_dependent_option (ENABLE_ONEDNN_FOR_GPU "Enable oneDNN with GPU support" ${ENABLE_ONEDNN_FOR_GPU_DEFAULT} "ENABLE_INTEL_GPU" OFF)
45+
ov_dependent_option (ENABLE_GPU_USE_CPUS_ONEDNN "Enable GPU to use oneDNN from CPU" ON "ENABLE_INTEL_GPU;ENABLE_ONEDNN_FOR_GPU;ENABLE_INTEL_CPU" OFF)
4546

4647
ov_option (ENABLE_DEBUG_CAPS "enable OpenVINO debug capabilities at runtime" OFF)
4748
ov_dependent_option (ENABLE_GPU_DEBUG_CAPS "enable GPU debug capabilities at runtime" ON "ENABLE_DEBUG_CAPS;ENABLE_INTEL_GPU" OFF)

src/plugins/intel_cpu/thirdparty/CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ function(ov_add_onednn_common)
6363
# GPU specific options
6464
#
6565

66-
if(NOT BUILD_SHARED_LIBS AND ENABLE_ONEDNN_FOR_GPU)
66+
if(NOT BUILD_SHARED_LIBS AND ENABLE_ONEDNN_FOR_GPU OR ENABLE_GPU_USE_CPUS_ONEDNN)
6767
# build oneDNN to be compatible with Intel GPU plugin
6868
set(DNNL_ENABLE_PRIMITIVE_GPU_ISA "XEHP;XEHPG;XEHPC" CACHE STRING "" FORCE)
6969
set(DNNL_GPU_RUNTIME "OCL" CACHE STRING "" FORCE)

src/plugins/intel_gpu/thirdparty/CMakeLists.txt

+4-4
Original file line numberDiff line numberDiff line change
@@ -156,9 +156,9 @@ function(ov_build_onednn_gpu)
156156
endfunction()
157157

158158
if(ENABLE_ONEDNN_FOR_GPU)
159-
# if(BUILD_SHARED_LIBS OR NOT ENABLE_INTEL_CPU)
160-
# ov_build_onednn_gpu()
161-
# else()
159+
if((BUILD_SHARED_LIBS OR NOT ENABLE_INTEL_CPU) AND NOT ENABLE_GPU_USE_CPUS_ONEDNN)
160+
ov_build_onednn_gpu()
161+
else()
162162
# in case of static libraries, Intel GPU shares oneDNN with CPU plugin
163163
set(DNNL_GPU_LIBRARY_NAME "openvino_onednn_cpu" CACHE STRING "Name of oneDNN library for Intel GPU Plugin")
164164

@@ -172,5 +172,5 @@ if(ENABLE_ONEDNN_FOR_GPU)
172172
INTERFACE_COMPILE_DEFINITIONS ENABLE_ONEDNN_FOR_GPU)
173173

174174
ov_install_static_lib(onednn_gpu_tgt ${OV_CPACK_COMP_CORE})
175-
# endif()
175+
endif()
176176
endif()

thirdparty/ocl/CMakeLists.txt

+3
Original file line numberDiff line numberDiff line change
@@ -59,3 +59,6 @@ set(opencl_root_hints "${OpenCL_INCLUDE_DIR}" PARENT_SCOPE)
5959
# installation
6060

6161
ov_install_static_lib(OpenCL ${OV_CPACK_COMP_CORE})
62+
63+
install(TARGETS OpenCL EXPORT dnnl-targets
64+
ARCHIVE DESTINATION ${OV_CPACK_ARCHIVEDIR} COMPONENT ${OV_CPACK_COMP_CORE})

0 commit comments

Comments
 (0)