@@ -10,28 +10,28 @@ defaults:
1010jobs :
1111 build :
1212 runs-on : ubuntu-latest
13- name : ' ${{ matrix.sys.compiler }} ${{ matrix.sys.version }} - ${{ matrix.sys.flags }}'
13+ name : ' ${{ matrix.sys.compiler }} ${{ matrix.sys.version }} - ${{ matrix.sys.preset }} - ${{ matrix.sys. flags }}'
1414 strategy :
1515 matrix :
1616 sys :
17- - { compiler: 'gcc', version: '12', flags: 'force_no_instr_set' }
18- - { compiler: 'gcc', version: '13', flags: 'enable_xtl_complex' }
19- - { compiler: 'gcc', version: '14', flags: 'avx' }
20- - { compiler: 'gcc', version: '14', flags: 'avx2' }
21- - { compiler: 'gcc', version: '13', flags: 'avx512 ' }
22- - { compiler: 'gcc', version: '10', flags: 'avx512 ' }
23- - { compiler: 'gcc', version: '12', flags: 'i386' }
24- - { compiler: 'gcc', version: '13', flags: 'avx512pf' }
25- - { compiler: 'gcc', version: '13', flags: 'avx512vbmi' }
26- - { compiler: 'gcc', version: '14', flags: 'avx512vbmi2' }
27- - { compiler: 'gcc', version: '13', flags: 'avx512vnni ' }
28- - { compiler: 'clang', version: '16', flags: 'force_no_instr_set' }
29- - { compiler: 'clang', version: '16', flags: 'enable_xtl_complex' }
30- - { compiler: 'clang', version: '17', flags: 'avx' }
31- - { compiler: 'clang', version: '17', flags: 'sse3' }
32- - { compiler: 'clang', version: '18', flags: 'avx512 ' }
33- - { compiler: 'clang', version: '18', flags: 'avx_128' }
34- - { compiler: 'clang', version: '18', flags: 'avx2_128' }
17+ - { compiler: 'gcc', version: '12', flags: 'force_no_instr_set', preset: 'native' }
18+ - { compiler: 'gcc', version: '13', flags: 'enable_xtl_complex', preset: 'native' }
19+ - { compiler: 'gcc', version: '14', flags: '', preset: ' avx' }
20+ - { compiler: 'gcc', version: '14', flags: '', preset: ' avx2' }
21+ - { compiler: 'gcc', version: '13', flags: '', preset: 'avx512f ' }
22+ - { compiler: 'gcc', version: '10', flags: '', preset: 'avx512f ' }
23+ - { compiler: 'gcc', version: '12', flags: 'i386', preset: 'native' }
24+ - { compiler: 'gcc', version: '13', flags: '', preset: ' avx512pf' }
25+ - { compiler: 'gcc', version: '13', flags: '', preset: ' avx512vbmi' }
26+ - { compiler: 'gcc', version: '14', flags: '', preset: ' avx512vbmi2' }
27+ - { compiler: 'gcc', version: '13', flags: '', preset: 'avx512vnni_avx512bw ' }
28+ - { compiler: 'clang', version: '16', flags: 'force_no_instr_set', preset: 'native' }
29+ - { compiler: 'clang', version: '16', flags: 'enable_xtl_complex', preset: 'native' }
30+ - { compiler: 'clang', version: '17', flags: '', preset: ' avx' }
31+ - { compiler: 'clang', version: '17', flags: '', preset: ' sse3' }
32+ - { compiler: 'clang', version: '18', flags: '', preset: 'avx512f ' }
33+ - { compiler: 'clang', version: '18', flags: '', preset: ' avx_128' }
34+ - { compiler: 'clang', version: '18', flags: '', preset: ' avx2_128' }
3535 steps :
3636 - name : Setup compiler
3737 if : ${{ matrix.sys.compiler == 'gcc' }}
@@ -62,11 +62,11 @@ jobs:
6262 - name : Checkout xsimd
6363 uses : actions/checkout@v6
6464 - name : Install mamba
65- uses : mamba-org/setup-micromamba@v2
65+ uses : mamba-org/setup-micromamba@v3
6666 with :
6767 environment-file : environment.yml
6868 - name : Setup SDE
69- if : startswith(matrix.sys.flags , 'avx512')
69+ if : startswith(matrix.sys.preset , 'avx512')
7070 run : sh install_sde.sh
7171 - name : Configure build
7272 env :
@@ -76,49 +76,18 @@ jobs:
7676 if [[ '${{ matrix.sys.flags }}' == 'enable_xtl_complex' ]]; then
7777 CMAKE_EXTRA_ARGS="$CMAKE_EXTRA_ARGS -DENABLE_XTL_COMPLEX=ON"
7878 fi
79- if [[ '${{ matrix.sys.flags }}' == 'avx' ]]; then
80- CMAKE_EXTRA_ARGS="$CMAKE_EXTRA_ARGS -DTARGET_ARCH=sandybridge"
81- fi
82- if [[ '${{ matrix.sys.flags }}' == 'avx_128' ]]; then
83- CMAKE_EXTRA_ARGS="$CMAKE_EXTRA_ARGS -DTARGET_ARCH=sandybridge -DXSIMD_DEFAULT_ARCH=avx_128"
84- fi
85- if [[ '${{ matrix.sys.flags }}' == 'avx2' ]]; then
86- CMAKE_EXTRA_ARGS="$CMAKE_EXTRA_ARGS -DTARGET_ARCH=haswell"
87- fi
88- if [[ '${{ matrix.sys.flags }}' == 'avx2_128' ]]; then
89- CMAKE_EXTRA_ARGS="$CMAKE_EXTRA_ARGS -DTARGET_ARCH=haswell -DXSIMD_DEFAULT_ARCH=avx2_128"
90- fi
91- if [[ '${{ matrix.sys.flags }}' == 'sse3' ]]; then
92- CMAKE_EXTRA_ARGS="$CMAKE_EXTRA_ARGS -DTARGET_ARCH=nocona"
93- fi
94- if [[ '${{ matrix.sys.flags }}' == 'avx512' ]]; then
95- CMAKE_EXTRA_ARGS="$CMAKE_EXTRA_ARGS -DTARGET_ARCH=skylake-avx512"
96- fi
97- if [[ '${{ matrix.sys.flags }}' == 'avx512pf' ]]; then
98- CMAKE_EXTRA_ARGS="$CMAKE_EXTRA_ARGS -DTARGET_ARCH=knl"
99- fi
100- if [[ '${{ matrix.sys.flags }}' == 'avx512vbmi' ]]; then
101- CMAKE_EXTRA_ARGS="$CMAKE_EXTRA_ARGS -DTARGET_ARCH=cannonlake"
102- fi
103- if [[ '${{ matrix.sys.flags }}' == 'avx512vbmi2' ]]; then
104- CMAKE_EXTRA_ARGS="$CMAKE_EXTRA_ARGS -DTARGET_ARCH=icelake-server"
105- fi
106- if [[ '${{ matrix.sys.flags }}' == 'avx512vnni' ]]; then
107- CMAKE_EXTRA_ARGS="$CMAKE_EXTRA_ARGS -DTARGET_ARCH=knm"
108- fi
10979 if [[ '${{ matrix.sys.flags }}' == 'i386' ]]; then
110- CXX_FLAGS ="$CXX_FLAGS -m32"
80+ export CXXFLAGS ="$CXXFLAGS -m32"
11181 fi
112- if [[ '${{ matrix.sys.flags }}' == 'force_no_instr_set' ]]; then
113- :
114- else
82+ if [[ '${{ matrix.sys.flags }}' != 'force_no_instr_set' ]]; then
11583 CMAKE_EXTRA_ARGS="$CMAKE_EXTRA_ARGS -DXSIMD_ENABLE_WERROR=ON"
11684 fi
11785
118- # Cheap way of spotting uninitialized read
119- CXX_FLAGS ="$CXX_FLAGS -ftrivial-auto-var-init=pattern"
86+ # Cheap way of spotting uninitialized read; presets pick this up via $env{CXXFLAGS}.
87+ export CXXFLAGS ="$CXXFLAGS -ftrivial-auto-var-init=pattern"
12088
12189 cmake -B _build \
90+ --preset ${{ matrix.sys.preset }} \
12291 -DBUILD_TESTS=ON \
12392 -DBUILD_BENCHMARK=ON \
12493 -DBUILD_EXAMPLES=ON \
@@ -138,7 +107,7 @@ jobs:
138107 export XSIMD_TEST_CPU_ASSUME_VSX="0"
139108 export XSIMD_TEST_CPU_ASSUME_VXE="0"
140109 cd _build/test
141- if echo '${{ matrix.sys.flags }}' | grep -q 'avx512' ; then
110+ if echo '${{ matrix.sys.preset }}' | grep -q 'avx512' ; then
142111 # Running with emulation, must have AVX512, lower tier are checked by implications in tests
143112 export XSIMD_TEST_CPU_ASSUME_AVX512F="1"
144113 ../../sde-external-9.48.0-2024-11-25-lin/sde64 -tgl -- ./test_xsimd
0 commit comments