Skip to content

Commit

Permalink
HIP: fix missing fast math compiler option
Browse files Browse the repository at this point in the history
For HIP-clang setting fast math is ignored because no the option is not
given to the compiler.
  • Loading branch information
psychocoderHPC authored and sbastrakov committed Jan 18, 2021
1 parent 579af47 commit a803a50
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cmake/alpakaCommon.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -658,6 +658,10 @@ if(ALPAKA_ACC_GPU_HIP_ENABLE)
MESSAGE(FATAL_ERROR "Could not find rocRAND (also searched in: HIP_ROOT_DIR=${HIP_ROOT_DIR}/rocrand).")
endif()

if(ALPAKA_HIP_FAST_MATH)
list(APPEND HIP_HIPCC_FLAGS -ffast-math)
endif()

# possible architectures can be found https://github.com/llvm/llvm-project/blob/master/clang/lib/Basic/Cuda.cpp#L65
# 900 -> AMD Vega64
# 902 -> AMD Vega 10
Expand Down

0 comments on commit a803a50

Please sign in to comment.