Skip to content

Commit 0082ac2

Browse files
authored
llama: skip graph reservation for unchanged layer capture (#364)
1 parent ad23281 commit 0082ac2

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

‎src/llama-context.cpp‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1356,6 +1356,10 @@ void llama_context::set_embeddings_layer_inp(uint32_t lid, bool enable) {
13561356

13571357
GGML_ASSERT(lid <= model.hparams.n_layer());
13581358

1359+
if (cparams.embeddings_layer_inp[lid] == enable) {
1360+
return;
1361+
}
1362+
13591363
cparams.embeddings_layer_inp[lid] = enable;
13601364

13611365
// note: without this reserve, the draft acceptance drops to zero. not sure why - this is unexpected

0 commit comments

Comments
 (0)