]> git.djapps.eu Git - pkg/ggml/sources/ggml/commitdiff
hip: compile debug builds with -O2 on hip to avoid a compiler bug (llama/20392)
authoruvos <redacted>
Thu, 12 Mar 2026 02:37:10 +0000 (03:37 +0100)
committerGeorgi Gerganov <redacted>
Sun, 15 Mar 2026 19:50:13 +0000 (21:50 +0200)
src/ggml-hip/CMakeLists.txt

index 80037d2436102b16f4af81d3d4e679909c3a8b56..b44ed0f7215c0359141caabe65712daaee9eb8fe 100644 (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)