Skip to content

batch: migrate the rest of examples to llama_batch_ext - #29601

Merged
ngxson merged 3 commits into
ggml-org:masterfrom
ngxson:xsn/llama_batch_ext_3
Sep 30, 2026
Merged

ngxson merged 3 commits into
ggml-org:masterfrom
ngxson:xsn/llama_batch_ext_3

Conversation

@ngxson

@ngxson ngxson commented Sep 28, 2026 •

Copy link
Copy Markdown
Collaborator

Overview

Cont #24669 #29385

Migrate the rest of examples. Pretty mechanical changes.

The goal is to have libcommon and everything in examples/, tools/ to use this new API

Next PRs:

  • Support mtmd input for MTP draft models
  • Deprecate llama_batch API: llama_batch_get_one/init/free

Requirements

@github-actions github-actions Bot added testing Everything test related android Issues specific to Android examples labels Sep 28, 2026
@ngxson
ngxson marked this pull request as ready for review September 28, 2026 19:30
@ggerganov ggerganov self-assigned this Sep 28, 2026
@ngxson
ngxson merged commit 60e9cf7 into ggml-org:master Sep 30, 2026
16 checks passed
pierreguillot pushed a commit to Ircam-Partiels/llama.cpp that referenced this pull request Oct 1, 2026
* migrate the rest

* test-thread-safety

* rm common_batch_staged
leonardomurillo added a commit to leonardomurillo/llama.cpp that referenced this pull request Oct 2, 2026
…sal reranker batch split; keep MoE packs + decision engine)

conflicts: llama-graph.cpp (kept use_moe_packs wrapper + upstream GLM5_NEXT clamp arch + MISTRAL4 F32 down-proj),
test-backend-ops.cpp (test_mul_mat_id keeps upstream m_v at arg 10, our skip_ids appended at arg 11; call sites updated),
llama-bench.cpp (both sched_async_cpu and repack fields). decision-engine: local batch helpers (upstream ggml-org#29601 removed
common_batch_clear/add). local MSVC CPU build of llama-server, test-backend-ops, llama-bench OK.
frostyautumnleaf pushed a commit to frostyautumnleaf/llama.cpp that referenced this pull request Oct 5, 2026
* migrate the rest

* test-thread-safety

* rm common_batch_staged
leonardomurillo added a commit to leonardomurillo/llama.cpp that referenced this pull request Oct 7, 2026
…ch split; keep MoE packs + decision engine)

conflicts: llama-graph.cpp (kept use_moe_packs wrapper + upstream GLM5_NEXT clamp arch + MISTRAL4 F32 down-proj),
test-backend-ops.cpp (test_mul_mat_id keeps upstream m_v at arg 10, our skip_ids appended at arg 11; call sites updated),
llama-bench.cpp (both sched_async_cpu and repack fields). decision-engine: local batch helpers (upstream ggml-org#29601 removed
common_batch_clear/add). local MSVC CPU build of llama-server, test-backend-ops, llama-bench OK.
asf0 pushed a commit to asf0/strix-llama.cpp that referenced this pull request Oct 12, 2026
Brings in 221 upstream commits, including ggml-org#14891 (activation-based imatrix
statistics for GGUF imatrices).

Resolutions:
- qwen4exp: take upstream's MTP (ggml-org#29761) over this fork's halo-box#9 head. The two
  write different GGUFs (upstream keeps the MTP block's own hyper-connection
  mixer as nextn.hc_head_* and runs the draft with QSA), and current MTP
  files use upstream's layout. Also drop halo-box#9's attention-only MTP memory for
  qwen4exp in llama-model.cpp and its extra NEXTN entries in constants.py.
- speculative: keep --spec-draft-adaptive's n_draft_eff bound on top of
  upstream's probabilistic draft sampling (result_q); begin() resets both
  the acceptance EMA and the sampler.
- ggml-backend: take upstream's pass-6 input collection (ggml-org#29634) and
  ggml_backend_sched_copy_input() (ggml-org#29943), keeping halo-box#23's copy-0 original
  with input rotation, async-read pinning, and the sanitizer hook.
- vulkan: keep halo-box#12's UMA read-back gate (host-cached or <= 64 KiB direct);
  upstream's AMD-only fix is a subset of it.
- server: keep spec-prefill's prompt_src() next to upstream's
  use_spec_rejection(); use add_embd() with M-RoPE positions.
- speculative-prefill: migrate to common_batch / llama_process, as upstream
  ggml-org#29601 removed common_batch_add/clear.
- README: keep this fork's quick start; common.h, test-alloc: keep both.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
dzannotti pushed a commit to halo-box/strix-llama.cpp that referenced this pull request Oct 16, 2026
The upstream sync removed common_batch_add / common_batch_clear (ggml-org#29601),
so llama-speculative-prefill no longer compiled and the default target
failed to build. Use common_batch and llama_process, as the other
examples now do.

Assisted-by: Claude Opus 5.5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

android Issues specific to Android examples testing Everything test related

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants