Skip to content

opencl: use flat mv q5_k when weight exceeds image1d_buffer_t limit - #26880

Merged
ggerganov merged 1 commit into
ggml-org:masterfrom
qualcomm:lh/large-q5_k-mv
Aug 12, 2026
Merged

opencl: use flat mv q5_k when weight exceeds image1d_buffer_t limit#26880
ggerganov merged 1 commit into
ggml-org:masterfrom
qualcomm:lh/large-q5_k-mv

Conversation

@lhez

@lhez lhez commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Overview

This PR uses flat q5_K mv for large q5_K weights.

The Adreno gemv_noshuffle kernels use image1d_buffer_t for weights. If weights matrix is too large and exceeds the max allowed size of image1d_buffer_t, image creation will fail and the application will crash. In such cases, flat mv kernels have to be used (we should do this check for all other quantizations in future PR).

Additional information

Requirements

  • I have read and agree with the contributing guidelines
  • AI usage disclosure: Yes. Told Codex about this potential issue, suggested solution and ask it to verify and fix; then I checked the fix.

@github-actions github-actions Bot added ggml changes relating to the ggml tensor library for machine learning OpenCL Issues specific to the OpenCL backend labels Aug 11, 2026
@lhez
lhez marked this pull request as ready for review August 11, 2026 05:02
@lhez
lhez requested a review from a team as a code owner August 11, 2026 05:02
@lhez lhez added the merge ready A maintainer can use this label to indicate that they consider the changes final and ready to merge. label Aug 11, 2026
@lhez

lhez commented Aug 12, 2026

Copy link
Copy Markdown
Contributor Author

@ggml-org/maintainers can I please have another approval?

@ggerganov
ggerganov merged commit cb27fe9 into ggml-org:master Aug 12, 2026
31 of 43 checks passed
gabe-l-hart added a commit to gabe-l-hart/llama.cpp that referenced this pull request Aug 12, 2026
Signed-off-by: Gabe Goodhart <ghart@us.ibm.com>

* origin/master: (383 commits)
  cmake :  introduce semantic versioning  (ggml-org#26839)
  gguf : harden loader against malformed tensor dims and metadata types (ggml-org#25596)
  kleidiai: Add runtime feature detection mechanism for aarch64/kleidiai (ggml-org#26076)
  model : disallow integer dflash sliding_window_pattern (ggml-org#26900)
  sync : ggml
  cmake : add config version support (ggml/1582)
  server : support slot save/restore with media inputs (ggml-org#26640)
  ui: add read_media tool (ggml-org#25877)
  opencl: default FA c8 cluster width to 16 on X1E (ggml-org#26433)
  tests : update speculative params (ggml-org#26925)
  vulkan: add TQ2_0 (ternary) support (ggml-org#25850)
  wavtokenizer-dec : bound posnet/convnext block_count against n_layer_all (ggml-org#26892)
  convert : handle per_layer_config in Gemma4 (transformers 5.15) (ggml-org#26882)
  opencl: use flat mv q5_k when weight exceeds image1d_buffer_t limit (ggml-org#26880)
  chat : fix muse-glimmer detection of tool calls after EOM (ggml-org#26879)
  ci : add missing release check (ggml-org#26923)
  CUDA: only disable CUDA graphs when mul_mat_id actually needs a stream sync (ggml-org#26802)
  cuda : add warp-per-row wkv7 kernel for single-token decode (ggml-org#26111)
  spec : update speculative-simple (ggml-org#26904)
  chat : tighten bare function parsing for Qwen models (ggml-org#26793)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ggml changes relating to the ggml tensor library for machine learning merge ready A maintainer can use this label to indicate that they consider the changes final and ready to merge. OpenCL Issues specific to the OpenCL backend

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants