The llama.cpp project has updated its OpenCL backend to improve matrix multiplication performance on two generations of Adreno GPUs. The changes primarily target the X2E generation by defaulting the xmem F16xF32 GEMM path and optimizing handling for the A7X generation.

  • Defaulting the Adreno xmem F16xF32 GEMM to enabled for X2E devices, which previously required an opt-in environment variable.
  • Bypassing the tiled f32 GEMM on the Adreno A7X compiler by routing batched operations to a per-row kernel to avoid register spilling issues.
  • The xmem optimization provides approximately 25% prefill speedup on gpt-oss-20b for Adreno X2-90 devices, while the A7X bypass yields about 9% improvement on gemma-3n-E4B.

These optimizations address specific compiler inefficiencies in older and newer Adreno silicon, reducing GPU time spent in slow matmul kernels during model prefill phases.