8000 memory : migrate from llama_kv_cache to more generic llama_memory by ggerganov · Pull Request #14006 · ggml-org/llama.cpp · GitHub
[go: up one dir, main page]

Skip to content

memory : migrate from llama_kv_cache to more generic llama_memory #14006

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 5, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
context : fix casts
ggml-ci
  • Loading branch information
ggerganov committed Jun 5, 2025
commit 7babd98237560dd598b6b7fd7601e2757c6956e6
4 changes: 2 additions & 2 deletions src/llama-context.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,7 @@ uint32_t llama_context::n_threads_batch() const {
}

llama_memory_t llama_context::get_memory() const {
return static_cast<llama_memory_t>(memory.get());
return memory.get();
}

void llama_context::kv_self_defrag_sched() {
Expand Down Expand Up @@ -2297,7 +2297,7 @@ const llama_model * llama_get_model(const llama_context * ctx) {

// deprecated
llama_kv_cache * llama_get_kv_self(llama_context * ctx) {
return static_cast<llama_kv_cache *>(ctx->get_memory());
return dynamic_cast<llama_kv_cache *>(ctx->get_memory());
}

// deprecated
Expand Down
Loading
0