-
Notifications
You must be signed in to change notification settings - Fork 309
124 lines (121 loc) · 5.26 KB
/
Copy pathlinux.yml
File metadata and controls
124 lines (121 loc) · 5.26 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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
name: Linux x86 build
on: [push, pull_request]
concurrency:
group: ${{ github.workflow }}-${{ github.job }}-${{ github.ref }}
cancel-in-progress: true
defaults:
run:
shell: bash -l {0}
jobs:
build:
runs-on: ubuntu-latest
name: '${{ matrix.sys.compiler }} ${{ matrix.sys.version }} - ${{ matrix.sys.arch }} ${{ join(matrix.sys.flags, '' '') }}'
strategy:
matrix:
sys:
- { compiler: 'gcc', version: '13', arch: 'native', flags: ['xtl-complex'] }
- { compiler: 'gcc', version: '14', arch: 'avx', flags: [] }
- { compiler: 'gcc', version: '14', arch: 'avx2', flags: [] }
- { compiler: 'gcc', version: '13', arch: 'avx512bw', flags: [] }
- { compiler: 'gcc', version: '10', arch: 'avx512bw', flags: [] }
- { compiler: 'gcc', version: '12', arch: 'native', flags: ['32bits'] }
- { compiler: 'gcc', version: '13', arch: 'avx512pf', flags: [] }
- { compiler: 'gcc', version: '13', arch: 'avx512vbmi', flags: [] }
- { compiler: 'gcc', version: '14', arch: 'avx512vbmi2', flags: [] }
- { compiler: 'gcc', version: '13', arch: 'avx512vnni_avx512bw', flags: [] }
- { compiler: 'clang', version: '16', arch: 'native', flags: ['xtl-complex'] }
- { compiler: 'clang', version: '17', arch: 'avx', flags: [] }
- { compiler: 'clang', version: '17', arch: 'sse3', flags: [] }
- { compiler: 'clang', version: '18', arch: 'avx512bw', flags: [] }
- { compiler: 'clang', version: '18', arch: 'avx_128', flags: [] }
- { compiler: 'clang', version: '18', arch: 'avx2_128', flags: [] }
- { compiler: 'clang', version: '18', arch: 'avx512vl_128', flags: [] }
- { compiler: 'clang', version: '18', arch: 'avx512vl_256', flags: [] }
steps:
- name: Checkout xsimd
uses: actions/checkout@v6
- name: Setup compiler
uses: ./.github/actions/setup-compiler-apt
with:
compiler: ${{ matrix.sys.compiler }}
version: ${{ matrix.sys.version }}
i386: ${{ contains(matrix.sys.flags, '32bits') }}
- name: Install mamba
uses: mamba-org/setup-micromamba@v2
with:
environment-file: environment.yml
- name: Setup SDE
if: startswith(matrix.sys.arch, 'avx512')
run: sh install_sde.sh
- name: Configure build
env:
CC: ${{ env.CC }}
CXX: ${{ env.CXX }}
run: |
CMAKE_ARGS=()
if [[ '${{ contains(matrix.sys.flags, 'xtl-complex') }}' == 'true' ]]; then
CMAKE_ARGS+=(-D ENABLE_XTL_COMPLEX=ON)
fi
if [[ '${{ contains(matrix.sys.flags, '32bits') }}' == 'true' ]]; then
CMAKE_ARGS+=(-D CMAKE_CXX_FLAGS=-m32)
fi
cmake -B build/ -G Ninja \
-D CMAKE_C_COMPILER="$CC" \
-D CMAKE_CXX_COMPILER="$CXX" \
-D CMAKE_BUILD_TYPE=Release \
-D BUILD_TESTS=ON \
-D BUILD_EXAMPLES=ON \
-D BUILD_ARCHITECTURE_TESTS=OFF \
-D XSIMD_ENABLE_WERROR=ON \
-D XSIMD_HARDEN_TRIVIAL_AUTO_VAR_INIT=ON \
-D TARGET_ARCH="${{ matrix.sys.arch }}" \
"${CMAKE_ARGS[@]}"
- name: Build
run: cmake --build build/
- name: Test
run: |
# Set CPU feature test expectations, 0 is explicit absence of the feature
export XSIMD_TEST_CPU_ASSUME_NEON64="0"
export XSIMD_TEST_CPU_ASSUME_RVV="0"
export XSIMD_TEST_CPU_ASSUME_VSX="0"
export XSIMD_TEST_CPU_ASSUME_VXE="0"
cd build/test
if echo '${{ matrix.sys.arch }}' | grep -q 'avx512' ; then
# Running with emulation, must have AVX512, lower tier are checked by implications in tests
export XSIMD_TEST_CPU_ASSUME_AVX512F="1"
../../sde-external-9.48.0-2024-11-25-lin/sde64 -tgl -- ./test_xsimd
else
export XSIMD_TEST_CPU_ASSUME_SSE4_2=$(grep -q 'sse4_2' /proc/cpuinfo && echo "1" || echo "0")
export XSIMD_TEST_CPU_ASSUME_AVX=$(grep -q 'avx' /proc/cpuinfo && echo "1" || echo "0")
export XSIMD_TEST_CPU_ASSUME_AVX512F=$(grep -q 'avx512f' /proc/cpuinfo && echo "1" || echo "0")
export XSIMD_TEST_CPU_ASSUME_MANUFACTURER="intel,amd"
./test_xsimd
fi
build-extra:
runs-on: ubuntu-latest
name: 'clang 18 - architectures and benchmark'
steps:
- name: Checkout xsimd
uses: actions/checkout@v6
- name: Setup compiler
uses: ./.github/actions/setup-compiler-apt
with:
compiler: clang
version: 18
- name: Install mamba
uses: mamba-org/setup-micromamba@v2
with:
environment-file: environment.yml
- name: Configure build
run: |
cmake -B build/ -G Ninja \
-D CMAKE_BUILD_TYPE=Release \
-D CMAKE_C_COMPILER="$CC" \
-D CMAKE_CXX_COMPILER="$CXX" \
-D BUILD_TESTS=ON \
-D BUILD_ARCHITECTURE_TESTS=ON \
-D BUILD_BENCHMARK=ON \
-D XSIMD_ENABLE_WERROR=ON \
-D XSIMD_HARDEN_TRIVIAL_AUTO_VAR_INIT=ON \
- name: Build
run: cmake --build build/