Companion

Constants and factory functions of ComputeBackend.

Properties

Link copied to clipboard

Order in which AUTO picks a concrete backend: the first one present in the available set wins. OpenCL comes before Vulkan: it is only ever available when the app ships the OpenCL add-on and the device's vendor exposes OpenCL (in practice Qualcomm Adreno, for which ggml's OpenCL kernels are tuned); everywhere else AUTO continues with Vulkan.

Functions

Link copied to clipboard
fun resolve(requested: ComputeBackend, available: Set<ComputeBackend>, allowFallback: Boolean = true): ComputeBackend

Resolves a requested backend to a concrete backend (never AUTO) given the set of backends the engine can actually use on this device. CPU_ONLY is always treated as available.