context : add comments

This commit is contained in:
Georgi Gerganov 2026-01-12 15:18:06 +02:00
parent 03e9d66cc4
commit 5260bb79c0
No known key found for this signature in database
GPG Key ID: 449E073F9DC10735
2 changed files with 9 additions and 1 deletions

View File

@ -1005,7 +1005,7 @@ void llama_context::set_warmup(bool value) {
}
bool llama_context::set_sampler(llama_seq_id seq_id, llama_sampler * sampler) {
LLAMA_LOG_DEBUG("%s: seq_id = %d, sampler = %p\n", __func__, (int) seq_id, (void *) sampler);
LLAMA_LOG_ERROR("%s: seq_id = %d, sampler = %p\n", __func__, (int) seq_id, (void *) sampler);
const bool can_offload =
sampler &&

View File

@ -40,7 +40,15 @@ struct llama_context {
~llama_context();
// reserve a new backend scheduler
// recommended to call whenver the context changes in such a way that the compute graph is modified.
// for example:
// - changing loras
// - changing samplers
// - changing attention type
// - etc.
void reserve();
void synchronize();
const llama_model & get_model() const;