]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commitdiff
ggml-hip : add -fno-finite-math-only alongside -ffast-math (#25373)
authorasf0 <redacted>
Tue, 7 Jul 2026 11:27:50 +0000 (05:27 -0600)
committerGitHub <redacted>
Tue, 7 Jul 2026 11:27:50 +0000 (13:27 +0200)
-ffast-math implies -ffinite-math-only under ROCm/clang 22, which
disables INFINITY/NaN and triggers -Wnan-infinity-disabled (errors
under -Werror in CI). Re-enable infinity handling without dropping
the rest of fast-math.

Fixes #25361

ggml/src/ggml-hip/CMakeLists.txt

index 72850f26db9a36d901a010063dc0f130241af43b..44fd3f3c5bef2c7380cd38fa0dfdf9b152073947 100644 (file)
@@ -156,4 +156,4 @@ endif()
 
 target_link_libraries(ggml-hip PRIVATE ggml-base hip::host roc::rocblas roc::hipblas)
 
-target_compile_options(ggml-hip PRIVATE "$<$<COMPILE_LANGUAGE:HIP>:-ffast-math>")
+target_compile_options(ggml-hip PRIVATE "$<$<COMPILE_LANGUAGE:HIP>:-ffast-math;-fno-finite-math-only>")