Companion
Constants and factory functions of BackendConfig.
Properties
Sentinel for gpuLayers: offload all layers.
Sentinel for cpuThreads: choose automatically. The engines then use the runtime's performance core count (KggmlRuntime.recommendedThreadCount()): on Android and Linux with differing per-core cpu_capacity (phones), the cores with at least 75% of the fastest core's capacity, at most 4 of them, so a slower tier is never mixed in (all 7 cores of a Tensor G6 made inference several times slower); otherwise the cores at the highest clock (SMT siblings counted once). Apple: the performance cores; Windows: the cores of the highest efficiency class. resolveCpuThreads is the platform-neutral fallback.
CPU-only configuration (no GPU offload). Safe for iOS background execution.
Default configuration: automatic backend, all layers offloaded, automatic thread count, each engine's default flash attention.
Upper bound used when AUTO_THREADS is resolved (more threads rarely help memory-bound inference).
Upper bound accepted for an explicit cpuThreads value.