Skip to content

Commit 3aeb22c

Browse files
committed
GPU CMake: Add option to override deterministic mode
1 parent 91acb9d commit 3aeb22c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

dependencies/FindO2GPU.cmake

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
# or submit itself to any jurisdiction.
1111

1212
# NOTE!!!! - Whenever this file is changed, move it over to alidist/resources
13-
# FindO2GPU.cmake Version 5
13+
# FindO2GPU.cmake Version 6
1414

1515
if(NOT DEFINED ENABLE_CUDA)
1616
set(ENABLE_CUDA "AUTO")
@@ -71,6 +71,9 @@ endfunction()
7171
STRING(REGEX REPLACE "\-std=[^ ]*" "" O2_GPU_CMAKE_CXX_FLAGS_NOSTD "${CMAKE_CXX_FLAGS}")
7272

7373
# ================================== Fast Math / Deterministic Mode ==================================
74+
if(DEFINED ENV{O2_OVERRIDE_GPUCA_DETERMINISTIC_MODE})
75+
set(GPUCA_DETERMINISTIC_MODE $ENV{O2_OVERRIDE_GPUCA_DETERMINISTIC_MODE})
76+
endif()
7477
# set(GPUCA_DETERMINISTIC_MODE WHOLEO2) # Override
7578
set(GPUCA_DETERMINISTIC_MODE_MAP_OFF 0)
7679
set(GPUCA_DETERMINISTIC_MODE_MAP_NO_FAST_MATH 1) # No -ffast-math and similar compile flags for GPU folder

0 commit comments

Comments
 (0)