Skip to content

Commit d11cd8c

Browse files
committed
Install opencl for core
1 parent 68d0898 commit d11cd8c

File tree

9 files changed

+18
-11
lines changed

9 files changed

+18
-11
lines changed

.github/workflows/job_onnx_models_tests.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ jobs:
8282
- name: Install dependencies
8383
run: |
8484
# install git (required to build pip deps from the sources)
85-
apt-get update && apt-get install --assume-yes --no-install-recommends git ca-certificates git-lfs
85+
apt-get update && apt-get install --assume-yes --no-install-recommends git ca-certificates git-lfs ocl-icd-libopencl1
8686
8787
- name: Setup Python 3.11
8888
uses: ./openvino/.github/actions/setup_python

.github/workflows/job_pytorch_models_tests.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ jobs:
9595
run: |
9696
# install git (required to build pip deps from the sources)
9797
# install 'g++' to build 'detectron2' and 'natten' wheels
98-
sudo apt-get install --assume-yes --no-install-recommends g++ git ca-certificates
98+
sudo apt-get install --assume-yes --no-install-recommends g++ git ca-certificates ocl-icd-libopencl1
9999
100100
- name: Setup Python 3.11
101101
uses: ./openvino/.github/actions/setup_python

.github/workflows/job_tensorflow_models_tests.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ jobs:
9494
if: ${{ runner.os == 'Linux' }}
9595
run: |
9696
# install git (required to build pip deps from the sources)
97-
sudo apt-get install --assume-yes --no-install-recommends g++ git ca-certificates
97+
sudo apt-get install --assume-yes --no-install-recommends g++ git ca-certificates ocl-icd-libopencl1
9898
9999
- name: Setup Python 3.11
100100
uses: ./openvino/.github/actions/setup_python

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_cpu/thirdparty/CMakeLists.txt

-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ function(ov_add_onednn_common)
3838
set(ONEDNN_BUILD_GRAPH OFF CACHE BOOL "" FORCE)
3939
set(DNNL_ENABLE_WORKLOAD "INFERENCE" CACHE STRING "" FORCE)
4040
set(DNNL_LIBRARY_NAME "openvino_onednn_cpu" CACHE STRING "" FORCE)
41-
set(DNNL_EXPERIMENTAL_PROFILING ON CACHE BOOL "" FORCE)
4241

4342
if(X86_64)
4443
set(DNNL_TARGET_ARCH "X64" CACHE STRING "" FORCE)

src/plugins/intel_gpu/thirdparty/CMakeLists.txt

+6-1
Original file line numberDiff line numberDiff line change
@@ -178,8 +178,13 @@ 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+
# TODO: here we assume Release config is used, but it will not work for debug
184+
set(onednn_output_dir "${onednn_output_dir}/Release")
185+
endif()
181186
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")
187+
set(ONEDNN_GPU_LIB_PATH ${onednn_output_dir}/${onednn_gpu_lib} CACHE FILEPATH "Path to oneDNN GPU library")
183188

184189
add_library(onednn_gpu_tgt INTERFACE)
185190
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)