File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed
Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -162,7 +162,7 @@ if(ENABLE_CUDA)
162162 if (GPUCA_DETERMINISTIC_MODE GREATER_EQUAL ${GPUCA_DETERMINISTIC_MODE_MAP_NO_FAST_MATH} )
163163 string (APPEND CMAKE_CUDA_FLAGS_${CMAKE_BUILD_TYPE_UPPER} " ${GPUCA_CUDA_NO_FAST_MATH_FLAGS} " )
164164 elseif (NOT CMAKE_BUILD_TYPE_UPPER STREQUAL "DEBUG" )
165- string (APPEND CMAKE_CUDA_FLAGS_${CMAKE_BUILD_TYPE_UPPER} " -use_fast_math --ftz=true " )
165+ string (APPEND CMAKE_CUDA_FLAGS_${CMAKE_BUILD_TYPE_UPPER} " -use_fast_math ${GPUCA_CUDA_DENORMALS_FLAGS} " )
166166 endif ()
167167 if (CMAKE_CXX_FLAGS MATCHES "(^| )-Werror( |$)" )
168168 string (APPEND CMAKE_CUDA_FLAGS " -Werror=cross-execution-space-call" )
@@ -293,11 +293,10 @@ if(ENABLE_HIP)
293293 if (GPUCA_KERNEL_RESOURCE_USAGE_VERBOSE)
294294 string (APPEND CMAKE_HIP_FLAGS " -Rpass-analysis=kernel-resource-usage" )
295295 endif ()
296- if (NOT GPUCA_DETERMINISTIC_MODE GREATER_EQUAL ${GPUCA_DETERMINISTIC_MODE_MAP_NO_FAST_MATH} )
297- string (APPEND CMAKE_HIP_FLAGS " -ffast-math" )
298- endif ()
299- if (NOT CMAKE_BUILD_TYPE_UPPER STREQUAL "DEBUG" )
300- string (APPEND CMAKE_HIP_FLAGS_${CMAKE_BUILD_TYPE_UPPER} " -O3" )
296+ if (GPUCA_DETERMINISTIC_MODE GREATER_EQUAL ${GPUCA_DETERMINISTIC_MODE_MAP_NO_FAST_MATH} )
297+ string (APPEND CMAKE_HIP_FLAGS_${CMAKE_BUILD_TYPE_UPPER} " ${GPUCA_CXX_NO_FAST_MATH_FLAGS} " )
298+ elseif (NOT CMAKE_BUILD_TYPE_UPPER STREQUAL "DEBUG" )
299+ string (APPEND CMAKE_HIP_FLAGS_${CMAKE_BUILD_TYPE_UPPER} " -ffast-math -O3" )
301300 endif ()
302301 string (REGEX REPLACE "(gfx1[0-9]+;?)" "" CMAKE_HIP_ARCHITECTURES "${CMAKE_HIP_ARCHITECTURES} " ) # ROCm currently doesn’t support integrated graphics
303302 if (HIP_AMDGPUTARGET)
You can’t perform that action at this time.
0 commit comments