Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
99782e9
Update xss-common-includes.h
icfaust Feb 14, 2024
10c66ad
Update xss-common-includes.h
icfaust Feb 14, 2024
31e7dc9
Update avx2-32bit-qsort.hpp
icfaust Feb 14, 2024
120fd38
Update avx2-64bit-qsort.hpp
icfaust Feb 14, 2024
b179b60
add docker CI test using intel basekit
icfaust Feb 14, 2024
bf3d055
generalize python
icfaust Feb 14, 2024
e2fa52b
forgot a then
icfaust Feb 14, 2024
440231b
pip issues
icfaust Feb 14, 2024
5bedf66
unable to find pip
icfaust Feb 14, 2024
6ee04eb
set ffmath optimizations for icx and isNaN support
icfaust Feb 14, 2024
3f77158
test to see if cxxflags is getting set
icfaust Feb 14, 2024
98cc321
bash spacing issue correction
icfaust Feb 14, 2024
0f3da6a
small comment out to test overall status
icfaust Feb 14, 2024
1d9a374
may have incorrectly called the compiler
icfaust Feb 14, 2024
5b1ff41
see if linking to /usr/bin causes the problem
icfaust Feb 14, 2024
1470014
bad clang format
icfaust Feb 14, 2024
b4313fe
EOF
icfaust Feb 14, 2024
f7dc230
weirdness with file movement in docker
icfaust Feb 14, 2024
910b123
reverted changes to docker shell script
icfaust Feb 14, 2024
e49fe20
move away from docker
icfaust Feb 14, 2024
11136c8
rename back to 32bit
icfaust Feb 14, 2024
9902a7f
missing the intel apt-get repository
icfaust Feb 14, 2024
7107413
dev to deb
icfaust Feb 14, 2024
771ff88
deal with key problem with override
icfaust Feb 14, 2024
a17d54b
add sources
icfaust Feb 14, 2024
8ff93f6
switch to basekit
icfaust Feb 14, 2024
a94511b
allow unauthenticated
icfaust Feb 14, 2024
eeee62a
add setvars.sh
icfaust Feb 14, 2024
35af511
move sourcing
icfaust Feb 14, 2024
0e4097c
add cxxflags to examples
icfaust Feb 14, 2024
6c87b15
wrong parantheses
icfaust Feb 14, 2024
c33402a
remove source
icfaust Feb 14, 2024
614f2a2
add check
icfaust Feb 14, 2024
bc23e06
add source again
icfaust Feb 14, 2024
bacbc83
out of date meson check
icfaust Feb 14, 2024
15194a2
Update c-cpp.yml
icfaust Feb 14, 2024
210890b
Update c-cpp.yml
icfaust Feb 14, 2024
9f74bf1
__GNUC__ defined to be 4 for icc/icpx
icfaust Feb 15, 2024
0c672f8
remove examples due to timeout
icfaust Feb 15, 2024
7838cf7
readd examples, remove icpx loop unrolling
icfaust Feb 15, 2024
3c8911f
forgot to remove comment out
icfaust Feb 15, 2024
75b1731
Update x86simdsort.cpp
icfaust Feb 15, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 47 additions & 0 deletions .github/workflows/c-cpp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -179,3 +179,50 @@ jobs:
run: |
docker run -v $(pwd):/xss quay.io/pypa/manylinux2014_i686 \
/bin/bash -xc "source /xss/.github/workflows/build-test-on-32bit.sh"

SPR-icpx:

runs-on: intel-ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Install dependencies
run: |
echo "deb https://apt.repos.intel.com/oneapi all main" | sudo tee /etc/apt/sources.list.d/oneAPI.list
sudo add-apt-repository -y "deb https://apt.repos.intel.com/oneapi all main"
sudo apt update --allow-insecure-repositories
sudo apt --allow-unauthenticated -y install intel-oneapi-compiler-dpcpp-cpp libgtest-dev curl git python3-pip
sudo pip3 install meson ninja

