Skip to content

Commit 7613fb2

Browse files
committed
Merge branch 'HybridCacheApplyLogic' into GraniteFour
* HybridCacheApplyLogic: fix: Only call apply on child caches in the success state
2 parents 2b263e6 + a225e35 commit 7613fb2

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/llama-memory-hybrid.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -222,8 +222,12 @@ bool llama_memory_hybrid_context::apply() {
222222

223223
bool res = true;
224224

225-
res = res & ctx_attn->apply();
226-
res = res & ctx_recr->apply();
225+
if (ctx_attn->get_status() == LLAMA_MEMORY_STATUS_SUCCESS) {
226+
res = res & ctx_attn->apply();
227+
}
228+
if (ctx_recr->get_status() == LLAMA_MEMORY_STATUS_SUCCESS) {
229+
res = res & ctx_recr->apply();
230+
}
227231

228232
return res;
229233
}

0 commit comments

Comments
 (0)