Skip to content

opencl: limit local workgroup size for GLU operation - #26383

Merged
max-krasnyansky merged 1 commit into
ggml-org:masterfrom
mgroeber9110:opencl-limit-glu-workgroup-size
Aug 2, 2026
Merged

opencl: limit local workgroup size for GLU operation#26383
max-krasnyansky merged 1 commit into
ggml-org:masterfrom
mgroeber9110:opencl-limit-glu-workgroup-size

Conversation

@mgroeber9110

Copy link
Copy Markdown
Contributor

Overview

This is something I bumped into when trying to benchmark a legacy Intel UHD 620 GPU: this model has a max_workgroup_size of 256, so enqueue_ndrange_kernel fails in a GLU operation with CL_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_l4 kernel, 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

@mgroeber9110
mgroeber9110 requested a review from a team as a code owner July 31, 2026 19:31
@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 Jul 31, 2026
@max-krasnyansky
max-krasnyansky merged commit 0ab9d6f into ggml-org:master Aug 2, 2026
21 of 27 checks passed
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
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 OpenCL Issues specific to the OpenCL backend

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants