b9938
ggml-org/llama.cppb9938Jul 9, 2026by github-actions[bot]same day as b9937
What changed since b9937
HIP/AMD GPU builds now compile with fast math optimizations, matching CUDA's performance profile.
New features
- AMD/HIP backend now benefits from fast math optimizations previously only available on CUDA builds.
Improvements
- Enabled -funsafe-math-optimizations for the HIP backend to close the performance gap with CUDA.
- Chose -funsafe-math-optimizations over -ffast-math to avoid finite-math-only semantics that break INFINITY masking and introduce NaNs.
Upgrade notes
This is a build-flag change for the HIP backend only; no API, config, or model-format changes are involved. Users on AMD GPUs should see faster inference after swapping in the new binaries, while CPU, CUDA, Metal, and Vulkan paths are unaffected. Rebuild from source if you compile HIP yourself, since the flag is applied at build time.
Analyzed Oct 24, 2026
Upgrading?
Release notes summary
Enabled fast math optimizations for HIP/AMD GPU backend to match CUDA performance.
Key Highlights
- Enabled -funsafe-math-optimizations for HIP backend
- Allows AMD GPUs to use fast math optimizations like CUDA
- Avoids NaN issues that -ffast-math would cause by using -funsafe-math-optimizations instead
Release Notes (excerpt)
<details open> 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 <mark@cloudhands.ai> </details> **macOS/iOS:** - macOS Apple Silicon (arm64)…
Published by ggml-org on GitHub.
Read the full release notesRelated Repositories
:electron: Build cross-platform desktop apps with JavaScript, HTML, and CSS
Godot Engine – Multi-platform 2D and 3D game engine
ClickHouse® is a real-time analytics database management system
Self-hosted game stream host for Moonlight.
DuckDB is a high-performance analytical database system