From 5c00eb22f2194779fb62b12a7242fdefb7cf683a Mon Sep 17 00:00:00 2001 From: Georgi Gerganov Date: Fri, 4 Jul 2025 17:59:08 +0300 Subject: [PATCH] kv-cache : fix handling when find_slot fails ggml-ci --- src/llama-kv-cache-unified.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/llama-kv-cache-unified.cpp b/src/llama-kv-cache-unified.cpp index 3874777c8..ae544cc4b 100644 --- a/src/llama-kv-cache-unified.cpp +++ b/src/llama-kv-cache-unified.cpp @@ -573,7 +573,7 @@ llama_kv_cache_unified::slot_info_vec_t llama_kv_cache_unified::prepare(const st apply_ubatch(sinfo_new, ubatch); } - GGML_ASSERT(!states.empty()); + GGML_ASSERT(!states.empty() || !success); // iterate backwards and restore the cells to their original state for (auto it = states.rbegin(); it != states.rend(); ++it) {