b10171

ggml-org/llama.cppb10171Jul 28, 2026by github-actions[bot]same day as b10167

What changed since b10167

low risk

b10171 fixes an OpenCL Adreno KQ/KQV kernel bug that corrupted multi-stream KV cache reads, while b10167 was an internal memory refactor.

Improvements

  • Multi-dimensional KQ/KQV tensors (ne03/ne13 > 1) are now routed to the general mat-mul path instead of the Adreno image kernels.
  • Sub-buffer creation now honors view_offs, preventing silent misreads for future tensor views.
  • The older b10167 abstracted llama_memory calls behind a shared common_memory helper, improving server code structure and reuse.

Bug fixes

  • Fixed Adreno KQ/KQV image1d kernels ignoring dimension 3, which made every stream past the first read stream 0's K/V data.
  • Resolved garbage output in multi-sequence workloads such as llama-perplexity with default -b 2048/n_seq=4 and multi-slot llama-server on Adreno GPUs.
  • Perplexity on Adreno 740/840 dropped from ~1800-1900 to ~15.5-15.6 with default settings and with -fa 0.

Upgrade notes

Upgrade is recommended for anyone running OpenCL on Adreno GPUs with multi-slot server or multi-sequence perplexity, where prior builds produced garbage output; single-stream workloads are unaffected. No configuration or API changes are required, and flash attention no longer masks the issue since the fix applies regardless of FA. The b10167 memory abstraction is internal and does not alter public behavior.

Analyzed Nov 1, 2026

Upgrading?

Release notes summary

Fixed a critical bug in OpenCL Adreno image kernels that ignored the 4th dimension (ne3) of tensors, causing multi-stream batches to read incorrect data for key/value caches.

Key Highlights

  • Fixed OpenCL Adreno KQ/KQV image kernels for multi-stream batches
  • Resolves garbage data generation in perplexity and multi-slot scenarios
  • Routes multi-dimensional tensors to the general path

Release Notes (excerpt)

<details open> opencl: skip the Adreno KQ/KQV image kernels for multi-stream batches (#26189) The Adreno KQ/KQV image1d kernels (ggml_cl_mul_mat_kq_kqv_adreno) ignore dim 3 entirely: the sub-buffer covers only nb02*ne02 bytes and the kernel receives no ne03/ne13/nb03/nb13 arguments. With the unified KV cache, multi-sequence batches (e.g. llama-perplexity with its default -b 2048, n_seq=4, or a multi-slot llama-server) present KQ/KQV as 4D tensors with…

Published by ggml-org on GitHub.

Read the full release notes

Related Repositories