Skip to content

Commit 6914c6e

Browse files
committed
fix(ci): clean up KVarN cache warnings
1 parent f4fb2a3 commit 6914c6e

4 files changed

Lines changed: 7 additions & 11 deletions

File tree

src/llama-kv-cache-iswa.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ llama_memory_context_ptr llama_kv_cache_iswa::init_batch(llama_batch_allocr & ba
210210
}
211211

212212
return std::make_unique<llama_kv_cache_iswa_context>(
213-
this, std::move(ctx_base), std::move(ctx_swa), std::move(ubatches));
213+
std::move(ctx_base), std::move(ctx_swa), std::move(ubatches));
214214
} while (false);
215215

216216
// if it fails, try equal split
@@ -244,7 +244,7 @@ llama_memory_context_ptr llama_kv_cache_iswa::init_batch(llama_batch_allocr & ba
244244
}
245245

246246
return std::make_unique<llama_kv_cache_iswa_context>(
247-
this, std::move(ctx_base), std::move(ctx_swa), std::move(ubatches));
247+
std::move(ctx_base), std::move(ctx_swa), std::move(ubatches));
248248
} while (false);
249249

250250
// TODO: if we fail again, we should attempt different splitting strategies
@@ -277,7 +277,7 @@ llama_memory_context_ptr llama_kv_cache_iswa::init_kv_batch(const std::vector<ll
277277
}
278278

279279
return std::make_unique<llama_kv_cache_iswa_context>(
280-
this, std::move(ctx_base), std::move(ctx_swa), ubatches);
280+
std::move(ctx_base), std::move(ctx_swa), ubatches);
281281
}
282282

283283
bool llama_kv_cache_iswa::get_can_shift() const {
@@ -333,7 +333,6 @@ llama_kv_cache_iswa_context::llama_kv_cache_iswa_context(
333333
}
334334

335335
llama_kv_cache_iswa_context::llama_kv_cache_iswa_context(
336-
llama_kv_cache_iswa * kv,
337336
llama_memory_context_ptr ctx_base_in,
338337
llama_memory_context_ptr ctx_swa_in,
339338
std::vector<llama_ubatch> ubatches) :

src/llama-kv-cache-iswa.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,6 @@ class llama_kv_cache_iswa_context : public llama_memory_context_i {
108108

109109
// used to create a batch processing context from a batch
110110
llama_kv_cache_iswa_context(
111-
llama_kv_cache_iswa * kv,
112111
llama_memory_context_ptr ctx_base_in,
113112
llama_memory_context_ptr ctx_swa_in,
114113
std::vector<llama_ubatch> ubatches);

src/llama-kv-cache-kvarn.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,6 @@ llama_kv_cache_kvarn::llama_kv_cache_kvarn(
233233
llama_swa_type swa_type,
234234
const layer_filter_cb & filter,
235235
const layer_reuse_cb & reuse) :
236-
model(model),
237236
hparams(hparams),
238237
params(params),
239238
n_stream(unified ? 1u : n_seq_max),
@@ -565,11 +564,11 @@ void llama_kv_cache_kvarn::seq_keep(llama_seq_id seq_id) {
565564
metadata->seq_keep(seq_id);
566565
}
567566

568-
void llama_kv_cache_kvarn::seq_add(llama_seq_id, llama_pos, llama_pos, llama_pos) {
567+
GGML_NORETURN void llama_kv_cache_kvarn::seq_add(llama_seq_id, llama_pos, llama_pos, llama_pos) {
569568
GGML_ABORT("KVarN does not support position shifts");
570569
}
571570

572-
void llama_kv_cache_kvarn::seq_div(llama_seq_id, llama_pos, llama_pos, int) {
571+
GGML_NORETURN void llama_kv_cache_kvarn::seq_div(llama_seq_id, llama_pos, llama_pos, int) {
573572
GGML_ABORT("KVarN does not support position division");
574573
}
575574

src/llama-kv-cache-kvarn.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,8 @@ class llama_kv_cache_kvarn : public llama_memory_i {
108108
void seq_cp(llama_seq_id seq_id_src, llama_seq_id seq_id_dst, llama_pos p0, llama_pos p1) override;
109109
void seq_cp_recurrent(llama_seq_id, llama_seq_id, llama_pos, llama_pos) override {}
110110
void seq_keep(llama_seq_id seq_id) override;
111-
void seq_add(llama_seq_id seq_id, llama_pos p0, llama_pos p1, llama_pos shift) override;
112-
void seq_div(llama_seq_id seq_id, llama_pos p0, llama_pos p1, int d) override;
111+
GGML_NORETURN void seq_add(llama_seq_id seq_id, llama_pos p0, llama_pos p1, llama_pos shift) override;
112+
GGML_NORETURN void seq_div(llama_seq_id seq_id, llama_pos p0, llama_pos p1, int d) override;
113113
llama_pos seq_pos_min(llama_seq_id seq_id) const override;
114114
llama_pos seq_pos_max(llama_seq_id seq_id) const override;
115115

@@ -159,7 +159,6 @@ class llama_kv_cache_kvarn : public llama_memory_i {
159159
bool can_remove(llama_seq_id seq_id, llama_pos p0, llama_pos p1) const;
160160
void copy_kvarn_stream(uint32_t stream_src, uint32_t stream_dst);
161161

162-
const llama_model & model;
163162
const llama_hparams & hparams;
164163
const llama_kvarn_params params;
165164
const uint32_t n_stream;

0 commit comments

Comments
 (0)