Skip to content

Commit 248f1a1

Browse files
committedMar 8, 2024
Install opencl for core
1 parent 68d0898 commit 248f1a1

File tree

4 files changed

+13
-6
lines changed

4 files changed

+13
-6
lines changed
 

‎scripts/install_dependencies/install_openvino_dependencies.sh

+3-2
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ if [ "$os" == "raspbian9" ] || [ "$os" == "debian9" ] ; then
131131

132132
elif [ "$os" == "ubuntu18.04" ] ; then
133133

134-
pkgs_core=(libtbb2)
134+
pkgs_core=(ocl-icd-libopencl1 libtbb2)
135135
pkgs_gpu=(ocl-icd-libopencl1)
136136
pkgs_python=(python3.8 libpython3.8 python3.8-venv python3-pip)
137137
pkgs_dev=(cmake pkg-config g++ gcc libc6-dev make sudo)
@@ -140,7 +140,7 @@ elif [ "$os" == "ubuntu20.04" ] || [ "$os" == "debian10" ] || [ "$os" == "raspbi
140140
[ "$os" == "ubuntu21.10" ] || [ "$os" == "ubuntu22.04" ] || [ "$os" == "debian11" ] || [ "$os" == "raspbian11" ] ||
141141
[ "$os" == "ubuntu22.10" ] || [ "$os" == "ubuntu23.04" ] || [ "$os" == "debian12" ] || [ "$os" == "raspbian12" ]; then
142142

143-
pkgs_core=()
143+
pkgs_core=(ocl-icd-libopencl1)
144144
pkgs_gpu=(ocl-icd-libopencl1)
145145
pkgs_python=(python3 python3-venv python3-pip)
146146
pkgs_dev=(cmake pkg-config g++ gcc libc6-dev make sudo)
@@ -223,6 +223,7 @@ elif [ "$os" == "centos7" ] || [ "$os" == "centos8" ] || [ "$os" == "centos9" ]
223223
pkgs_python+=(python3 python3-pip)
224224
extra_repos+=("https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm")
225225
fi
226+
pkgs_core+=("${!pkgs_gpu}")
226227
elif [ "$os" == "opensuse-leap15.3" ] ; then
227228
pkgs_core=(libtbb2 libtbbmalloc2)
228229
pkgs_gpu=(libOpenCL1)

‎src/cmake/openvino.cmake

+1-1
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ configure_package_config_file("${OpenVINO_SOURCE_DIR}/cmake/templates/OpenVINOCo
187187

188188
list(APPEND INSTALL_PATH_VARS "OPENVINO_LIB_DIR")
189189
# remove generator expression at the end, because searching in Release / Debug
190-
# will be done by inside OpenVINOConfig.cmak / ACLConfig.cmake
190+
# will be done by inside OpenVINOConfig.cmake / ACLConfig.cmake
191191
string(REPLACE "$<CONFIG>" "" OPENVINO_LIB_DIR "${OV_CPACK_LIBRARYDIR}")
192192

193193
set(OV_TBB_DIR "${OV_TBB_DIR_INSTALL}")

‎src/plugins/intel_gpu/thirdparty/CMakeLists.txt

+5-1
Original file line numberDiff line numberDiff line change
@@ -178,8 +178,12 @@ if(ENABLE_ONEDNN_FOR_GPU)
178178
# in case of static libraries, Intel GPU shares oneDNN with CPU plugin
179179
set(DNNL_GPU_LIBRARY_NAME "openvino_onednn_cpu" CACHE STRING "Name of oneDNN library for Intel GPU Plugin")
180180

181+
set(onednn_output_dir "${CMAKE_ARCHIVE_OUTPUT_DIRECTORY}")
182+
if(OV_GENERATOR_MULTI_CONFIG)
183+
set(onednn_output_dir "${onednn_output_dir}/$<CONFIG>")
184+
endif()
181185
set(onednn_gpu_lib "${CMAKE_STATIC_LIBRARY_PREFIX}${DNNL_GPU_LIBRARY_NAME}${CMAKE_STATIC_LIBRARY_SUFFIX}")
182-
set(ONEDNN_GPU_LIB_PATH ${CMAKE_ARCHIVE_OUTPUT_DIRECTORY}/${onednn_gpu_lib} CACHE FILEPATH "Path to oneDNN GPU library")
186+
set(ONEDNN_GPU_LIB_PATH ${onednn_output_dir}/${onednn_gpu_lib} CACHE FILEPATH "Path to oneDNN GPU library")
183187

184188
add_library(onednn_gpu_tgt INTERFACE)
185189
set_target_properties(onednn_gpu_tgt PROPERTIES

‎thirdparty/ocl/CMakeLists.txt

+4-2
Original file line numberDiff line numberDiff line change
@@ -60,5 +60,7 @@ set(opencl_root_hints "${OpenCL_INCLUDE_DIR}" PARENT_SCOPE)
6060

6161
ov_install_static_lib(OpenCL ${OV_CPACK_COMP_CORE})
6262

63-
install(TARGETS OpenCL EXPORT dnnl-targets
64-
ARCHIVE DESTINATION ${OV_CPACK_ARCHIVEDIR} COMPONENT ${OV_CPACK_COMP_CORE})
63+
if(NOT BUILD_SHARED_LIBS)
64+
install(TARGETS OpenCL EXPORT dnnl-targets
65+
ARCHIVE DESTINATION ${OV_CPACK_ARCHIVEDIR} COMPONENT ${OV_CPACK_COMP_CORE})
66+
endif()

0 commit comments

Comments
 (0)