Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add icpx 2024.0 with OpenMP to the CI #2209

Draft
wants to merge 1 commit into
base: develop
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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
19 changes: 11 additions & 8 deletions include/alpaka/atomic/AtomicOmpBuiltIn.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ namespace alpaka
template<typename T, typename THierarchy>
struct AtomicOp<AtomicMin, AtomicOmpBuiltIn, T, THierarchy>
{
ALPAKA_FN_HOST static auto atomicOp(AtomicOmpBuiltIn const&, T* const addr, T const& value) -> T
ALPAKA_FN_HOST static auto atomicOp(AtomicOmpBuiltIn const&, T* const addr, T value) -> T
{
T old;
auto& ref(*addr);
Expand All @@ -188,7 +188,9 @@ namespace alpaka
{
old = ref;
if(value < ref)
{
ref = value;
}
}
return old;
}
Expand All @@ -198,7 +200,7 @@ namespace alpaka
template<typename T, typename THierarchy>
struct AtomicOp<AtomicMax, AtomicOmpBuiltIn, T, THierarchy>
{
ALPAKA_FN_HOST static auto atomicOp(AtomicOmpBuiltIn const&, T* const addr, T const& value) -> T
ALPAKA_FN_HOST static auto atomicOp(AtomicOmpBuiltIn const&, T* const addr, T value) -> T
{
T old;
auto& ref(*addr);
Expand All @@ -207,7 +209,9 @@ namespace alpaka
{
old = ref;
if(value > ref)
{
ref = value;
}
}
return old;
}
Expand Down Expand Up @@ -249,19 +253,18 @@ namespace alpaka
template<typename T, typename THierarchy>
struct AtomicOp<AtomicCas, AtomicOmpBuiltIn, T, THierarchy>
{
ALPAKA_FN_HOST static auto atomicOp(
AtomicOmpBuiltIn const&,
T* const addr,
T const& compare,
T const& value) -> T
ALPAKA_FN_HOST static auto atomicOp(AtomicOmpBuiltIn const&, T* const addr, T compare, T value) -> T
{
T old;
auto& ref(*addr);
// atomically update ref, but capture the original value in old
# pragma omp atomic capture compare
{
old = ref;
ref = (ref == compare ? value : ref);
if(ref == compare)
{
ref = value;
}
}
return old;
}
Expand Down
9 changes: 7 additions & 2 deletions script/install_oneapi.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,13 @@ then
# The compiler will automatically pull in OpenMP and TBB as dependencies
components=(
intel-oneapi-common-vars # Contains /opt/intel/oneapi/setvars.sh - has no version number
intel-oneapi-compiler-dpcpp-cpp-"${ALPAKA_CI_ONEAPI_VERSION}" # Contains icpx compiler and SYCL runtime
intel-oneapi-runtime-opencl # Required to run SYCL tests on the CPU - has no version number
intel-oneapi-compiler-dpcpp-cpp-"${ALPAKA_CI_ONEAPI_VERSION}"
intel-oneapi-compiler-dpcpp-cpp-runtime-"${ALPAKA_CI_ONEAPI_VERSION}"
intel-oneapi-compiler-shared-"${ALPAKA_CI_ONEAPI_VERSION}"
intel-oneapi-dpcpp-cpp-"${ALPAKA_CI_ONEAPI_VERSION}"
intel-oneapi-openmp-"${ALPAKA_CI_ONEAPI_VERSION}"
intel-oneapi-openmp-common-"${ALPAKA_CI_ONEAPI_VERSION}"

)
travis_retry sudo apt-get install -y "${components[@]}"

Expand Down
9 changes: 9 additions & 0 deletions script/job_generator/alpaka_filter.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,13 @@ def alpaka_post_filter(row: List) -> bool:
):
return False

# OpenMP is not supported for ipcx < 2024
#if row_check_name(row, HOST_COMPILER, "==", ICPX) and row_check_version(row, HOST_COMPILER, "!=", "2024.0") and (
# row_check_backend_version(row, ALPAKA_ACC_CPU_B_SEQ_T_OMP2_ENABLE, "==", ON_VER)
# or row_check_backend_version(
# row, ALPAKA_ACC_CPU_B_SEQ_T_OMP2_ENABLE, "==", ON_VER
#)
#):
# return False

return True
6 changes: 3 additions & 3 deletions script/job_generator/versions.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"12.2",
],
HIPCC: ["5.0", "5.1", "5.2", "5.3", "5.4", "5.5"],
ICPX: ["2023.1.0", "2023.2.0"],
ICPX: ["2024.0"],
# Contains all enabled back-ends.
# There are special cases for ALPAKA_ACC_GPU_CUDA_ENABLE and ALPAKA_ACC_GPU_HIP_ENABLE
# which have to be combined with nvcc and hipcc versions.
Expand Down Expand Up @@ -68,8 +68,8 @@
# Turn off OpenMP back-ends until Intel fixes https://github.com/intel/llvm/issues/10711
[
ALPAKA_ACC_CPU_B_SEQ_T_SEQ_ENABLE,
ALPAKA_ACC_CPU_B_TBB_T_SEQ_ENABLE,
ALPAKA_ACC_SYCL_ENABLE,
ALPAKA_ACC_CPU_B_SEQ_T_OMP2_ENABLE,
ALPAKA_ACC_CPU_B_OMP2_T_SEQ_ENABLE
],
],
UBUNTU: ["20.04"],
Expand Down