batch: migrate the rest of examples to llama_batch_ext (#29601)

* migrate the rest

* test-thread-safety

* rm common_batch_staged
This commit is contained in:
Xuan-Son Nguyen authored and GitHub committed 2026-09-30 18:08:43 +02:00
1 parent 05af0d2b13
commit 60e9cf7a7b
34 files changed
+513 -631

No files matched your search

+2 -3
View File
@@ -525,10 +525,9 @@ int llama_completion(int argc, char ** argv) {
}
if (llama_model_has_encoder(model)) {
int enc_input_size = embd_inp.size();
llama_token * enc_input_buf = embd_inp.data();
common_batch batch = common_batch_get_one(ctx, embd_inp);
if (llama_encode(ctx, llama_batch_get_one(enc_input_buf, enc_input_size))) {
if (llama_process(ctx, LLAMA_PROCESS_TYPE_ENCODE, batch.get())) {
LOG_ERR("%s : failed to eval\n", __func__);
return 1;
}