Repository navigation
hrx-ops-test: the mixed-layout device row compared ValueIds across two graph imports - it reads the decode program's own weight value (engine#3389) - #509
Merged
bong-water-water-bong merged 1 commit intoNov 24, 2026
Conversation
…o graph imports - it reads the decode program's own weight value (engine#3389) The mixed program and the decode program are separate graph imports, so the same weight has a different ValueId in each; the row compared the decode program's bindings against the mixed program's id. The collision it hit was the activation (a 2048-float value, 8192 bytes), so the row read decode_native for a decode that binds the Q6_K weight packed, and its copy-count expectations followed that false reading. Compare in the decode program's own graph instead. Refs 1bit-MONSTER/engine#3389
This was referenced Nov 24, 2026
bong-water-water-bong
deleted the
fix/3389-mixed-row-decode-value-ids
branch
November 24, 2026 12:06
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.
engine#3389: the two mixed-layout rows' device failures are a test bug, not a product route. The row compared a ValueId from one graph import against the bindings of another import.
The defect
ValueIds are per graph snapshot. run_mixed_weight_layout_program_case has two programs and two imports:
(tests/hrx-ops-test.cpp:4461);
bindings against the mixed import's weight id (tests/hrx-ops-test.cpp:4489).
The same tensor has a different id in each import (the mixed graph meets the weight before the gather, the decode graph
after the rmsnorm+mul activation), so the comparison matched an unrelated value. Measured on the device build at
6164e5b, the collision was the activation: the binding it took has length 8192 (2048 f32) - not the Q6_K weight's
215040 bytes - which is why the row concluded "native" for a decode that binds the weight packed.
Consequences: REQUIRE(decode_packed) failed for Q6_K on both routes, and the Q4_K copy-count expectation was derived
from the false "native" reading, so the no-add-on Q4_K row (decode binds packed; mixed program already holds the native
copy) failed its materialization assert. The same id mix-up was in the packed branch's resident_buffer() lookup
(tests/hrx-ops-test.cpp:4561).
The fix
Read the weight's value from each program's own graph and compare in that space:
No expectation is re-baselined: the row asserts the same packed copy / two resident copies / one duplicate warning as
before, now against the program's own ids. The host-tier twin for the same graph shape already asserts the packed
binding the device plan takes (q6_decode_source_eligibility.q6_k, which compares inside its own import - it passes on
the box).
Device evidence (gfx1151, one box-hold both ticket, as root)
Built with the pinned recipe (add-on and no-add-on, gfx1151), ran with the pin's runtime libs from pkg/hrx/llama/bin,
box env HRX_ALLOW_NO_SVM=1 etc., 12:00:59Z-12:03Z, no GPU reset.
At 6164e5b the same two rows are FAIL on add-on (q6_k, cpp:4506 decode_packed) and FAIL on no-add-on (q6_k cpp:4506,
q4_k cpp:4516 materializations).
Full add-on device suite with this change: 408 passed, 2 failed, 1 known-fail, 411 total. The two remaining
failures are the split-FA head96/value64 rows, which are engine#3380 and are fixed by llama.cpp#508; together the two
changes give 410 passed / 0 failed / 1 known-fail (qwen_flash_attention).
Logs on strixhalo: /data/dev/cl-hrxtest/runs/fa3.status, fa3-prb-addon-mixed.log, fa3-prb-noaddon-mixed.log,
fa3-prb-addon-full.log.
Refs 1bit-MONSTER/engine#3389
Refs 1bit-MONSTER/engine#3380