]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commit
ggml-hip: enable -funsafe-math-optimizations (#24668)
authorRapidMark <redacted>
Thu, 9 Jul 2026 08:02:26 +0000 (01:02 -0700)
committerGitHub <redacted>
Thu, 9 Jul 2026 08:02:26 +0000 (11:02 +0300)
commitccb0c3422394fbbfc28fd91f8c77111b748cfa09
tree9d6294d6a1ffc2dcb4ffab521c2b25865ef5f846
parent2021515a1a7ccbb8a7b5e83273164fab835e6b12
ggml-hip: enable -funsafe-math-optimizations (#24668)

CUDA is compiled with fast math and AMD/HIP is not — this flag lets AMD use fast math too.

We can't use -ffast-math: it implies -ffinite-math-only, which won't compile (ggml uses INFINITY for masking) and produces NaNs. -funsafe-math-optimizations gives the speedup without the NaN problems.

Co-authored-by: Mark Caldwell <redacted>
ggml/src/ggml-hip/CMakeLists.txt