Skip to content

Commit bc4a8cd

Browse files
committed
WIP
1 parent 3f8f4f3 commit bc4a8cd

File tree

6 files changed

+175
-18
lines changed

6 files changed

+175
-18
lines changed

.github/workflows/pr-arm.yml

Lines changed: 151 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,151 @@
1+
name: "PR Tests (aarch64)"
2+
permissions: read-all
3+
4+
# Trigger for PR and merge to develop branch
5+
on:
6+
push:
7+
branches: develop
8+
pull_request:
9+
workflow_dispatch:
10+
11+
env:
12+
CTEST_OUTPUT_ON_FAILURE: 1
13+
LAPACK_VERSION: 3.12.0
14+
ARMPL_VERSION: 25.04.1
15+
POCL_VERSION: "6.0"
16+
DPCPP_VERSION: nightly-2025-04-01
17+
18+
jobs:
19+
# cleanup:
20+
# runs-on: ubuntu-24.04-arm
21+
# permissions:
22+
# actions: write
23+
# contents: read
24+
# steps:
25+
# - name: Cleanup
26+
# run: |
27+
# gh cache delete pocl-${{ env.POCL_VERSION }}-arm
28+
# gh cache delete dpcpp-${{ env.DPCPP_VERSION }}-arm
29+
# env:
30+
# GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
31+
# GH_REPO: ${{ github.repository }}
32+
# BRANCH: refs/pull/${{ github.event.pull_request.number }}/merge
33+
unit-tests:
34+
runs-on: ubuntu-24.04-arm
35+
# One runner for each domain
36+
strategy:
37+
fail-fast: false
38+
matrix:
39+
include:
40+
- config: oneMath BLAS
41+
domain: blas
42+
build_options: -DREF_BLAS_ROOT=${PWD}/lapack/install
43+
# TODO: enable LAPACK when https://github.com/uxlfoundation/oneMath/issues/666 is fixed
44+
# - config: oneMath LAPACK
45+
# domain: lapack
46+
# build_options: -DREF_LAPACK_ROOT=${PWD}/lapack/install
47+
- config: oneMath RNG
48+
domain: rng
49+
test_options: -E 'Device|DEVICE'
50+
name: unit tests ${{ matrix.config }} CPU
51+
steps:
52+
- uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
53+
- name: Check if the changes affect this domain
54+
id: domain_check
55+
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
56+
with:
57+
script: |
58+
const domainCheck = require('.github/scripts/domain-check.js')
59+
return domainCheck({github, context, domain: "${{ matrix.domain }}"})
60+
- name: Restore netlib from cache
61+
id: cache-lapack
62+
uses: actions/cache@d4323d4df104b026a6aa633fdb11d772146be0bf # v4.2.2
63+
with:
64+
path: lapack/install
65+
key: lapack-${{ env.LAPACK_VERSION }}-arm
66+
- name: Install netlib
67+
if: steps.domain_check.outputs.result == 'true' && steps.cache-lapack.outputs.cache-hit != 'true'
68+
run: |
69+
curl -sL https://github.com/Reference-LAPACK/lapack/archive/refs/tags/v${LAPACK_VERSION}.tar.gz | tar zx
70+
SHARED_OPT="lapack-${LAPACK_VERSION} -DBUILD_SHARED_LIBS=on -DCBLAS=on -DLAPACKE=on -DCMAKE_INSTALL_PREFIX=${PWD}/lapack/install -G Ninja"
71+
# 32 bit int
72+
cmake ${SHARED_OPT} -B lapack/build32
73+
cmake --build lapack/build32 --target install
74+
# 64 bit int
75+
cmake ${SHARED_OPT} -DBUILD_INDEX64=on -B lapack/build64
76+
cmake --build lapack/build64 --target install
77+
- name: APT install dependencies
78+
if: steps.domain_check.outputs.result == 'true'
79+
run: sudo apt install libclang-cpp18-dev libclang-18-dev ocl-icd-dev ocl-icd-libopencl1 ocl-icd-opencl-dev
80+
- name: Restore DPC++ from cache
81+
id: cache-dpcpp
82+
uses: actions/cache@d4323d4df104b026a6aa633fdb11d772146be0bf # v4.2.2
83+
with:
84+
path: dpcpp/install
85+
key: dpcpp-${{ env.DPCPP_VERSION }}-arm
86+
- name: Build DPC++
87+
if: steps.domain_check.outputs.result == 'true' && steps.cache-dpcpp.outputs.cache-hit != 'true'
88+
run: |
89+
wget -P dpcpp https://github.com/intel/llvm/archive/refs/tags/${{ env.DPCPP_VERSION }}.tar.gz
90+
cd dpcpp
91+
tar -xzf ${{ env.DPCPP_VERSION }}.tar.gz
92+
python llvm-${{ env.DPCPP_VERSION }}/buildbot/configure.py -o build -t Release --cmake-gen Ninja --cmake-opt="-DSYCL_ENABLE_PLUGINS=opencl" --cmake-opt="-DCMAKE_INSTALL_PREFIX=$PWD/install" --llvm-external-projects=openmp
93+
cd build
94+
ninja deploy-sycl-toolchain
95+
ninja omp
96+
ninja install
97+
cd ..
98+
- name: Restore PoCL from cache
99+
id: cache-pocl
100+
uses: actions/cache@d4323d4df104b026a6aa633fdb11d772146be0bf # v4.2.2
101+
with:
102+
path: pocl/install
103+
key: pocl-${{ env.POCL_VERSION }}-arm
104+
- name: Build PoCL
105+
if: steps.domain_check.outputs.result == 'true' && steps.cache-pocl.outputs.cache-hit != 'true'
106+
run: |
107+
export PATH=${PWD}/dpcpp/install/bin:${PATH}
108+
export CPATH=${PWD}/dpcpp/install/include:${CPATH}
109+
export LIBRARY_PATH=${PWD}/dpcpp/install/lib:${PWD}/dpcpp/install/lib/aarch64-unknown-linux-gnu:${LIBRARY_PATH}
110+
export LD_LIBRARY_PATH=${PWD}/dpcpp/install/lib:${PWD}/dpcpp/install/lib/aarch64-unknown-linux-gnu:${LD_LIBRARY_PATH}
111+
wget -P pocl https://github.com/pocl/pocl/archive/refs/tags/v${{ env.POCL_VERSION }}.tar.gz
112+
cd pocl
113+
tar -xzf v${{ env.POCL_VERSION }}.tar.gz
114+
cmake -Bbuild -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_COMPILER=clang++-18 -DCMAKE_C_COMPILER=clang-18 -DWITH_LLVM_CONFIG=$(which llvm-config-18) -DCMAKE_INSTALL_PREFIX=$PWD/install -G Ninja -DENABLE_ICD=ON -DENABLE_SPIRV=ON -DLLVM_SPIRV=$PWD/../dpcpp/install/bin/llvm-spirv pocl-${{ env.POCL_VERSION }}
115+
cmake --build build
116+
cmake --install build
117+
ls -l
118+
ls -l install/*
119+
cd ..
120+
- name: Install ArmPL
121+
if: steps.domain_check.outputs.result == 'true'
122+
run: |
123+
mkdir armpl
124+
cd armpl
125+
wget https://developer.arm.com/-/cdn-downloads/permalink/Arm-Performance-Libraries/Version_${{ env.ARMPL_VERSION }}/arm-performance-libraries_${{ env.ARMPL_VERSION }}_deb_gcc.tar
126+
tar -xf arm-performance-libraries_${{ env.ARMPL_VERSION }}_deb_gcc.tar
127+
./arm-performance-libraries_${{ env.ARMPL_VERSION }}_deb/arm-performance-libraries_${{ env.ARMPL_VERSION }}_deb.sh -a -i $PWD/install
128+
cd ..
129+
- name: Configure/Build for a domain
130+
if: steps.domain_check.outputs.result == 'true'
131+
run: |
132+
export PATH=${PWD}/armpl/install/armpl_${{ env.ARMPL_VERSION }}_gcc/bin:${PWD}/pocl/install/bin:${PWD}/dpcpp/install/bin:${PATH}
133+
export CPATH=${PWD}/armpl/install/armpl_${{ env.ARMPL_VERSION }}_gcc/include:${PWD}/pocl/install/include:${PWD}/dpcpp/install/include:${CPATH}
134+
export LIBRARY_PATH=${PWD}/armpl/install/armpl_${{ env.ARMPL_VERSION }}_gcc/lib:${PWD}/pocl/install/lib:${PWD}/dpcpp/install/lib:${PWD}/dpcpp/install/lib/aarch64-unknown-linux-gnu:${LIBRARY_PATH}
135+
export LD_LIBRARY_PATH=${PWD}/armpl/install/armpl_${{ env.ARMPL_VERSION }}_gcc/lib:${PWD}/pocl/install/lib:${PWD}/dpcpp/install/lib:${PWD}/dpcpp/install/lib/aarch64-unknown-linux-gnu:${LD_LIBRARY_PATH}
136+
export OCL_ICD_VENDORS=$PWD/pocl/install/etc/OpenCL/vendors/
137+
sycl-ls
138+
cmake -DTARGET_DOMAINS=${{ matrix.domain }} -DENABLE_MKLCPU_BACKEND=off -DENABLE_MKLGPU_BACKEND=off -DENABLE_ARMPL_BACKEND=on -DARMPL_ROOT=${PWD}/armpl/install/armpl_${{ env.ARMPL_VERSION }}_gcc -DCMAKE_CXX_FLAGS='-fopenmp' -DCMAKE_VERBOSE_MAKEFILE=on ${{ matrix.build_options }} -B build -G Ninja
139+
cmake --build build
140+
- name: Run tests
141+
if: steps.domain_check.outputs.result == 'true'
142+
run: |
143+
export PATH=${PWD}/armpl/install/armpl_${{ env.ARMPL_VERSION }}_gcc/bin:${PWD}/pocl/install/bin:${PWD}/dpcpp/install/bin:${PATH}
144+
export CPATH=${PWD}/armpl/install/armpl_${{ env.ARMPL_VERSION }}_gcc/include:${PWD}/pocl/install/include:${PWD}/dpcpp/install/include:${CPATH}
145+
export LIBRARY_PATH=${PWD}/armpl/install/armpl_${{ env.ARMPL_VERSION }}_gcc/lib:${PWD}/pocl/install/lib:${PWD}/dpcpp/install/lib:${PWD}/dpcpp/install/lib/aarch64-unknown-linux-gnu:${LIBRARY_PATH}
146+
export LD_LIBRARY_PATH=${PWD}/armpl/install/armpl_${{ env.ARMPL_VERSION }}_gcc/lib:${PWD}/pocl/install/lib:${PWD}/dpcpp/install/lib:${PWD}/dpcpp/install/lib/aarch64-unknown-linux-gnu:${LD_LIBRARY_PATH}
147+
export OCL_ICD_VENDORS=$PWD/pocl/install/etc/OpenCL/vendors/
148+
sycl-ls
149+
ctest --test-dir build ${{ matrix.test_options }}
150+
# - name: Setup tmate session
151+
# uses: mxschmitt/action-tmate@v3

.github/workflows/pr.yml

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: "PR Tests"
1+
name: "PR Tests (x86_64)"
22
permissions: read-all
33

44
# Trigger for PR and merge to develop branch
@@ -34,21 +34,21 @@ jobs:
3434
fail-fast: false
3535
matrix:
3636
include:
37-
- config: generic SYCL BLAS
38-
domain: blas
39-
build_options: -DREF_BLAS_ROOT=${PWD}/lapack/install -DENABLE_GENERIC_BLAS_BACKEND=ON -DENABLE_MKLCPU_BACKEND=OFF -DGENERIC_BLAS_TUNING_TARGET=INTEL_CPU
40-
- config: portFFT
41-
domain: dft
42-
build_options: -DENABLE_PORTFFT_BACKEND=ON -DENABLE_MKLCPU_BACKEND=OFF
43-
test_options: -R 'DFT/CT/.*ComputeTests_in_place_COMPLEX.COMPLEX_SINGLE_in_place_buffer.sizes_8_batches_1*'
44-
- config: oneMath BLAS
45-
domain: blas
46-
build_options: -DREF_BLAS_ROOT=${PWD}/lapack/install
47-
- config: oneMath DFT
48-
domain: dft
49-
- config: oneMath LAPACK
50-
domain: lapack
51-
build_options: -DREF_LAPACK_ROOT=${PWD}/lapack/install
37+
# - config: generic SYCL BLAS
38+
# domain: blas
39+
# build_options: -DREF_BLAS_ROOT=${PWD}/lapack/install -DENABLE_GENERIC_BLAS_BACKEND=ON -DENABLE_MKLCPU_BACKEND=OFF -DGENERIC_BLAS_TUNING_TARGET=INTEL_CPU
40+
# - config: portFFT
41+
# domain: dft
42+
# build_options: -DENABLE_PORTFFT_BACKEND=ON -DENABLE_MKLCPU_BACKEND=OFF
43+
# test_options: -R 'DFT/CT/.*ComputeTests_in_place_COMPLEX.COMPLEX_SINGLE_in_place_buffer.sizes_8_batches_1*'
44+
# - config: oneMath BLAS
45+
# domain: blas
46+
# build_options: -DREF_BLAS_ROOT=${PWD}/lapack/install
47+
# - config: oneMath DFT
48+
# domain: dft
49+
# - config: oneMath LAPACK
50+
# domain: lapack
51+
# build_options: -DREF_LAPACK_ROOT=${PWD}/lapack/install
5252
- config: oneMath RNG
5353
domain: rng
5454
name: unit tests ${{ matrix.config }} CPU

examples/rng/device/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
# If users build more than one backend (i.e. mklcpu and mklgpu, or mklcpu and CUDA), they may need to
2424
# overwrite ONEAPI_DEVICE_SELECTOR in their environment to run on the desired backend
2525
set(DEVICE_FILTERS "")
26-
if(ENABLE_MKLCPU_BACKEND)
26+
if(ENABLE_MKLCPU_BACKEND OR ENABLE_ARMPL_BACKEND)
2727
list(APPEND DEVICE_FILTERS "opencl:cpu")
2828
endif()
2929
# RNG only supports mklcpu backend on Windows

examples/rng/run_time_dispatching/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
# If users build more than one backend (i.e. mklcpu and mklgpu, or mklcpu and CUDA), they may need to
2424
# overwrite ONEAPI_DEVICE_SELECTOR in their environment to run on the desired backend
2525
set(DEVICE_FILTERS "")
26-
if(ENABLE_MKLCPU_BACKEND)
26+
if(ENABLE_MKLCPU_BACKEND OR ENABLE_ARMPL_BACKEND)
2727
list(APPEND DEVICE_FILTERS "opencl:cpu")
2828
endif()
2929
# RNG only supports mklcpu backend on Windows

src/blas/backends/armpl/armpl_level3.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@
1818
* SPDX-License-Identifier: Apache-2.0
1919
*******************************************************************************/
2020

21+
// FIXME: !!! DO NOT MERGE !!!
22+
// This is a dummy change to trigger CI for testing
23+
2124
#include <sycl/sycl.hpp>
2225

2326
#include "oneapi/math/exceptions.hpp"

src/rng/backends/armpl/philox4x32x10.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@
1818
* SPDX-License-Identifier: Apache-2.0
1919
*******************************************************************************/
2020

21+
// FIXME: !!! DO NOT MERGE !!!
22+
// This is a dummy change to trigger CI for testing
23+
2124
#include <iostream>
2225
#if __has_include(<sycl/sycl.hpp>)
2326
#include <sycl/sycl.hpp>

0 commit comments

Comments
 (0)