Skip to content

Commit d953616

Browse files
committed
kv-cache : fix callback reference
ggml-ci
1 parent eae74d1 commit d953616

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/llama-kv-cache.cpp

+2-4
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,9 @@ llama_kv_cache_unified::llama_kv_cache_unified(
2222
ggml_type type_v,
2323
bool v_trans,
2424
uint32_t kv_size) : hparams(hparams), cbs(std::move(cbs)), v_trans(v_trans) {
25-
2625
const int32_t n_layer = hparams.n_layer;
2726

2827
has_shift = false;
29-
3028
can_shift = true;
3129

3230
LLAMA_LOG_INFO("%s: kv_size = %d, type_k = '%s', type_v = '%s', n_layer = %d, can_shift = %d\n",
@@ -74,7 +72,7 @@ llama_kv_cache_unified::llama_kv_cache_unified(
7472
const uint32_t n_embd_k_gqa = hparams.n_embd_k_gqa(i) + hparams.n_embd_k_s();
7573
const uint32_t n_embd_v_gqa = hparams.n_embd_v_gqa(i) + hparams.n_embd_v_s();
7674

77-
ggml_backend_buffer_type_t buft = cbs.get_buft(i);
75+
ggml_backend_buffer_type_t buft = this->cbs.get_buft(i);
7876

7977
ggml_context * ctx = ctx_for_buft(buft);
8078
if (!ctx) {
@@ -1052,7 +1050,7 @@ llama_kv_cache_recurrent::llama_kv_cache_recurrent(
10521050
const uint32_t n_embd_k_gqa = hparams.n_embd_k_gqa(i) + hparams.n_embd_k_s();
10531051
const uint32_t n_embd_v_gqa = hparams.n_embd_v_gqa(i) + hparams.n_embd_v_s();
10541052

1055-
ggml_backend_buffer_type_t buft = cbs.get_buft(i);
1053+
ggml_backend_buffer_type_t buft = this->cbs.get_buft(i);
10561054

10571055
ggml_context * ctx = ctx_for_buft(buft);
10581056
if (!ctx) {

0 commit comments

Comments
 (0)