opencl: limit local workgroup size for GLU operation - #26383
Merged
max-krasnyansky merged 1 commit intoAug 2, 2026
Merged
Conversation
lhez
approved these changes
Aug 2, 2026
max-krasnyansky
approved these changes
Aug 2, 2026
TheTom
pushed a commit
to TheTom/llama-cpp-turboquant
that referenced
this pull request
Aug 3, 2026
belarusian
pushed a commit
to belarusian/llama.cpp
that referenced
this pull request
Aug 4, 2026
smalinin
pushed a commit
to smalinin/llama.cpp
that referenced
this pull request
Aug 4, 2026
satindergrewal
pushed a commit
to satindergrewal/llama.cpp
that referenced
this pull request
Aug 11, 2026
satindergrewal
pushed a commit
to satindergrewal/llama.cpp
that referenced
this pull request
Aug 12, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
This is something I bumped into when trying to benchmark a legacy Intel UHD 620 GPU: this model has a
max_workgroup_sizeof 256, soenqueue_ndrange_kernelfails in a GLU operation withCL_INVALID_WORK_GROUP_SIZE.I am not fully sure I understand the interaction between local and global workgroup size and the rationale behind the choice of 512 for
nth, so I am just putting this fix up for discussion, as it was the main obstacle for running on this GPU, and it might also affect other architectures.Additional information
For full Intel UHD 620 compatibility, it is also necessary to comment out the
mul_mv_f16_f32_l4kernel, probably due to an LLVM or library bug in the OpenCL driver, but this is a separate issue.On my i7-8550U laptop, the UHD 620 with OpenCL 2.1 actually achieves lower throughput than the CPU backend at the moment, so this fix is mostly of historic interest.
Requirements