From: uvos Date: Thu, 12 Mar 2026 02:37:10 +0000 (+0100) Subject: hip: compile debug builds with -O2 on hip to avoid a compiler bug (llama/20392) X-Git-Tag: upstream/1.8.4~45 X-Git-Url: https://git.djapps.eu/?a=commitdiff_plain;h=f5ba86537886bbf9be621aeff1e43375f3de9db2;p=pkg%2Fggml%2Fsources%2Fwhisper.cpp hip: compile debug builds with -O2 on hip to avoid a compiler bug (llama/20392) --- diff --git a/ggml/src/ggml-hip/CMakeLists.txt b/ggml/src/ggml-hip/CMakeLists.txt index 80037d24..b44ed0f7 100644 --- a/ggml/src/ggml-hip/CMakeLists.txt +++ b/ggml/src/ggml-hip/CMakeLists.txt @@ -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)