Skip to content

Commit 06c106d

Browse files
committed
chore!: remove deprecated llama_kv_self_used_cells module function
1 parent d4466fb commit 06c106d

File tree

1 file changed

+0
-19
lines changed

1 file changed

+0
-19
lines changed

ext/llama_cpp/llama_cpp.c

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1888,22 +1888,6 @@ static VALUE rb_llama_get_kv_self(VALUE self, VALUE ctx) {
18881888
return TypedData_Wrap_Struct(rb_cLlamaKvCache, &llama_kv_cache_wrapper_data_type, kv_cache_wrapper);
18891889
}
18901890

1891-
/**
1892-
* @overload llama_kv_self_used_cells(context)
1893-
* @param [LlamaContext] context
1894-
* @return [Integer]
1895-
*/
1896-
static VALUE rb_llama_kv_self_used_cells(VALUE self, VALUE ctx) {
1897-
if (!rb_obj_is_kind_of(ctx, rb_cLlamaContext)) {
1898-
rb_raise(rb_eArgError, "ctx must be a LlamaContext");
1899-
return Qnil;
1900-
}
1901-
llama_context_wrapper* context_wrapper = get_llama_context_wrapper(ctx);
1902-
const int32_t n_used_kv_cells = llama_kv_self_used_cells(context_wrapper->context);
1903-
RB_GC_GUARD(ctx);
1904-
return INT2NUM(n_used_kv_cells);
1905-
}
1906-
19071891
/**
19081892
* @overload llama_kv_self_clear(context)
19091893
* @param [LlamaContext] context
@@ -4776,9 +4760,6 @@ void Init_llama_cpp(void) {
47764760
rb_cLlamaKvCache = rb_define_class_under(rb_mLlamaCpp, "LlamaKvCache", rb_cObject);
47774761
rb_define_alloc_func(rb_cLlamaKvCache, llama_kv_cache_wrapper_alloc);
47784762

4779-
/* llama_kv_self_used_cells */
4780-
rb_define_module_function(rb_mLlamaCpp, "llama_kv_self_used_cells", rb_llama_kv_self_used_cells, 1);
4781-
47824763
/* llama_kv_self_clear */
47834764
rb_define_module_function(rb_mLlamaCpp, "llama_kv_self_clear", rb_llama_kv_self_clear, 1);
47844765

0 commit comments

Comments
 (0)