Platform Detector
object PlatformDetector
Detects the current server platform, GPU backend, and physical CPU core count.
All methods are stateless and accept a log function for diagnostic output. This class is shared between LLAMA-Server (text/vision) and Whisper-Server (speech-to-text).
Types
Functions
Link copied to clipboard
Detects the best available GPU backend on the current system.
Link copied to clipboard
Detects the number of physical CPU cores (not hyper-threaded logical processors). Falls back to Runtime.availableProcessors if detection fails.
Link copied to clipboard
fun detectPlatform(log: (CodBi.LogLevel, String) -> Unit, windowsExeName: String = "llama-server.exe", unixExeName: String = "LLAMA-Server"): PlatformDetector.Platform
Detects the current server platform from JVM system properties.