Skip to content

Commit 8549cc3

Browse files
author
Raghuveer Devulapalli
committed
Add new CI to test parition_avx512 code
1 parent 3dd2d13 commit 8549cc3

File tree

4 files changed

+67
-0
lines changed

4 files changed

+67
-0
lines changed

.github/workflows/c-cpp.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,3 +125,34 @@ jobs:
125125
126126
- name: Run test suite on SPR
127127
run: sde -spr -- ./builddir/testexe
128+
129+
SPR-gcc13-min-networksort:
130+
131+
runs-on: intel-ubuntu-latest
132+
133+
steps:
134+
- uses: actions/checkout@v3
135+
136+
- name: Install dependencies
137+
run: |
138+
sudo apt update
139+
sudo apt -y install g++-13 libgtest-dev meson curl git cmake
140+
141+
- name: Install Intel SDE
142+
run: |
143+
curl -o /tmp/sde.tar.xz https://downloadmirror.intel.com/784319/sde-external-9.24.0-2023-07-13-lin.tar.xz
144+
mkdir /tmp/sde && tar -xvf /tmp/sde.tar.xz -C /tmp/sde/
145+
sudo mv /tmp/sde/* /opt/sde && sudo ln -s /opt/sde/sde64 /usr/bin/sde
146+
147+
- name: Build
148+
env:
149+
CXX: g++-13
150+
CXXFLAGS: -DXSS_MINIMAL_NETWORK_SORT
151+
run: |
152+
make clean
153+
meson setup --warnlevel 2 --werror --buildtype release builddir
154+
cd builddir
155+
ninja
156+
157+
- name: Run test suite on SPR
158+
run: sde -spr -- ./builddir/testexe

src/avx512-16bit-qsort.hpp

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,11 @@ struct zmm_vector<float16> {
2020
using halfreg_t = __m256i;
2121
using opmask_t = __mmask32;
2222
static const uint8_t numlanes = 32;
23+
#ifdef XSS_MINIMAL_NETWORK_SORT
24+
static constexpr int network_sort_threshold = numlanes;
25+
#else
2326
static constexpr int network_sort_threshold = 512;
27+
#endif
2428
static constexpr int partition_unroll_factor = 0;
2529

2630
using swizzle_ops = avx512_16bit_swizzle_ops;
@@ -182,7 +186,11 @@ struct zmm_vector<int16_t> {
182186
using halfreg_t = __m256i;
183187
using opmask_t = __mmask32;
184188
static const uint8_t numlanes = 32;
189+
#ifdef XSS_MINIMAL_NETWORK_SORT
190+
static constexpr int network_sort_threshold = numlanes;
191+
#else
185192
static constexpr int network_sort_threshold = 512;
193+
#endif
186194
static constexpr int partition_unroll_factor = 0;
187195

188196
using swizzle_ops = avx512_16bit_swizzle_ops;
@@ -301,7 +309,11 @@ struct zmm_vector<uint16_t> {
301309
using halfreg_t = __m256i;
302310
using opmask_t = __mmask32;
303311
static const uint8_t numlanes = 32;
312+
#ifdef XSS_MINIMAL_NETWORK_SORT
313+
static constexpr int network_sort_threshold = numlanes;
314+
#else
304315
static constexpr int network_sort_threshold = 512;
316+
#endif
305317
static constexpr int partition_unroll_factor = 0;
306318

307319
using swizzle_ops = avx512_16bit_swizzle_ops;

src/avx512-32bit-qsort.hpp

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,11 @@ struct zmm_vector<int32_t> {
3636
using halfreg_t = __m256i;
3737
using opmask_t = __mmask16;
3838
static const uint8_t numlanes = 16;
39+
#ifdef XSS_MINIMAL_NETWORK_SORT
40+
static constexpr int network_sort_threshold = numlanes;
41+
#else
3942
static constexpr int network_sort_threshold = 512;
43+
#endif
4044
static constexpr int partition_unroll_factor = 8;
4145

4246
using swizzle_ops = avx512_32bit_swizzle_ops;
@@ -159,7 +163,11 @@ struct zmm_vector<uint32_t> {
159163
using halfreg_t = __m256i;
160164
using opmask_t = __mmask16;
161165
static const uint8_t numlanes = 16;
166+
#ifdef XSS_MINIMAL_NETWORK_SORT
167+
static constexpr int network_sort_threshold = numlanes;
168+
#else
162169
static constexpr int network_sort_threshold = 512;
170+
#endif
163171
static constexpr int partition_unroll_factor = 8;
164172

165173
using swizzle_ops = avx512_32bit_swizzle_ops;
@@ -282,7 +290,11 @@ struct zmm_vector<float> {
282290
using halfreg_t = __m256;
283291
using opmask_t = __mmask16;
284292
static const uint8_t numlanes = 16;
293+
#ifdef XSS_MINIMAL_NETWORK_SORT
294+
static constexpr int network_sort_threshold = numlanes;
295+
#else
285296
static constexpr int network_sort_threshold = 512;
297+
#endif
286298
static constexpr int partition_unroll_factor = 8;
287299

288300
using swizzle_ops = avx512_32bit_swizzle_ops;

src/avx512-64bit-common.h

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -484,7 +484,11 @@ struct zmm_vector<int64_t> {
484484
using halfreg_t = __m512i;
485485
using opmask_t = __mmask8;
486486
static const uint8_t numlanes = 8;
487+
#ifdef XSS_MINIMAL_NETWORK_SORT
488+
static constexpr int network_sort_threshold = numlanes;
489+
#else
487490
static constexpr int network_sort_threshold = 256;
491+
#endif
488492
static constexpr int partition_unroll_factor = 8;
489493

490494
using swizzle_ops = avx512_64bit_swizzle_ops;
@@ -640,7 +644,11 @@ struct zmm_vector<uint64_t> {
640644
using halfreg_t = __m512i;
641645
using opmask_t = __mmask8;
642646
static const uint8_t numlanes = 8;
647+
#ifdef XSS_MINIMAL_NETWORK_SORT
648+
static constexpr int network_sort_threshold = numlanes;
649+
#else
643650
static constexpr int network_sort_threshold = 256;
651+
#endif
644652
static constexpr int partition_unroll_factor = 8;
645653

646654
using swizzle_ops = avx512_64bit_swizzle_ops;
@@ -788,7 +796,11 @@ struct zmm_vector<double> {
788796
using halfreg_t = __m512d;
789797
using opmask_t = __mmask8;
790798
static const uint8_t numlanes = 8;
799+
#ifdef XSS_MINIMAL_NETWORK_SORT
800+
static constexpr int network_sort_threshold = numlanes;
801+
#else
791802
static constexpr int network_sort_threshold = 256;
803+
#endif
792804
static constexpr int partition_unroll_factor = 8;
793805

794806
using swizzle_ops = avx512_64bit_swizzle_ops;

0 commit comments

Comments
 (0)