llama.cpp Release b12456 Fixes OpenCL Flash-Attention Defects
llama.cpp release b12456 addresses three OpenCL defects in the flash-attention prefill path. The updates fix memory leaks from unreleased mask fallback images, prevent incorrect calculation handling for q8_0 K/V shapes at head size 512, and add safeguards against exceeding device 3D image limits. These fixes ensure stable and accurate LLM inference performance for users running models via OpenCL hardware acceleration. Resolving memory leaks and calculation errors prevents long-term server degradation and incorrect model outputs. The release specifically avoids using the WMM flash-attention kernel for q8_0 K/V at head size 512 where errors were detected, and redirects requests exceeding the 3D image width context limits to the regular flash-attention path.
## BACKGROUND
FlashAttention is an optimized algorithm designed to speed up the transformer attention mechanism and reduce its memory footprint during processing. Speculative decoding is an inference-time optimization technique that uses a smaller model to propose candidate tokens which a larger model then verifies in a single forward pass.