Skip to content

Commit 7d7003d

Browse files
committed
batch : fix check for empty sequences in memory
ggml-ci
1 parent c148cf1 commit 7d7003d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/llama-batch.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,9 @@ bool llama_batch_allocr::init(
244244
continue;
245245
}
246246

247-
if (memory) {
247+
const llama_pos p0 = memory ? memory->seq_pos_max(s) : -1;
248+
249+
if (p0 >= 0) {
248250
bool ok = true;
249251

250252
if (batch.token) {

0 commit comments

Comments
 (0)