add GGML_ASSERT

This commit is contained in:
Xuan Son Nguyen 2024-10-22 13:14:38 +02:00
parent 540c3016d8
commit 11b1564efb

View file

@ -5202,6 +5202,7 @@ struct llama_batch_allocr {
// optionally fulfill the batch returned by llama_batch_get_one
llama_batch_allocr(llama_context & ctx, struct llama_batch in_batch) {
batch = in_batch;
GGML_ASSERT(batch.n_tokens > 0);
if (!batch.pos) {
// determine the last position in KV cache
llama_pos last_pos = -1;