Skip to content

Commit 55b5ae1

Browse files
committed
cont : more correct comment [no ci]
1 parent 9745d5f commit 55b5ae1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/llama-kv-cache.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -442,8 +442,8 @@ void llama_kv_cache_unified::defrag_sched(float thold) {
442442
void llama_kv_cache_unified::set_full() {
443443
n = size;
444444

445-
// when simulating a full KV cache, the specific value of the "head" pointer is not important because we are not
446-
// going to write any data - we just want to measure the memory needed by the graph in such state.
445+
// when simulating a full KV cache, the specific value of the "head" pointer is not important because it does not
446+
// affect the shapes of the tensors in the compute graph - it only affects the offests of the K/V views.
447447
// we should only guarantee that the head position won't cause out-of-bounds view of the K, V tensors, so
448448
// setting it to 0 is the simplest way to achieve that
449449
// ref: https://github.com/ggml-org/llama.cpp/issues/13359

0 commit comments

Comments
 (0)