batched-bench : fix oob write

ggml-ci
This commit is contained in:
Georgi Gerganov
2025-07-04 13:08:31 +03:00
parent b123d89445
commit ab8443d0ea
2 changed files with 6 additions and 2 deletions

View File

@ -130,7 +130,10 @@ int main(int argc, char ** argv) {
common_batch_add(batch, 0, i, { j }, false);
}
}
batch.logits[batch.n_tokens - 1] = true;
if (batch.n_tokens > 0) {
batch.logits[batch.n_tokens - 1] = true;
}
const auto t_pp_start = ggml_time_us();