Skip to content

Commit

Permalink
Enable OpenMP back-ends for clang-cuda
Browse files Browse the repository at this point in the history
  • Loading branch information
j-stephan committed Sep 8, 2023
1 parent 3fc6626 commit 368f60f
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 24 deletions.
4 changes: 0 additions & 4 deletions cmake/alpakaCommon.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -385,10 +385,6 @@ if(alpaka_ACC_GPU_CUDA_ENABLE)
message(WARNING "If you are using CUDA 11.3 please note of the following issue: https://github.com/alpaka-group/alpaka/issues/1857")
endif()

if(alpaka_ACC_CPU_B_OMP2_T_SEQ_ENABLE OR alpaka_ACC_CPU_B_SEQ_T_OMP2_ENABLE)
message(FATAL_ERROR "Clang as a CUDA compiler does not support OpenMP 2!")
endif()

target_compile_options(alpaka INTERFACE $<$<COMPILE_LANGUAGE:CUDA>:-Wno-unknown-cuda-version>)

# This flag silences the warning produced by the Dummy.cpp files:
Expand Down
10 changes: 0 additions & 10 deletions script/job_generator/alpaka_filter.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,4 @@ def alpaka_post_filter(row: List) -> bool:
):
return False

# OpenMP is not supported for clang as cuda compiler
# https://github.com/alpaka-group/alpaka/issues/639
if row_check_name(row, DEVICE_COMPILER, "==", CLANG_CUDA) and (
row_check_backend_version(row, ALPAKA_ACC_CPU_B_OMP2_T_SEQ_ENABLE, "==", ON_VER)
or row_check_backend_version(
row, ALPAKA_ACC_CPU_B_SEQ_T_OMP2_ENABLE, "==", ON_VER
)
):
return False

return True
11 changes: 1 addition & 10 deletions script/job_generator/versions.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,23 +42,14 @@
ALPAKA_ACC_CPU_B_TBB_T_SEQ_ENABLE,
],
# ALPAKA_ACC_CPU_B_OMP2_T_SEQ_ENABLE,
# nvcc
# nvcc and clang-cuda
[
ALPAKA_ACC_CPU_B_SEQ_T_SEQ_ENABLE,
ALPAKA_ACC_CPU_B_SEQ_T_THREADS_ENABLE,
ALPAKA_ACC_CPU_B_OMP2_T_SEQ_ENABLE,
ALPAKA_ACC_CPU_B_SEQ_T_OMP2_ENABLE,
ALPAKA_ACC_GPU_CUDA_ENABLE,
],
# clang-cuda
# OpenMP is not supported for clang as cuda compiler
# https://github.com/alpaka-group/alpaka/issues/639
# therefore a extra combination is required
[
ALPAKA_ACC_CPU_B_SEQ_T_SEQ_ENABLE,
ALPAKA_ACC_CPU_B_SEQ_T_THREADS_ENABLE,
ALPAKA_ACC_GPU_CUDA_ENABLE,
],
# hip
[
ALPAKA_ACC_CPU_B_SEQ_T_SEQ_ENABLE,
Expand Down

0 comments on commit 368f60f

Please sign in to comment.