- name: Install Intel SDE
run: |
curl -o /tmp/sde.tar.xz https://downloadmirror.intel.com/784319/sde-external-9.24.0-2023-07-13-lin.tar.xz
mkdir /tmp/sde && tar -xvf /tmp/sde.tar.xz -C /tmp/sde/
sudo mv /tmp/sde/* /opt/sde && sudo ln -s /opt/sde/sde64 /usr/bin/sde

- name: Build examples
env:
CXX: icpx
CXXFLAGS: -fp-model=precise
run: |
source /opt/intel/oneapi/setvars.sh
cd examples
make all

- name: Build
env:
CXX: icpx
CXXFLAGS: -fp-model=precise
run: |
make clean
source /opt/intel/oneapi/setvars.sh
icpx --version
meson setup -Dbuild_tests=true --warnlevel 2 --werror --buildtype release builddir
cd builddir
ninja

- name: Run test suite on SPR
run: |
source /opt/intel/oneapi/setvars.sh
sde -spr -- ./builddir/testexe
2 changes: 1 addition & 1 deletion examples/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
CXX ?= g++-12
CFLAGS = -I../src -std=c++17 -O3
CFLAGS = -I../src -std=c++17 -O3 $(if $(CXXFLAGS),$(CXXFLAGS),)
EXE = qsort32avx2 argsort kvsort qsortfp16 qsort16 qsort32 qsort64

default: all
Expand Down
2 changes: 1 addition & 1 deletion lib/x86simdsort.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ static int check_cpu_feature_support(std::string_view cpufeature)
const char *disable_avx512 = std::getenv("XSS_DISABLE_AVX512");

if ((cpufeature == "avx512_spr") && (!disable_avx512))
#ifdef __FLT16_MAX__
#if defined(__FLT16_MAX__) && !defined(__INTEL_LLVM_COMPILER)
return __builtin_cpu_supports("avx512f")
&& __builtin_cpu_supports("avx512fp16")
&& __builtin_cpu_supports("avx512vbmi2");
Expand Down
6 changes: 2 additions & 4 deletions src/avx2-32bit-qsort.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -418,12 +418,10 @@ struct avx2_vector<float> {
template <int type>
static opmask_t fpclass(reg_t x)
{
if constexpr (type == (0x01 | 0x80)) {
return _mm256_castps_si256(_mm256_cmp_ps(x, x, _CMP_UNORD_Q));
}
else {
if constexpr (type != (0x01 | 0x80)) {
static_assert(type == (0x01 | 0x80), "should not reach here");
}
return _mm256_castps_si256(_mm256_cmp_ps(x, x, _CMP_UNORD_Q));
}
template <int scale>
static reg_t
Expand Down
6 changes: 2 additions & 4 deletions src/avx2-64bit-qsort.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -433,12 +433,10 @@ struct avx2_vector<double> {
template <int type>
static opmask_t fpclass(reg_t x)
{
if constexpr (type == (0x01 | 0x80)) {
return _mm256_castpd_si256(_mm256_cmp_pd(x, x, _CMP_UNORD_Q));
}
else {
if constexpr (type != (0x01 | 0x80)) {
static_assert(type == (0x01 | 0x80), "should not reach here");
}
return _mm256_castpd_si256(_mm256_cmp_pd(x, x, _CMP_UNORD_Q));
}
static ymmi_t seti(int v1, int v2, int v3, int v4)
{
Expand Down
4 changes: 3 additions & 1 deletion src/xss-common-includes.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,9 @@
#define UNLIKELY(x) (x)
#endif

#if __GNUC__ >= 8 and !defined(__SANITIZE_ADDRESS__)
#if defined(__INTEL_COMPILER) and !defined(__SANITIZE_ADDRESS__)
#define X86_SIMD_SORT_UNROLL_LOOP(num) PRAGMA(unroll(num))
#elif __GNUC__ >= 8 and !defined(__SANITIZE_ADDRESS__)
#define X86_SIMD_SORT_UNROLL_LOOP(num) PRAGMA(GCC unroll num)
#else
#define X86_SIMD_SORT_UNROLL_LOOP(num)
Expand Down