From: asf0 Date: Tue, 7 Jul 2026 11:27:50 +0000 (-0600) Subject: ggml-hip : add -fno-finite-math-only alongside -ffast-math (#25373) X-Git-Tag: upstream/0.0.10438~532 X-Git-Url: https://git.djapps.eu/?a=commitdiff_plain;h=33ca0dcb9d78c7c3a3b543db4c5fc9182abfe519;p=pkg%2Fggml%2Fsources%2Fllama.cpp ggml-hip : add -fno-finite-math-only alongside -ffast-math (#25373) -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 --- diff --git a/ggml/src/ggml-hip/CMakeLists.txt b/ggml/src/ggml-hip/CMakeLists.txt index 72850f26d..44fd3f3c5 100644 --- a/ggml/src/ggml-hip/CMakeLists.txt +++ b/ggml/src/ggml-hip/CMakeLists.txt @@ -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 "$<$:-ffast-math>") +target_compile_options(ggml-hip PRIVATE "$<$:-ffast-math;-fno-finite-math-only>")