From: mgroeber9110 Date: Sun, 2 Aug 2026 18:44:00 +0000 (+0200) Subject: opencl: limit local workgroup size for GLU operation (llama/26383) X-Git-Tag: upstream/1.9.2~12 X-Git-Url: https://git.djapps.eu/?a=commitdiff_plain;h=78f340b5e81a533e952bda36a5a6a2f6b411179f;p=pkg%2Fggml%2Fsources%2Fwhisper.cpp opencl: limit local workgroup size for GLU operation (llama/26383) --- diff --git a/ggml/src/ggml-opencl/ggml-opencl.cpp b/ggml/src/ggml-opencl/ggml-opencl.cpp index 388c585f..915c8e7b 100644 --- a/ggml/src/ggml-opencl/ggml-opencl.cpp +++ b/ggml/src/ggml-opencl/ggml-opencl.cpp @@ -24260,7 +24260,7 @@ static void ggml_cl_glu(ggml_backend_t backend, const ggml_tensor * src0, const } const size_t nrows = ggml_nrows(src0); - size_t nth = 512; + size_t nth = backend_ctx->max_workgroup_size < 512 ? backend_ctx->max_workgroup_size : 512; size_t global_work_size[] = {nrows*nth, 1, 1}; size_t local_work_size[] = {nth, 1, 1};