From 8eb9b4769d948225af04ec628fc3156d409395d5 Mon Sep 17 00:00:00 2001 From: Daniel Bevenius Date: Mon, 24 Nov 2025 13:53:29 +0100 Subject: [PATCH] sampling : remove redundant checks for stride and size [no ci] --- src/llama-context.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/llama-context.cpp b/src/llama-context.cpp index 0ed729f498..dabe64986e 100644 --- a/src/llama-context.cpp +++ b/src/llama-context.cpp @@ -1221,7 +1221,7 @@ static void copy_tensor_async_ints( size_t sampled_size, const std::unordered_map & seq_to_row, ggml_backend_sched_t sched) { - if (sampled == nullptr || sampled_size == 0) { + if (sampled == nullptr) { return; } @@ -1243,7 +1243,7 @@ static void copy_tensor_async_floats( std::vector & counts, const std::unordered_map & seq_to_row, ggml_backend_sched_t sched) { - if (dst == nullptr || stride == 0) { + if (dst == nullptr) { return; } @@ -1269,7 +1269,7 @@ static void copy_tensor_async_candidates( std::vector & counts, const std::unordered_map & seq_to_row, ggml_backend_sched_t sched) { - if (dst == nullptr || stride == 0) { + if (dst == nullptr) { return; }