Advancing OpenCL-Based LLM Inference in Llama.cpp on Qualcomm Adreno GPUs
summary
Qualcomm’s OpenCL backend for Llama.cpp targets Adreno GPUs and shows concrete wins: hand‑written assembly kernels on Snapdragon X2 Elite and an MXP4 to FP16 dequantization flow speed prefill from ~120 to 600 tokens/sec prefill on an MOE model, with most time spent in FFN. Work uses OpenCL with vendor extensions, quantized KV‑cache plans, flash‑attention assembly and persistent kernel binaries to avoid recompilation. Ongoing priorities are long‑context KV compression, speculative decoding support and upstreaming select kernels.
AI-written summary · about
chapters (12)
- 0:00Introduction and team background
- 3:14What is NAM CPP and its backends
- 7:36Why run LLMs locally
- 10:14Why choose OpenCL for GPUs
- 12:42Llama.cpp workflow and contributions
- 15:55Optimizations over the past year
- 18:02Mixture of Experts models on Adreno
- 25:10Long context handling challenges
- 27:19KV cache compression techniques
- 28:22OpenCL backend vs other backends
- 30:31Summary and future plans
- 32:43Q&A session
