Skip to content

Commit a803a50

Browse files
psychocoderHPCsbastrakov
authored andcommitted
HIP: fix missing fast math compiler option
For HIP-clang setting fast math is ignored because no the option is not given to the compiler.
1 parent 579af47 commit a803a50

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

cmake/alpakaCommon.cmake

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -658,6 +658,10 @@ if(ALPAKA_ACC_GPU_HIP_ENABLE)
658658
MESSAGE(FATAL_ERROR "Could not find rocRAND (also searched in: HIP_ROOT_DIR=${HIP_ROOT_DIR}/rocrand).")
659659
endif()
660660

661+
if(ALPAKA_HIP_FAST_MATH)
662+
list(APPEND HIP_HIPCC_FLAGS -ffast-math)
663+
endif()
664+
661665
# possible architectures can be found https://github.com/llvm/llvm-project/blob/master/clang/lib/Basic/Cuda.cpp#L65
662666
# 900 -> AMD Vega64
663667
# 902 -> AMD Vega 10

0 commit comments

Comments
 (0)