Repository navigation
pins: llama.cpp 39ed69b58 -> c6c654c3, the alternate-value fallback compares layouts, not just ranges (llama.cpp#503; engine#3383) - #3475
Merged
Conversation
…ompares layouts, not just ranges (llama.cpp#503; engine#3383) find_alternate_value() handed a transposed view or a CPY producer the root Q8_1 alternate whenever same_full_value_range() matched -- storage, offset and byte_count only -- so a kernel read a copy that did not hold the value it thought it held (the through_reordered_alias requirement). llama.cpp#503 makes the three fallbacks compare with the ordered comparators: a pure reshape over the same ordered bytes still takes the alternate, an alias whose producer is not a layout alias is refused, and the alias walk stops at a value its own producer wrote (imported graphs always carry the index). Host-tier control, same tree: support.alternate_value_alias_lookup FAILs at 39ed69b58 (hrx-ops-test.cpp:854: through_reordered_alias == nullptr) and passes after; the full host tier goes from 9 passed / 1 known-fail (10 total) to 10 passed / 0 known-fail. The device tier is unchanged by this row. registry/architectures.json is regenerated by scripts/registry-regen.sh (llama.cpp source sha; no architecture change).
bong-water-water-bong
enabled auto-merge (squash)
November 24, 2026 08:22
This was referenced Nov 24, 2026
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Carries llama.cpp#503 into the engine pin: the alternate-value fallback now compares layouts, not only storage
ranges. This is the engine-side half of #3383.
What moves
third_party/llama.cpp39ed69b58->c6c654c3(llama.cpp#503)registry/architectures.json: regenerated byscripts/registry-regen.sh(llama.cpp source sha; 354architectures, no architecture change)
config/gpu-kernels.configdoes not move (no add-on change in this pin).Why
ggml::hrx::find_alternate_value()handed a transposed view (contiguous = false, bytes permuted) or a valuewhose producer writes the storage (
CPY,SET_ROWS) the root's Q8_1 alternate wheneversame_full_value_range()matched -- storage, offset and byte_count only -- so a kernel read a copy that did nothold the value it thought it held (requirement
through_reordered_alias == nullptr, engine#3383).llama.cpp#503 makes the three fallbacks compare with the ordered comparators that AMD's generated-resource path
already used: an alternate is accepted only if it is a pure reshape over the same ordered bytes (F16: full ordered
range; Q8_1: x4 128-element rows; other formats: packed rows), a value whose producer is not a layout alias is
refused, and the alias walk stops at a value its own producer wrote -- the graph index is the only record of a
write that reused the storage, so an unindexed graph gets no fallback.
import_ggml_graph()always builds thatindex (
graph/graph.cpp:202), so every dispatch caller has it.Control (host tier, the fork's own build)
Same tree, pre-fix vs post-fix (
cmake -DGGML_HRX=ON -DLLAMA_BUILD_TESTS=ON,-j 6):The device tier is unchanged by this row (it is a host case); the 398 device cases are skipped host-side with the
suite's standard skip line.
Host-side (this branch)
cmake --build build --target onebit: clean.ctest -R 'pin|registry|template': 23/23 passed (registry_pins,registry_pins_staged,pin_mirror,pin_holdings,template_pin,submodule_pin_check, ...).scripts/pre-pr-checks.sh --tree-only --base origin/main: green; the two skips arehip_f16_auditandkernel_id_selftest(no gpu-kernels tree here -- their own environment reason).hw_gatelabel added.hw_gate/hrx_buildcannot run: the self-hostedstrixhalo-engine/strixhalo-benchrunners are offline (the box runs 1bit OS since the c35 install and the runner units are not present), which is the
same state #3424, #3407 and #3462 merged under. The substitute for the changed code is the fork's own
GGML_HRX=ONbuild and the host-tier control above -- the changed header never enters
libhrx/libloomcand the device rows donot exercise this fallback differently.
Closes #3383.