Repository navigation
third_party/llama.cpp: pin to 8c12dfa63 — delta-net decode reads recurrent states in place (+3.2 % at 4 streams, llama.cpp#388) - #2461
Conversation
…rent states in place (+3.2 % at 4 streams) f3d177a40 -> 8c12dfa63, one commit: llama.cpp#388. When the recurrent state copy is an identity (every sequence in its own cell, no cleared state, no pending rollback), build_rs returns a view of the ubatch's state rows instead of a GET_ROWS gather. Gated-delta-net families (QWEN35 / QWEN35MOE / QWEN3NEXT), one token per sequence. Qwen3.8-27B Q4_K_M, 4 streams (c4_steady, -np 4 -kvu): 39.2 / 39.1 -> 40.2 / 40.6 tok/s. registry/architectures.json records the new pin (registry_build.py --check-pins rc 0). Co-Authored-By: Claude Opus 5.5 <[email protected]>
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
|
The two failures I attributed to my own fixture exclusion pass at the pin with the model present. Same build tree ( So every failure at the pin also fails at the base pin |
|
VERDICT: READY at The pin, checked against the remote rather than a refSo it is a single-commit forward move, gitlink and The commit's aliasing predicate is the part that matters, and it is conservativeThe change reads recurrent states in place instead of gathering them onto themselves, which is only sound when the gather really is an identity. if (get_rs_z() >= 0) return false; // a cleared state exists
for each row i: if (cells[idx].src0 != (int32_t) idx) return false; // the cell does not read its own row
if (... rs_idx[seq] != 0) return false; // a rollback reads an OLDER snapshot row
The test asserts the two paths are mutually exclusive, which is the right shapeThat single assertion is what keeps a fast path from silently crossing into the case it is not valid for: the fused decode kernel is required to be used only when the state is not in place. A test that only exercised the in-place arm would pass just as happily with the predicate inverted. Measured, and the numbers are the honest size4 streams, Nothing to ask. One commit, one pin line, a predicate that refuses the three cases where aliasing would lie, and a test that pins the boundary between the two paths. |
|
VERDICT at 3647b74: READY — pin is the tip, the delta is one commit, and the engine builds it, which for this particular commit is the check that matters. The pin, against the remoteEngine build at the pin (the part a fork build cannot tell you)That matters more than usual here: the delta is not test-only. The scope statement is the useful half of the description
That is the right way to describe an aliasing optimisation: four conditions and an enumerated family set, so a reviewer can ask "does the condition cover my case" instead of guessing. It also ships with tests — Two things I am not verifying, and one that has now bitten twice
And the measurement artefact: the body cites |
bong-water-water-bong
left a comment
There was a problem hiding this comment.
VERDICT: READY -- the failure table is the part that makes a pin landable, and one behaviour change is still unnamed
This is how a pin bump's evidence should look: a build at the pin (rc 0, gpu-kernels at 2022afb74), the same four harness failures at the base pin ("cannot find ROCm device library"), the fork ctest compared at the pin against the base with the same binary set -- 9 of 104 versus the same 7, with the extra two named and traced to an exclusion of mine (test-download-model, which fetches tinyllamas/stories15M-q4_0.gguf), and a re-run promised with the model present. Naming the pre-existing failures is what a reader needs; naming the difference from base is what makes it a claim about the pin rather than about the box. hrx-ops-test --hrx-test-filter ssm_conv at 8/8 PASS covers ssm_conv_decode.in_place_state{,.schedule} -- the two cases #388 added.
Declining the unfiltered hrx-ops-test is right, and for the right reason: an unfiltered run reset the GPU twice on 11-13. Reporting a filtered run and saying why is the opposite of reporting an unfiltered one that happened to survive.
The ask, carried from my #388 review, and it matters more at a pin than in the PR: this bump changes single-stream arithmetic. At 1 row the conv now runs the separate kernels instead of the fused decode kernel, so 1-slot greedy output differs from base at char 321 / 826 of 256-token answers -- deterministic, inside the KLD envelope of swapping the fused conv kernel out (0.000287 ± 0.000018 vs 0.000259 ± 0.000015), and not what "1-stream tok/s is unchanged" says to a reader. Anyone holding golden outputs, a stored baseline, or a bit-exact expectation against the previous pin will see text change, and the pin body is where they will look for it. One sentence: "1-stream greedy output changes at this pin (separate conv kernels instead of the fused one, KLD-equivalent to swapping that kernel); tok/s is unchanged."
Nothing else: the aliasing contract is stated at the return site and was reviewed on #388, the registry pin line moves with --check-pins rc 0, and the 87 NPU-labelled tests being out of scope is a correct exclusion rather than a gap (no npu-hold ticket in this run).
What
third_party/llama.cpp:f3d177a40→8c12dfa63, one commit, plus the registry pin line it implies.When every sequence sits in its own recurrent cell, with no cleared state and no pending rollback,
build_rsreturns a view of the ubatch's state rows instead of a GET_ROWS gather onto themselves. Scope: the gated-delta-net families (QWEN35 / QWEN35MOE / QWEN3NEXT), one token per sequence. The aliasing contract is stated at the return site and was reviewed on #388.registry/architectures.jsonchanges by the one pin line;tools/registry_build.py --check-pinsis rc 0.Measured (llama.cpp#388, Qwen3.8-27B Q4_K_M sha 880a52af, gfx1151)
c4_steady.py,-np 4 -kvu, A B A B, coder-llm idle: 39.2 / 39.1 → 40.2 / 40.6 agg tok/s (+3.2 %).-ub 1) is the same size as swapping the fused conv kernel out (0.000287 vs 0.000259).Verified at the pin
Build: engine
cmake --buildrc 0 at8c12dfa63(gpu-kernels at the pinned2022afb74). Forkninja -k 0: only four gpu-kernels harness/tool targets fail, with "cannot find ROCm device library":test-nvfp4,ssm-scan-bounds-check,glm-mla/moe-decode-harness. The same four fail at the base pin.Suites, one gpu-hold ticket, no amdgpu fault (run on main 3c11dbd; rebased onto a2cff92, whose two new commits are npu / pre-pr-checks and do not touch the fork or the registry):
8c12dfa63f3d177a40(same binary set, rebuilt)hrx-ops-test --hrx-test-filter ssm_conv(incl. #388'sssm_conv_decode.in_place_state{,.schedule})test-tokenizers-ggml-vocabs,test-kv-zero,test-llama-archs,test-llama-context,test-hrx-fa-transposed-value,test-hrx-mul-mat-id-k32,test-hrx-fa-masked-vlaya_gguf_routefailslaya_gguf_routefailsThe other two failures at the pin,
test-thread-safetyandtest-eval-callback, are my exclusion. I excludedtest-download-model, which downloadstinyllamas/stories15M-q4_0.gguf, and both load that file. In the base run ctest pulled the download in as a dependency and both passed. Re-running them at the pin with the model present is queued; I will post the result here.Not run, and not claimed
hrx-ops-test/test-hrx-ops: an unfiltered run reset the GPU twice on 11-13. Thessm_convfilter above covers what bump-hrx: the scheduled HRX pin sync is failing #388 touches.Refs llama.cpp#388, engine C4-STREAMS.
🤖 Generated with Claude Code