KggmlRuntimeOpenCL

The Android OpenCL add-on: depending on com.donfuldauer:kggml-runtime-opencl packages ggml's OpenCL backend (libggml-opencl.so, with the kernels tuned for Qualcomm Adreno) into the app and declares the vendor's libOpenCL.so in its manifest. :kggml-runtime registers the backend when it loads, before any engine runs, so ComputeBackend.GPU_OPENCL can use the GPU (the engines' ComputeBackend.AUTO stays on the CPU or Vulkan on Android: whisper and llama run faster on the CPU, and diffusion needs ops OpenCL lacks). Devices without OpenCL (e.g. Pixel phones, emulators) cannot load the module: the engines keep running on Vulkan (with that add-on) or the CPU, and logcat (kggml) says why.

On JVM desktop and iOS the add-on adds nothing.

Properties

Link copied to clipboard

Whether an OpenCL device is usable right now (isRegistered and the driver reported at least one GPU).

Link copied to clipboard

Whether the runtime has an OpenCL backend registered (on Android: the add-on was found and the device has OpenCL).