Skip to content

Commit a4b8ace

Browse files
committed
try compiling support for more Arm CPUs
1 parent 83732ef commit a4b8ace

File tree

3 files changed

+22
-9
lines changed

3 files changed

+22
-9
lines changed

.ci/ci-images/manylinux_2_28_aarch64/Dockerfile

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,15 +43,27 @@ git clone \
4343
--branch v7.1 \
4444
https://github.com/pocl/pocl.git
4545

46+
# compile support for a bunch of different aarch64 CPUs
47+
#
48+
# Copied from https://github.com/conda-forge/pocl-feedstock/blob/64c2c02d96960160e20cabf1b1392a1752146f29/recipe/build.sh#L58-L62
49+
#
50+
# This support is mostly added for CI...testing device="gpu" codepaths on host CPUs, which tend to be cheaper and more
51+
# available than CI runners with GPUs. But using the host CPU as an OpenCL device can be useful for research as well.
52+
#
53+
AARCH64_CPUS="generic;cortex-a35;cortex-a53;cortex-a55;cortex-a57;cortex-a65;cortex-a72;cortex-a73;cortex-a75;cortex-a76"
54+
AARCH64_CPUS="${AARCH64_CPUS};cyclone;exynos-m3;exynos-m4;exynos-m5;falkor;kryo;neoverse-e1;neoverse-n1;saphira"
55+
AARCH64_CPUS="${AARCH64_CPUS};thunderx;thunderx2t99;thunderxt81;thunderxt83;thunderxt88;tsv110"
56+
4657
# explanations for some flags:
4758
#
4859
# * -DCMAKE_{C,CXX}_COMPILER: DEVTOOLSET_ROOTPATH is where manylinux puts the gcc toolset
4960
# * -DENABLE_ICD=ON: select appropriate OpenCL platform at runtime (https://github.com/pocl/pocl/blob/013d2f19f4e8f2e0fd9aedcb70117d6dcc737aa9/doc/sphinx/source/using.rst#installable-client-driver-icd)
50-
# * -DLLC_HOST_CPU="cortex-a53": passed to clang's -march/-mcpu flag, which is like "support a bunch of Arm CPUs".
61+
# * -DLLC_HOST_CPU="cortex-a35": passed to clang's -march/-mcpu flag, which is like "support a bunch of Arm CPUs".
5162
#
5263
cmake \
5364
-B pocl/build \
5465
-S pocl \
66+
-DCLANG_MARCH_FLAG="-mcpu=" \
5567
-DCMAKE_BUILD_TYPE=release \
5668
-DCMAKE_C_COMPILER="clang" \
5769
-DCMAKE_CXX_COMPILER="clang++" \
@@ -66,7 +78,8 @@ cmake \
6678
-DENABLE_TESTS=OFF \
6779
-DENABLE_VALGRIND=OFF \
6880
-DINSTALL_OPENCL_HEADERS=OFF \
69-
-DLLC_HOST_CPU=cortex-a53 \
81+
-DKERNELLIB_HOST_CPU_VARIANTS="${AARCH64_CPUS}" \
82+
-DLLC_HOST_CPU=cortex-a35 \
7083
-DPOCL_DEBUG_MESSAGES=OFF \
7184
-DPOCL_INSTALL_ICD_VENDORDIR=/etc/OpenCL/vendors
7285

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ set -e -u -o pipefail
77
# 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
88
# https://www.intel.com/content/www/us/en/developer/articles/technical/intel-cpu-runtime-for-opencl-applications-with-sycl-support.html
99

10-
sudo cat > /etc/yum.repos.d/oneAPI.repo <<EOF
10+
cat > /etc/yum.repos.d/oneAPI.repo <<EOF
1111
[oneAPI]
1212
name=Intel® oneAPI repository
1313
baseurl=https://yum.repos.intel.com/oneapi

.ci/setup.sh

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -137,13 +137,13 @@ else # Linux
137137
# if [[ "${ARCH}" == "x86_64" ]]; then
138138
# .ci/install-opencl-intel-driver.sh
139139
# fi
140+
echo "--- clinfo: ---"
141+
clinfo || true
142+
# echo "--- llc -mcpu=help ---"
143+
# # this shows the possible values for -DLLC_HOST_CPU
144+
# # see https://github.com/pocl/pocl/blob/013d2f19f4e8f2e0fd9aedcb70117d6dcc737aa9/doc/sphinx/source/install.rst#L171
145+
# llc -mcpu=help
140146
fi
141-
echo "--- clinfo: ---"
142-
clinfo || true
143-
echo "--- llc -mcpu=help ---"
144-
# this shows the possible values for -DLLC_HOST_CPU
145-
# see https://github.com/pocl/pocl/blob/013d2f19f4e8f2e0fd9aedcb70117d6dcc737aa9/doc/sphinx/source/install.rst#L171
146-
llc -mcpu=help
147147
fi
148148
if [[ $TASK == "cuda" ]]; then
149149
echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections

0 commit comments

Comments
 (0)