Skip to content

ggml: allow backend inputs to not create another split - #28387

Merged
ggerganov merged 1 commit into
masterfrom
backend-allow-input
Sep 7, 2026
Merged

ggml: allow backend inputs to not create another split#28387
ggerganov merged 1 commit into
masterfrom
backend-allow-input

Conversation

@am17an

@am17an am17an commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Overview

After #22789, it is not necessary that inputs to a split be bounded by a number as it can grow dynamically. This helps in graphs which require a lot of inputs + spec-dec (e.g. DSV4-Flash with recurrent rollback). Using this and #26610, using DSV4 + Dspark I'm able to maintain a single split across the Meta backend (which does not cache uid except the last one) enabling ~30-35 toks/s of sustained throughput.

Additional information

Requirements

@ggerganov

Copy link
Copy Markdown
Member

For my understanding, how does enabling spec-dec contribute to the increased number of inputs?

@am17an

am17an commented Sep 4, 2026

Copy link
Copy Markdown
Contributor Author

It adds the "roll-back" inputs

llama.cpp/src/llama-graph.h

Lines 600 to 605 in 7d04ce4

ggml_tensor * state_persist_src_idxs = nullptr; // I32 [n_state_persist]
ggml_tensor * state_persist_dst_idxs = nullptr; // I32 [n_state_persist]
ggml_tensor * state_restore_src_idxs = nullptr; // I32 [n_state_restore]
ggml_tensor * state_restore_dst_idxs = nullptr; // I32 [n_state_restore]
ggml_tensor * state_snapshot_src_idxs = nullptr; // I32 [n_state_snapshot]
ggml_tensor * state_snapshot_dst_idxs = nullptr; // I32 [n_state_snapshot]

@am17an am17an mentioned this pull request Sep 4, 2026
@github-actions github-actions Bot added the ggml changes relating to the ggml tensor library for machine learning label Sep 4, 2026
@am17an am17an added the merge ready A maintainer can use this label to indicate that they consider the changes final and ready to merge. label Sep 6, 2026
@ggerganov
ggerganov merged commit 992cb50 into master Sep 7, 2026
25 of 27 checks passed
@ggerganov
ggerganov deleted the backend-allow-input branch September 7, 2026 06:10
Patt92 pushed a commit to Patt92/llama.cpp that referenced this pull request Sep 7, 2026
Drops the bounded multi-backend scheduler split from the feature list: upstream
992cb50 (ggml-org#28387) deleted the input-count check outright, so split boundaries
can no longer drift with the growing inputs_capacity and the local change has
nothing left to do.

Records that upstream independently built and then reverted routed-MoE MMQ tile
sizing (ggml-org#24546, reverted by ggml-org#28551). The revert was about where the logic lives,
not whether it works -- the objection was that it changed kernel configurations
instead of deciding on the host -- and that PR excluded gfx1151 outright, so its
own gfx1151 operator measurements remain the best evidence for the idea here.
SteelPh0enix pushed a commit to SteelPh0enix/llama.cpp-qwen4exp that referenced this pull request Sep 8, 2026
SteelPh0enix pushed a commit to SteelPh0enix/llama.cpp-qwen4exp that referenced this pull request Sep 8, 2026
adromir pushed a commit to adromir/llama-cpp-turboquant that referenced this pull request Sep 9, 2026
x1250 pushed a commit to x1250/llama.cpp that referenced this pull request Sep 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ggml changes relating to the ggml tensor library for machine learning merge ready A maintainer can use this label to indicate that they consider the changes final and ready to merge.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants