Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions GPU/GPUTracking/Base/hip/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@

set(MODULE GPUTrackingHIP)

if(GPUCA_BUILD_DEBUG AND GPUCA_BUILD_DEBUG_HOSTONLY)
set(CMAKE_BUILD_TYPE RELEASE)
set(CMAKE_HIP_FLAGS_RELEASE "${CMAKE_HIP_FLAGS_RELEASE} -O3 -march=native -ggdb -fno-sanitize=all -DNDEBUG")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O3 -march=native -ggdb -fno-sanitize=all -DNDEBUG")
endif()

# -------------------------------- Options -------------------------------------------------------
# set(GPUCA_HIP_HIPIFY_FROM_CUDA 0) # Use local HIP source files

Expand Down
1 change: 1 addition & 0 deletions GPU/GPUTracking/Standalone/cmake/config.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ set(GPUCA_CONFIG_GL3W 0)
set(GPUCA_CONFIG_O2 1)
set(GPUCA_BUILD_DEBUG 0)
set(GPUCA_BUILD_DEBUG_SANITIZE 0)
set(GPUCA_BUILD_DEBUG_HOSTONLY 0)
set(GPUCA_DETERMINISTIC_MODE 0) # OFF / NO_FAST_MATH / OPTO2 / GPU / WHOLEO2
#set(GPUCA_CUDA_GCCBIN c++-14)
#set(GPUCA_OPENCL_CLANGBIN clang-20)
Expand Down
8 changes: 4 additions & 4 deletions dependencies/FindO2GPU.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
# or submit itself to any jurisdiction.

# NOTE!!!! - Whenever this file is changed, move it over to alidist/resources
# FindO2GPU.cmake Version 6
# FindO2GPU.cmake Version 7

if(NOT DEFINED ENABLE_CUDA)
set(ENABLE_CUDA "AUTO")
Expand Down Expand Up @@ -166,14 +166,14 @@ if(ENABLE_CUDA)
if (NOT ENABLE_CUDA STREQUAL "AUTO")
string(APPEND CMAKE_CUDA_FLAGS " --allow-unsupported-compiler")
endif()
if(CMAKE_BUILD_TYPE_UPPER STREQUAL "DEBUG")
if(CMAKE_BUILD_TYPE_UPPER STREQUAL "DEBUG" AND NOT GPUCA_BUILD_DEBUG_HOSTONLY)
string(APPEND CMAKE_CUDA_FLAGS_${CMAKE_BUILD_TYPE_UPPER} " -lineinfo -Xptxas -O0")
else()
string(APPEND CMAKE_CUDA_FLAGS_${CMAKE_BUILD_TYPE_UPPER} " -Xptxas -O4 -Xcompiler -O4")
endif()
if(GPUCA_DETERMINISTIC_MODE GREATER_EQUAL ${GPUCA_DETERMINISTIC_MODE_MAP_NO_FAST_MATH})
string(APPEND CMAKE_CUDA_FLAGS_${CMAKE_BUILD_TYPE_UPPER} " ${GPUCA_CUDA_NO_FAST_MATH_FLAGS}")
elseif(NOT CMAKE_BUILD_TYPE_UPPER STREQUAL "DEBUG")
elseif(NOT CMAKE_BUILD_TYPE_UPPER STREQUAL "DEBUG" OR GPUCA_BUILD_DEBUG_HOSTONLY)
string(APPEND CMAKE_CUDA_FLAGS_${CMAKE_BUILD_TYPE_UPPER} " -use_fast_math ${GPUCA_CUDA_DENORMALS_FLAGS}")
endif()
if(CMAKE_CXX_FLAGS MATCHES "(^| )-Werror( |$)")
Expand Down Expand Up @@ -314,7 +314,7 @@ if(ENABLE_HIP)
endif()
if(GPUCA_DETERMINISTIC_MODE GREATER_EQUAL ${GPUCA_DETERMINISTIC_MODE_MAP_NO_FAST_MATH})
string(APPEND CMAKE_HIP_FLAGS_${CMAKE_BUILD_TYPE_UPPER} " ${GPUCA_CXX_NO_FAST_MATH_FLAGS}")
elseif(NOT CMAKE_BUILD_TYPE_UPPER STREQUAL "DEBUG")
elseif(NOT CMAKE_BUILD_TYPE_UPPER STREQUAL "DEBUG" OR GPUCA_BUILD_DEBUG_HOSTONLY)
string(APPEND CMAKE_HIP_FLAGS_${CMAKE_BUILD_TYPE_UPPER} " -ffast-math -O3")
endif()
string(REGEX REPLACE "(gfx1[0-9]+;?)" "" CMAKE_HIP_ARCHITECTURES "${CMAKE_HIP_ARCHITECTURES}") # ROCm currently doesn’t support integrated graphics
Expand Down