diff --git a/network-poc/native-node/src/main.rs b/network-poc/native-node/src/main.rs index aa3fd68..4c774c7 100644 --- a/network-poc/native-node/src/main.rs +++ b/network-poc/native-node/src/main.rs @@ -285,6 +285,9 @@ async fn main() { let gpus = collect_all_gpus(); if gpus.is_empty() { + #[cfg(not(feature = "gpu-detect"))] + tracing::info!("GPU-tunnistus ei käytössä (--no-default-features). Ollama käyttää GPU:ta automaattisesti jos saatavilla."); + #[cfg(feature = "gpu-detect")] tracing::info!("GPU:ta ei havaittu — toimitaan CPU-moodissa"); } else { for (i, gpu) in gpus.iter().enumerate() { @@ -331,12 +334,10 @@ async fn main() { continue; } - let mut busy = false; - while let Some(Ok(msg)) = read.next().await { if let Message::Text(text) = msg { // LLM-promptit - if text.contains("llm_prompt") && !busy { + if text.contains("llm_prompt") { if let Ok(task) = serde_json::from_str::(&text) { let prompt = task.get("prompt").and_then(|v| v.as_str()).unwrap_or(""); let task_id = task.get("task_id").and_then(|v| v.as_str()).unwrap_or("?"); @@ -345,7 +346,6 @@ async fn main() { if !prompt.is_empty() && (msg_model.starts_with("qwen-coder") || msg_model.starts_with("qwen2.5-coder")) { if let Some(ref engine) = llm { - busy = true; let max_tokens = task.get("max_tokens").and_then(|v| v.as_u64()).unwrap_or(1024) as usize; tracing::info!("Generoidaan (task_id: {}, max_tokens: {}): \"{}\"", task_id, max_tokens, &prompt[..prompt.len().min(100)]); @@ -377,7 +377,6 @@ async fn main() { tracing::error!("Inferenssivirhe: {}", e); } } - busy = false; } } }