]> git.djapps.eu Git - pkg/ggml/sources/ggml/commit
opencl: fix couple crashes (llama/12795)
authorHenry Linjamäki <redacted>
Wed, 21 May 2025 20:21:17 +0000 (23:21 +0300)
committerGeorgi Gerganov <redacted>
Sun, 25 May 2025 07:46:24 +0000 (10:46 +0300)
commita6a49eb098a00cba4a6d600b58542e131fd588a5
treedd3cc8648f39114db1abf6093537faae49bbf1da
parent24059482c4e97232e9f75bbfe668ecb725f52d48
opencl: fix couple crashes (llama/12795)

* opencl: fix couple crashes

* fix kernel launches failed on devices which do not support
  non-uniform work-groups. When non-uniform work-groups are not
  supported, set `local_work_size` to NULL (= let driver choose the
  work-group sizes). This patch does not cover everything - just the
  cases tested by test-backend-ops.

* fix sub-buffer creation failed due to `cl_buffer_region::origin` not
  being aligned to `CL_DEVICE_MEM_BASE_ADDR_ALIGN`.

* OpenCL: query non-uniform WG sizes only on OpenCL 3.0+
src/ggml-opencl/ggml-opencl.cpp