]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commit
opencl: Add support for multiple devices (#12622)
authorHenry Linjamäki <redacted>
Wed, 21 May 2025 23:21:45 +0000 (02:21 +0300)
committerGitHub <redacted>
Wed, 21 May 2025 23:21:45 +0000 (16:21 -0700)
commita4e8912dfd4604be1e39bc86ba4c0b02969967ef
tree65858e0c7b8e0d3e4965587f19b228544ecee08d
parentedbf42edfdabb9cea72ae12137570cf48f5d8076
opencl: Add support for multiple devices (#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.
ggml/src/ggml-opencl/ggml-opencl.cpp