Skip to content

Commit

Permalink
Merge pull request #167 from sterrettm2/taskwait
Browse files Browse the repository at this point in the history
Fixes bug with nested OpenMP, fixed task threshold, extended tests range
  • Loading branch information
r-devulap authored Oct 4, 2024
2 parents c61ce8f + 5cc9216 commit f99c392
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 16 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build-numpy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
np-multiarray-tgl:

if: github.repository == 'intel/x86-simd-sort'
runs-on: intel-ubuntu-latest
runs-on: intel-ubuntu-24.04

steps:
- name: Checkout x86-simd-sort
Expand Down Expand Up @@ -80,7 +80,7 @@ jobs:
np-multiarray-spr:

if: github.repository == 'intel/x86-simd-sort'
runs-on: intel-ubuntu-latest
runs-on: intel-ubuntu-24.04

steps:
- name: Checkout x86-simd-sort
Expand Down
19 changes: 9 additions & 10 deletions .github/workflows/c-cpp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ permissions: read-all
jobs:
SKL-gcc9:

runs-on: intel-ubuntu-latest
runs-on: intel-ubuntu-24.04

steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
Expand Down Expand Up @@ -41,7 +41,7 @@ jobs:

SKX-gcc10:

runs-on: intel-ubuntu-latest
runs-on: intel-ubuntu-24.04

steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
Expand Down Expand Up @@ -71,7 +71,7 @@ jobs:

TGL-gcc11:

runs-on: intel-ubuntu-latest
runs-on: intel-ubuntu-24.04

steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
Expand Down Expand Up @@ -100,7 +100,7 @@ jobs:

SPR-gcc13:

runs-on: intel-ubuntu-latest
runs-on: intel-ubuntu-24.04

steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
Expand Down Expand Up @@ -137,7 +137,7 @@ jobs:

SKX-SKL-openmp:

runs-on: intel-ubuntu-latest
runs-on: intel-ubuntu-24.04

steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
Expand Down Expand Up @@ -169,7 +169,7 @@ jobs:
SPR-gcc13-special-cases:

runs-on: intel-ubuntu-latest
runs-on: intel-ubuntu-24.04

steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
Expand Down Expand Up @@ -204,7 +204,7 @@ jobs:

manylinux-32bit:

runs-on: intel-ubuntu-latest
runs-on: intel-ubuntu-24.04

steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
Expand All @@ -216,7 +216,7 @@ jobs:
SPR-icpx:

runs-on: intel-ubuntu-latest
runs-on: intel-ubuntu-24.04

steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
Expand All @@ -226,8 +226,7 @@ jobs:
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
sudo apt --allow-unauthenticated -y install intel-oneapi-compiler-dpcpp-cpp libgtest-dev curl git python3-pip meson
- name: Install Intel SDE
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/linting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ permissions: read-all
jobs:
clang-format:

runs-on: intel-ubuntu-latest
runs-on: intel-ubuntu-24.04

steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/scorecard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:

name: Scorecard analysis
if: github.repository == 'intel/x86-simd-sort'
runs-on: ubuntu-latest
runs-on: intel-ubuntu-24.04
permissions:
# Needed to upload the results to code-scanning dashboard.
security-events: write
Expand Down
9 changes: 7 additions & 2 deletions src/xss-common-keyvaluesort.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -559,9 +559,14 @@ X86_SIMD_SORT_INLINE void xss_qsort_kv(
keys, indexes, 0, arrsize - 1, maxiters, task_threshold);
}
else {
kvsort_<keytype, valtype>(
keys, indexes, 0, arrsize - 1, maxiters, 0);
kvsort_<keytype, valtype>(keys,
indexes,
0,
arrsize - 1,
maxiters,
std::numeric_limits<arrsize_t>::max());
}
#pragma omp taskwait
#else
kvsort_<keytype, valtype>(keys, indexes, 0, arrsize - 1, maxiters, 0);
#endif
Expand Down
4 changes: 4 additions & 0 deletions tests/test-keyvalue.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ class simdkvsort : public ::testing::Test {
simdkvsort()
{
std::iota(arrsize.begin(), arrsize.end(), 1);
arrsize.push_back(10'000);
arrsize.push_back(100'000);
arrsize.push_back(1'000'000);

arrtype = {"random",
"constant",
"sorted",
Expand Down

0 comments on commit f99c392

Please sign in to comment.