|
| 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 | + DPCPP_VERSION: nightly-2025-04-01 |
| 16 | + |
| 17 | +jobs: |
| 18 | + unit-tests: |
| 19 | + runs-on: ubuntu-24.04-arm |
| 20 | + # One runner for each domain |
| 21 | + strategy: |
| 22 | + fail-fast: false |
| 23 | + matrix: |
| 24 | + include: |
| 25 | + - config: ArmPL BLAS |
| 26 | + domain: blas |
| 27 | + build_options: -DREF_BLAS_ROOT=${PWD}/lapack/install |
| 28 | + - config: ArmPL LAPACK |
| 29 | + domain: lapack |
| 30 | + build_options: -DREF_LAPACK_ROOT=${PWD}/lapack/install |
| 31 | + - config: ArmPL RNG |
| 32 | + domain: rng |
| 33 | + test_options: -E 'Device|DEVICE' |
| 34 | + name: unit tests ${{ matrix.config }} CPU |
| 35 | + steps: |
| 36 | + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 |
| 37 | + - name: Check if the changes affect this domain |
| 38 | + id: domain_check |
| 39 | + uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1 |
| 40 | + with: |
| 41 | + script: | |
| 42 | + const domainCheck = require('.github/scripts/domain-check.js') |
| 43 | + return domainCheck({github, context, domain: "${{ matrix.domain }}"}) |
| 44 | + - name: Restore netlib from cache |
| 45 | + id: cache-lapack |
| 46 | + uses: actions/cache@d4323d4df104b026a6aa633fdb11d772146be0bf # v4.2.2 |
| 47 | + with: |
| 48 | + path: lapack/install |
| 49 | + key: lapack-${{ env.LAPACK_VERSION }}-arm |
| 50 | + - name: Install netlib |
| 51 | + if: steps.domain_check.outputs.result == 'true' && steps.cache-lapack.outputs.cache-hit != 'true' |
| 52 | + run: | |
| 53 | + curl -sL https://github.com/Reference-LAPACK/lapack/archive/refs/tags/v${LAPACK_VERSION}.tar.gz | tar zx |
| 54 | + SHARED_OPT="lapack-${LAPACK_VERSION} -DBUILD_SHARED_LIBS=on -DCBLAS=on -DLAPACKE=on -DCMAKE_INSTALL_PREFIX=${PWD}/lapack/install -G Ninja" |
| 55 | + # 32 bit int |
| 56 | + cmake ${SHARED_OPT} -B lapack/build32 |
| 57 | + cmake --build lapack/build32 --target install |
| 58 | + # 64 bit int |
| 59 | + cmake ${SHARED_OPT} -DBUILD_INDEX64=on -B lapack/build64 |
| 60 | + cmake --build lapack/build64 --target install |
| 61 | + - name: Restore DPC++ from cache |
| 62 | + id: cache-dpcpp |
| 63 | + uses: actions/cache@d4323d4df104b026a6aa633fdb11d772146be0bf # v4.2.2 |
| 64 | + with: |
| 65 | + path: dpcpp/install |
| 66 | + key: dpcpp-${{ env.DPCPP_VERSION }}-arm |
| 67 | + - name: Build DPC++ |
| 68 | + if: steps.domain_check.outputs.result == 'true' && steps.cache-dpcpp.outputs.cache-hit != 'true' |
| 69 | + run: | |
| 70 | + wget --progress=dot:giga -P dpcpp https://github.com/intel/llvm/archive/refs/tags/${{ env.DPCPP_VERSION }}.tar.gz |
| 71 | + cd dpcpp |
| 72 | + tar -xzf ${{ env.DPCPP_VERSION }}.tar.gz |
| 73 | + python llvm-${{ env.DPCPP_VERSION }}/buildbot/configure.py -o build -t Release --cmake-gen Ninja --native_cpu --cmake-opt="-DSYCL_ENABLE_BACKENDS=native_cpu" --cmake-opt="-DCMAKE_INSTALL_PREFIX=$PWD/install" --llvm-external-projects=openmp |
| 74 | + cd build |
| 75 | + ninja deploy-sycl-toolchain omp install |
| 76 | + - name: Install ArmPL |
| 77 | + if: steps.domain_check.outputs.result == 'true' |
| 78 | + run: | |
| 79 | + mkdir armpl |
| 80 | + cd armpl |
| 81 | + wget --progress=dot:giga https://developer.arm.com/-/cdn-downloads/permalink/Arm-Performance-Libraries/Version_${{ env.ARMPL_VERSION }}/arm-performance-libraries_${{ env.ARMPL_VERSION }}_deb_gcc.tar |
| 82 | + tar -xf arm-performance-libraries_${{ env.ARMPL_VERSION }}_deb_gcc.tar |
| 83 | + ./arm-performance-libraries_${{ env.ARMPL_VERSION }}_deb/arm-performance-libraries_${{ env.ARMPL_VERSION }}_deb.sh -a -i $PWD/install |
| 84 | + - name: Configure/Build for a domain |
| 85 | + if: steps.domain_check.outputs.result == 'true' |
| 86 | + run: | |
| 87 | + export PATH=${PWD}/armpl/install/armpl_${{ env.ARMPL_VERSION }}_gcc/bin:${PWD}/dpcpp/install/bin:${PATH} |
| 88 | + export CPATH=${PWD}/armpl/install/armpl_${{ env.ARMPL_VERSION }}_gcc/include:${PWD}/dpcpp/install/include:${CPATH} |
| 89 | + export LIBRARY_PATH=${PWD}/armpl/install/armpl_${{ env.ARMPL_VERSION }}_gcc/lib:${PWD}/dpcpp/install/lib:${PWD}/dpcpp/install/lib/aarch64-unknown-linux-gnu:${LIBRARY_PATH} |
| 90 | + export LD_LIBRARY_PATH=${PWD}/armpl/install/armpl_${{ env.ARMPL_VERSION }}_gcc/lib:${PWD}/dpcpp/install/lib:${PWD}/dpcpp/install/lib/aarch64-unknown-linux-gnu:${LD_LIBRARY_PATH} |
| 91 | + sycl-ls |
| 92 | + 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 |
| 93 | + cmake --build build |
| 94 | + - name: Run tests |
| 95 | + if: steps.domain_check.outputs.result == 'true' |
| 96 | + run: | |
| 97 | + export PATH=${PWD}/armpl/install/armpl_${{ env.ARMPL_VERSION }}_gcc/bin:${PWD}/dpcpp/install/bin:${PATH} |
| 98 | + export CPATH=${PWD}/armpl/install/armpl_${{ env.ARMPL_VERSION }}_gcc/include:${PWD}/dpcpp/install/include:${CPATH} |
| 99 | + export LIBRARY_PATH=${PWD}/armpl/install/armpl_${{ env.ARMPL_VERSION }}_gcc/lib:${PWD}/dpcpp/install/lib:${PWD}/dpcpp/install/lib/aarch64-unknown-linux-gnu:${LIBRARY_PATH} |
| 100 | + export LD_LIBRARY_PATH=${PWD}/armpl/install/armpl_${{ env.ARMPL_VERSION }}_gcc/lib:${PWD}/dpcpp/install/lib:${PWD}/dpcpp/install/lib/aarch64-unknown-linux-gnu:${LD_LIBRARY_PATH} |
| 101 | + sycl-ls |
| 102 | + ctest --test-dir build ${{ matrix.test_options }} |
0 commit comments