Skip to content
Open
Changes from all commits
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
14 changes: 2 additions & 12 deletions src/llama-context.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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) {
Expand Down