hip: compile debug builds with -O2 on hip to avoid a compiler bug (#20392)

This commit is contained in:
uvos
2026-03-12 03:37:10 +01:00
committed by GitHub
parent a8304b4d27
commit d63aa398de
+4
View File
@@ -11,6 +11,10 @@ endif()
list(APPEND CMAKE_PREFIX_PATH ${ROCM_PATH})
list(APPEND CMAKE_PREFIX_PATH "${ROCM_PATH}/lib64/cmake")
if (NOT DEFINED CMAKE_HIP_FLAGS_DEBUG)
set(CMAKE_HIP_FLAGS_DEBUG "-g -O2")
endif()
# CMake on Windows doesn't support the HIP language yet
if (WIN32)
set(CXX_IS_HIPCC TRUE)