]> git.djapps.eu Git - pkg/ggml/sources/ggml/commit
opencl: Add support for multiple devices (llama/12622)
authorHenry Linjamäki <redacted>
Wed, 21 May 2025 23:21:45 +0000 (02:21 +0300)
committerGeorgi Gerganov <redacted>
Sun, 25 May 2025 07:46:24 +0000 (10:46 +0300)
commit52b3452a180df73f9bd18a5055a09296d51bfc4a
tree9eaeffd2a142bddf6886ce93c1cc645d35eb29f2
parenta6a49eb098a00cba4a6d600b58542e131fd588a5
opencl: Add support for multiple devices (llama/12622)

* opencl: Add support for multiple devices

... but limited to one platform. A platform with a GPU will be preferred.

Additionally:

* Filter out devices that lack capabilities needed by the backend
  implementation (half support, OpenCL 2.0+, etc).

* Make ggml_backend_opencl_reg() thread-safe.

* fixup: fix an error in sync_with_other_backends

... when there is only one OpenCL device available.
src/ggml-opencl/ggml-opencl.cpp