From cd8427d018c07eefab6c110f7f115c31ec4c6157 Mon Sep 17 00:00:00 2001 From: Niklas Wenzel Date: Mon, 2 Nov 2026 13:13:31 +0100 Subject: [PATCH] context : simplify setters (#29730) --- src/llama-context.cpp | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/src/llama-context.cpp b/src/llama-context.cpp index 4141e3c9e..833c38fd7 100644 --- a/src/llama-context.cpp +++ b/src/llama-context.cpp @@ -1379,14 +1379,9 @@ void llama_context::set_nextn_layer_offset(int32_t offset) { void llama_context::set_causal_attn(bool value) { LLAMA_LOG_DEBUG("%s: value = %d\n", __func__, value); - if (cparams.causal_attn == value) { - return; - } + // no scheduler reserve needed because graph shapes must not depend on causal_attn, a flip only rebuilds the graph cparams.causal_attn = value; - - // no scheduler reserve needed because graph shapes must not depend on causal_attn, a flip only rebuilds the graph - //sched_need_reserve = true; } bool llama_context::get_causal_attn() const { @@ -1396,14 +1391,9 @@ bool llama_context::get_causal_attn() const { void llama_context::set_warmup(bool value) { LLAMA_LOG_DEBUG("%s: value = %d\n", __func__, value); - if (cparams.warmup == value) { - return; - } + // no scheduler reserve needed because warmups are usually with small batches cparams.warmup = value; - - // warmups are usually with small batches, so no need to reserve - //sched_need_reserve = true; } bool llama_context::set_sampler(llama_seq_id seq_id, llama_sampler * sampler) {