Skip to content

Commit 0ab9d6f

Browse files
authored
opencl: limit local workgroup size for GLU operation (ggml-org#26383)
1 parent fffbcbd commit 0ab9d6f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎ggml/src/ggml-opencl/ggml-opencl.cpp‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24260,7 +24260,7 @@ static void ggml_cl_glu(ggml_backend_t backend, const ggml_tensor * src0, const
2426024260
}
2426124261

2426224262
const size_t nrows = ggml_nrows(src0);
24263-
size_t nth = 512;
24263+
size_t nth = backend_ctx->max_workgroup_size < 512 ? backend_ctx->max_workgroup_size : 512;
2426424264
size_t global_work_size[] = {nrows*nth, 1, 1};
2426524265
size_t local_work_size[] = {nth, 1, 1};
2426624266

0 commit comments

Comments
 (0)