Skip to content

Commit 9a58b2e

Browse files
committed
ensure the PoCL ICD loader gets installed
1 parent 7121551 commit 9a58b2e

File tree

6 files changed

+41
-30
lines changed

6 files changed

+41
-30
lines changed

.ci/ci-images/manylinux_2_28_aarch64/Dockerfile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,5 +72,8 @@ cmake \
7272

7373
cmake --build pocl/build -j4
7474

75-
cmake --install pocl/build
75+
cmake \
76+
--install pocl/build \
77+
--component dev \
78+
--component icd
7679
EOF

.ci/ci-images/manylinux_2_28_x86_64/Dockerfile

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ yum install --nodocs -y \
1515

1616
yum install --nodocs -y \
1717
clang-devel \
18-
gcc-c++ \
1918
hwloc-devel \
2019
llvm-devel \
2120
llvm-static \
@@ -32,7 +31,7 @@ EOF
3231

3332
RUN <<EOF
3433
# install a newer CMake than what the package manager has
35-
curl -sL https://cmake.org/files/v3.23/cmake-3.23.1-linux-$(arch).sh -o cmake.sh
34+
curl -sL https://cmake.org/files/v4.2/cmake-4.2.1-linux-$(arch).sh -o cmake.sh
3635
chmod +x cmake.sh
3736
./cmake.sh --prefix=/usr/local --exclude-subdir
3837
rm -f ./cmake.sh
@@ -52,16 +51,16 @@ cmake \
5251
-B pocl/build \
5352
-S pocl \
5453
-DCMAKE_BUILD_TYPE=release \
55-
-DCMAKE_C_COMPILER="${DEVTOOLSET_ROOTPATH}/usr/bin/gcc" \
56-
-DCMAKE_CXX_COMPILER="${DEVTOOLSET_ROOTPATH}/usr/bin/g++" \
54+
-DCMAKE_C_COMPILER="clang" \
55+
-DCMAKE_CXX_COMPILER="clang++" \
5756
-DENABLE_DOXYGEN=OFF \
57+
-DENABLE_ICD=ON \
58+
-DENABLE_LLVM=ON \
5859
-DENABLE_EXAMPLES=OFF \
5960
-DENABLE_HOST_CPU_DEVICES=ON \
60-
-DENABLE_ICD=ON \
6161
-DENABLE_HWLOC=ON \
6262
-DENABLE_POCLCC=ON \
6363
-DENABLE_SPIRV=ON \
64-
-DSTATIC_LLVM=ON \
6564
-DENABLE_TESTS=OFF \
6665
-DENABLE_VALGRIND=OFF \
6766
-DINSTALL_OPENCL_HEADERS=OFF \
@@ -71,7 +70,10 @@ cmake \
7170

7271
cmake --build pocl/build -j4
7372

74-
cmake --install pocl/build
73+
cmake \
74+
--install pocl/build \
75+
--component dev \
76+
--component icd
7577
EOF
7678

7779
# Install Java

.ci/install-opencl-intel-driver.sh

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#!/bin/bash
2+
3+
set -e -u -o pipefail
4+
5+
# install Intel OpenCL support
6+
# https://www.intel.com/content/www/us/en/developer/articles/tool/opencl-drivers.html#philinux
7+
# https://www.intel.com/content/www/us/en/docs/oneapi/installation-guide-linux/2023-0/yum-dnf-zypper.html#GUID-B5018FF2-B9F3-4ADC-9EB6-F99F6BFC7948
8+
# https://www.intel.com/content/www/us/en/developer/articles/technical/intel-cpu-runtime-for-opencl-applications-with-sycl-support.html
9+
10+
sudo cat > /etc/yum.repos.d/oneAPI.repo <<EOF
11+
[oneAPI]
12+
name=Intel® oneAPI repository
13+
baseurl=https://yum.repos.intel.com/oneapi
14+
enabled=1
15+
gpgcheck=1
16+
repo_gpgcheck=1
17+
gpgkey=https://yum.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB
18+
EOF
19+
20+
yum update -y
21+
yum install -y \
22+
intel-oneapi-runtime-opencl

.ci/setup.sh

Lines changed: 5 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -126,33 +126,17 @@ else # Linux
126126
sudo apt-get install --no-install-recommends -y \
127127
pocl-opencl-icd
128128
else # in manylinux image
129-
130-
# install Intel OpenCL support
131-
# https://www.intel.com/content/www/us/en/developer/articles/tool/opencl-drivers.html#philinux
132-
# https://www.intel.com/content/www/us/en/docs/oneapi/installation-guide-linux/2023-0/yum-dnf-zypper.html#GUID-B5018FF2-B9F3-4ADC-9EB6-F99F6BFC7948
133-
# https://www.intel.com/content/www/us/en/developer/articles/technical/intel-cpu-runtime-for-opencl-applications-with-sycl-support.html
134-
tee > /tmp/oneAPI.repo << EOF
135-
[oneAPI]
136-
name=Intel® oneAPI repository
137-
baseurl=https://yum.repos.intel.com/oneapi
138-
enabled=1
139-
gpgcheck=1
140-
repo_gpgcheck=1
141-
gpgkey=https://yum.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB
142-
EOF
143-
144-
sudo mv /tmp/oneAPI.repo /etc/yum.repos.d
145-
yum update -y
146-
147-
yum install -y \
148-
intel-oneapi-runtime-opencl
149-
150129
sudo yum update -y
151130
sudo yum install -y \
152131
clinfo \
153132
ocl-icd-devel \
154133
opencl-headers \
155134
|| exit 1
135+
136+
# install drives allowing the OpenCL version to target host GPUs
137+
if [[ "${ARCH}" == "x86_64" ]]; then
138+
.ci/install-opencl-intel-driver.sh
139+
fi
156140
fi
157141
echo "--- clinfo: ---"
158142
clinfo || true

.github/workflows/python_package.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,7 @@ jobs:
335335
if: startsWith(matrix.os, 'windows') && (matrix.task == 'bdist')
336336
shell: pwsh -command ". {0}"
337337
run: |
338-
& "$env:GITHUB_WORKSPACE/.ci/install-opencl.ps1"
338+
& "$env:GITHUB_WORKSPACE/.ci/install-opencl-amd-driver.ps1"
339339
# 'conda init powershell' needs to be run in a separate process
340340
# ref: https://docs.conda.io/projects/conda/en/stable/dev-guide/deep-dives/activation.html
341341
- name: Initialize conda on Windows

0 commit comments

Comments
 (0)