Skip to content

Commit d63aa39

Browse files
authored
hip: compile debug builds with -O2 on hip to avoid a compiler bug (ggml-org#20392)
1 parent a8304b4 commit d63aa39

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

ggml/src/ggml-hip/CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ endif()
1111
list(APPEND CMAKE_PREFIX_PATH ${ROCM_PATH})
1212
list(APPEND CMAKE_PREFIX_PATH "${ROCM_PATH}/lib64/cmake")
1313

14+
if (NOT DEFINED CMAKE_HIP_FLAGS_DEBUG)
15+
set(CMAKE_HIP_FLAGS_DEBUG "-g -O2")
16+
endif()
17+
1418
# CMake on Windows doesn't support the HIP language yet
1519
if (WIN32)
1620
set(CXX_IS_HIPCC TRUE)

0 commit comments

Comments
 (0)