@@ -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#
5263cmake \
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
0 commit comments