-
Notifications
You must be signed in to change notification settings - Fork 18
64 lines (62 loc) · 2.02 KB
/
multiarch.yml
File metadata and controls
64 lines (62 loc) · 2.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
name: Multi-Arch Local Tests
on:
push:
jobs:
check-commit:
runs-on: ubuntu-24.04
outputs:
run_tests: ${{ steps.check_message.outputs.run_tests }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Check commit message
id: check_message
run: |
if git log -1 --pretty=%B | grep -q "MARCHTEST"; then
echo "run_tests=true" >> "$GITHUB_OUTPUT"
else
echo "run_tests=false" >> "$GITHUB_OUTPUT"
fi
tests:
needs: check-commit
if: needs.check-commit.outputs.run_tests == 'true'
strategy:
fail-fast: false
matrix:
device: [cpu, amd-gpu, nvidia-gpu]
precision: [double, single]
mpi: [serial, parallel]
exclude: # my AMD GPU doesn't support fp64 atomics : (
- device: amd-gpu
precision: double
- device: amd-gpu
mpi: parallel
- device: nvidia-gpu
mpi: parallel
runs-on: [self-hosted, "${{ matrix.device }}"]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Configure
run: |
if [ "${{ matrix.device }}" = "nvidia-gpu" ]; then
FLAGS="-D Kokkos_ENABLE_CUDA=ON"
if [[ ! -z $(nvidia-smi | grep "V100") ]]; then
FLAGS+=" -D Kokkos_ARCH_VOLTA70=ON"
elif [[ ! -z $(nvidia-smi | grep "A100") ]]; then
FLAGS+=" -D Kokkos_ARCH_AMPERE80=ON"
else
FLAGS+=" -D Kokkos_ARCH_AMPERE86=ON"
fi
elif [ "${{ matrix.device }}" = "amd-gpu" ]; then
FLAGS="-D Kokkos_ENABLE_HIP=ON -D Kokkos_ARCH_AMD_GFX1100=ON"
elif [ "${{ matrix.mpi }}" = "parallel" ]; then
FLAGS="-D mpi=ON"
fi
cmake -B build -D TESTS=ON -D output=ON -D precision=${{ matrix.precision }} $FLAGS
- name: Compile
run: |
cmake --build build -j $(nproc)
- name: Run tests
run: |
ctest --test-dir build --output-on-failure --verbose