From: mgroeber9110 Date: Sun, 2 Aug 2026 18:44:00 +0000 (+0200) Subject: opencl: limit local workgroup size for GLU operation (#26383) X-Git-Tag: upstream/0.0.10438~205 X-Git-Url: https://git.djapps.eu/?a=commitdiff_plain;h=0ab9d6fed73dbc5dc8026c868cb10a6728c4ed48;p=pkg%2Fggml%2Fsources%2Fllama.cpp opencl: limit local workgroup size for GLU operation (#26383) --- diff --git a/ggml/src/ggml-opencl/ggml-opencl.cpp b/ggml/src/ggml-opencl/ggml-opencl.cpp index 388c585fa..915c8e7b9 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};