diff --git a/crates/llm/src/lib.rs b/crates/llm/src/lib.rs index 4897e7a..8f7ea23 100644 --- a/crates/llm/src/lib.rs +++ b/crates/llm/src/lib.rs @@ -166,6 +166,11 @@ impl LlmEngine { let n_ctx = preflight_context_window(prompt_tokens.len(), config.max_tokens)?; let use_gpu = self.loaded_model().map(|s| s.use_gpu).unwrap_or(false); let gpu_layers = if use_gpu { u32::MAX } else { 0u32 }; + // Trivially true today (gpu_layers = u32::MAX when use_gpu), but the + // explicit comparison documents intent. True residency observability + // (parsing llama.cpp's "offloaded N/M layers" log) is tracked as a + // follow-up in docs/superpowers/specs/2026-05-09-battery-gpu-aware- + // thread-tuning-design.md (ยง Out of scope). let gpu_offloaded = use_gpu && gpu_layers >= model.n_layer(); let thread_count = i32::try_from(inference_thread_count(Workload::Llm, gpu_offloaded)) .unwrap_or(4);