]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commit
opencl: fix couple crashes (#12795)
authorHenry Linjamäki <redacted>
Wed, 21 May 2025 20:21:17 +0000 (23:21 +0300)
committerGitHub <redacted>
Wed, 21 May 2025 20:21:17 +0000 (13:21 -0700)
commitedbf42edfdabb9cea72ae12137570cf48f5d8076
tree78893ae6e11a64b897a92c2d2cf061bf94b820ec
parentd643bb2c798df9c2cd61067d2692b1cd417df402
opencl: fix couple crashes (#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+
ggml/src/ggml-opencl/ggml-opencl.cpp