Skip to content

Commit 7babd98

Browse files
committed
context : fix casts
ggml-ci
1 parent f149a8e commit 7babd98

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/llama-context.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -419,7 +419,7 @@ uint32_t llama_context::n_threads_batch() const {
419419
}
420420

421421
llama_memory_t llama_context::get_memory() const {
422-
return static_cast<llama_memory_t>(memory.get());
422+
return memory.get();
423423
}
424424

425425
void llama_context::kv_self_defrag_sched() {
@@ -2297,7 +2297,7 @@ const llama_model * llama_get_model(const llama_context * ctx) {
22972297

22982298
// deprecated
22992299
llama_kv_cache * llama_get_kv_self(llama_context * ctx) {
2300-
return static_cast<llama_kv_cache *>(ctx->get_memory());
2300+
return dynamic_cast<llama_kv_cache *>(ctx->get_memory());
23012301
}
23022302

23032303
// deprecated

0 commit comments

Comments
 (0)