From 9e3876061c0734b6ec55326ea9d73f379594d9bd Mon Sep 17 00:00:00 2001 From: Georgi Gerganov Date: Thu, 25 Apr 2024 20:33:36 +0300 Subject: [PATCH] llama : add static reminder for llama_state_get_size --- llama.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/llama.cpp b/llama.cpp index f41fba6c7..359892166 100644 --- a/llama.cpp +++ b/llama.cpp @@ -16180,6 +16180,9 @@ size_t llama_state_get_size(const struct llama_context * ctx) { + s_kv_cells ); + // on session change it is very likely that the state size has changed - so we need to update this function + static_assert(LLAMA_SESSION_VERSION == 6, "So you just bumped the session version - good. But did you remember to update llama_state_get_size?"); + return s_total; }