From 1b0e36c119f34fea8f5c7982f677b875df5a283c Mon Sep 17 00:00:00 2001 From: rob thijssen Date: Thu, 4 Jun 2026 15:26:46 +0300 Subject: [PATCH] fix(neuron): cover TpForwardLogitsWithImages in drain_poisoned match MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The CUDA type-check caught a non-exhaustive match: drain_poisoned() must reply an error to every Job variant's reply channel, including the new cuda-gated TpForwardLogitsWithImages. The non-cuda build couldn't see it — the variant is #[cfg(feature = "cuda")], so the match is exhaustive without it on CPU. Refs TP-vision plan Stage 2. Co-Authored-By: Claude Opus 4.8 (1M context) --- crates/neuron/src/harness/device_worker/dispatch.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/crates/neuron/src/harness/device_worker/dispatch.rs b/crates/neuron/src/harness/device_worker/dispatch.rs index d83379d..f1b1586 100644 --- a/crates/neuron/src/harness/device_worker/dispatch.rs +++ b/crates/neuron/src/harness/device_worker/dispatch.rs @@ -1015,6 +1015,10 @@ fn drain_poisoned(job: Job, device_index: u32) { Job::TpForwardLogits { reply, .. } => { let _ = reply.send(Err(err())); } + #[cfg(feature = "cuda")] + Job::TpForwardLogitsWithImages { reply, .. } => { + let _ = reply.send(Err(err())); + } Job::Shutdown => { // Filtered by the matches!() guard in run(); reaching // here would be a logic error.