b9851
ggml-org/llama.cppb9851Jun 30, 2026by github-actions[bot]same day as b9850
What changed since b9850
b9851 is a single CUDA Flash Attention fix preventing integer truncation and overflow in KQ mask stride handling.
Improvements
- Hardened the CUDA flash_attn_mask_to_KV_max kernel against integer truncation and overflow when computing KQ mask strides.
- Improved numerical stability of CUDA Flash Attention kernels for large stride or mask configurations.
Bug fixes
- Fixed incorrect KQ mask stride computation in the CUDA Flash Attention path that could produce wrong results or crashes.
- Resolved overflow/truncation errors affecting Flash Attention with KQ masks on CUDA.
Upgrade notes
Drop-in replacement with no config or API changes; only the CUDA Flash Attention kernel is affected. Users running CUDA builds with Flash Attention and KQ masks should upgrade to avoid potential incorrect outputs or crashes. Non-CUDA backends see no functional change.
Analyzed Oct 30, 2026
Upgrading?
Release notes summary
Addresses critical bug fixes in the CUDA Flash Attention implementation by preventing integer overflow and truncation errors when calculating KQ mask strides.
Key Highlights
- Prevents integer truncation and overflow errors
- Fixes KQ mask strides in Flash Attention
- Improves stability of Flash Attention kernels
New Features
- CUDA Flash Attention stability fix
Release Notes (excerpt)
<details open> cuda : prevent integer truncation and overflow errors when using KQ mask strides in flash_attn_mask_to_KV_max kernel (#24945) Co-authored-by: Stanisław Szymczyk <sszymczy@gmail.com> </details> **macOS/iOS:** - macOS Apple Silicon (arm64) - macOS Apple Silicon (arm64, KleidiAI enabled) DISABLED - macOS Intel (x64) - iOS XCFramework **Linux:** - Ubuntu x64 (CPU) - Ubuntu arm64 (CPU) - Ubuntu s390x (CPU) - Ubuntu x64 (Vulkan) - Ubuntu arm64 (Vulkan) - Ubuntu x64 (ROCm 7.2)…
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