batch : add n_used count (#14512)

ggml-ci
This commit is contained in:
Georgi Gerganov authored and GitHub committed 2025-07-04 09:04:59 +03:00
1 parent 499a8f5a78
commit c79184d2d1
6 files changed
+34 -1

No files matched your search

+2 -1
View File
@@ -377,7 +377,8 @@ llama_memory_context_ptr llama_memory_recurrent::init_batch(llama_batch_allocr &
ubatch = balloc.split_equal(n_ubatch);
}
if (ubatch.n_tokens == 0) {
if (balloc.get_n_used() < balloc.get_n_tokens()) {
// failed to find a suitable split
break;
}