Repository navigation
pins: llama.cpp 6164e5ba -> d2369fe2, the Q8_1 alias fallback compares the requested value rows, the mixed-layout row reads its own import (llama.cpp#508, #509; engine#3380, #3389) - #3487
Conversation
…s the requested value's rows, and the mixed-layout row reads its own import (llama.cpp#508, #509; engine#3380, #3389) Two device regressions found by the first device-tier run at the pin 6164e5ba (the self-hosted gate has been offline since the 1bit OS reinstall, so this run was made by hand): add-on hrx-ops-test was 407 pass / 3 fail / 1 known-fail. llama.cpp#508 (engine#3380): find_alternate_value's Q8_1 comparator required BOTH values' ne[0] to be 128-aligned. The split-FA output publishes its alternate for [64,32,1] and the consumer reads reshape_2d(..., 2048, tokens) -- a pure ordered range over the same bytes, but the source's ne[0]=64 -- so the fallback refused it and the q8 publish had no alternate (q8_alternate == nullptr on ...query1.kv512.masked.head96.value64; the 4-query row failed the plan-size assert first). At head size 128 the source ne[0]=128 and the same lookup passed, which is why only head96/value64 broke. The row width that matters is the requested value's, which is 128-aligned. A plain revert of #503 fixes it but reopens engine#3383, so this is a targeted comparator change; the two rows also become host cases (they never open a device and reproduce cpp:5440/5420 on a host). llama.cpp#509 (engine#3389): mixed_weight_layout_program.q4_k/q6_k compared a ValueId from imported_mixed.graph against bindings of the decode program's SEPARATE import. Ids do not align across imports; the collision it matched was the 2048-float activation (binding length 8192 vs the weight's 215040 bytes). No product path broke and no expectation is re-baselined -- the row now reads the decode program's own weight value. Device evidence (strixhalo gfx1151, root, one box-hold both ticket, runtime libs from the pin's package): before: 23-Nov staged build PASS/PASS on the two FA rows; pin 6164e5ba FAIL/FAIL (and a fresh rebuild at the pin reproduced it, so the staging was not the cause) #508 alone: both FA rows PASS; full add-on suite 409 passed / 1 failed / 1 known-fail (the 1 being #3389's row) #509 alone: both mixed rows PASS on add-on AND no-add-on; full add-on 408 passed / 2 failed / 1 known-fail (the 2 FA) host control: 0/2 at 6164e5ba, 17/17 with #508; revert of #503 alone -> rows PASS but #503's host row fails registry/architectures.json is regenerated by scripts/registry-regen.sh (llama.cpp source sha). A combined #508+#509 full device run was not made; the two per-PR runs are above. #3483's compile-count/TTFT sweep (its item 3) remains unmeasured.
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
Combined device run at the merged pin (engine main
|
| row | summary | rc |
|---|---|---|
add-on hrx-ops-test (full) |
HRX test summary: 410 passed, 0 failed, 1 known-fail, 0 unexpected-pass, 411 total, 82031 ms |
0 |
add-on test-hrx-ops (full) |
test-hrx-ops summary: 295 passed, 0 failed, 0 known-fail, 0 unexpected-pass, 295 total, 406027 ms |
0 |
no-add-on hrx-ops-test (full) |
HRX test summary: 405 passed, 5 failed, 1 known-fail, 0 unexpected-pass, 411 total, 240963 ms |
1 |
add-on, the 4 named rows (--hrx-test-filter) |
4 passed, 0 failed, 0 known-fail, 0 unexpected-pass, 4 total, 181 ms |
0 |
| no-add-on, the 4 named rows | 4 passed, 0 failed, 0 known-fail, 0 unexpected-pass, 4 total, 133 ms |
0 |
The two FA split rows the previous pin broke and #3389's mixed-layout pair, from the ticketed filter run and from inside the two full suites:
3-addon-rows [PASS] 1/4 qwen_decode_split_flash_attention.query4.kv513.masked.head96.value64 102 ms
3-addon-rows [PASS] 2/4 mixed_weight_layout_program.q6_k 178 ms
3-addon-rows [PASS] 3/4 mixed_weight_layout_program.q4_k 181 ms
3-addon-rows [PASS] 4/4 qwen_decode_split_flash_attention.query1.kv512.masked.head96.value64 181 ms
3-noaddon-rows [PASS] 1/4 qwen_decode_split_flash_attention.query1.kv512.masked.head96.value64 115 ms
3-noaddon-rows [PASS] 2/4 qwen_decode_split_flash_attention.query4.kv513.masked.head96.value64 115 ms
3-noaddon-rows [PASS] 3/4 mixed_weight_layout_program.q6_k 132 ms
3-noaddon-rows [PASS] 4/4 mixed_weight_layout_program.q4_k 132 ms
Full add-on suite: 0 failed, 0 unexpected-pass. The one known-fail row is qwen_flash_attention, labelled "engine#3380: decode-split FA always publishes a Q8_1 alternate that no consumer reads"; it still fails for that same reason (hrx-ops-test.cpp:5143: requirement failed: scheduler.plan().metadata.find_alternate_value(...Q8_1...) == nullptr) and was already the known-fail at 6164e5ba. It names engine#3380, which #3481 closed, so that label is now stale -- a test-annotation cleanup, not a device failure of this pin.
The 5 no-add-on failures are pre-existing (not this pin)
The previous pin's own staged run on this box (same staging pattern, same package runtime libs; /data/dev/cl-hrxtest/runs/dv6164.status, logs dv6164-*.log) had 9 failures in the no-add-on full suite and 3 in the add-on full suite. All five still fail with the same text at 6164e5ba (checked with grep -nE 'requirement failed|missing expected kernel' runs/dv6164-noaddon-hrx-ops-test.log), below from this run's log:
[FAIL] 202/411 dense_matmul_swiglu.q4_k.q4_k.swiglu.tokens1.outputs16384.input4096 4600 ms
engine#3120: no hip: kernel scheduled for loom_libs:ggml_mul_mat_swiglu_q4_q8_1_x4_lowtoken_dot -- reading the named expectation
missing expected kernel: loom_libs:ggml_mul_mat_swiglu_q4_q8_1_x4_lowtoken_dot
scheduled kernels: loom_libs:ggml_kquant_swiglu_decode_f32
[FAIL] 322/411 cpu_host_native_weight.q4_k 41 ms requirement failed: binding.layout == decode_layout (q4k-packed-k256-row64 vs ggml-native)
[FAIL] 325/411 coherent_subregion_native_weight.q4_k 61 ms requirement failed: first_stats.weight_materializations == expected_materializations
[FAIL] 326/411 hrx_host_native_weight.q4_k 68 ms requirement failed: binding.layout == decode_layout (q4k-packed-k256-row64 vs ggml-native)
[FAIL] 329/411 uploaded_native_gated_q4 47 ms packed_layout_switch: engine #2137 q4_k batches off the 256 grid ... (GGML_HRX_Q4K_PACKED_TAIL=unset)
missing expected kernel: loom_libs:ggml_mul_mat_swiglu_f32_f32_lowtoken_dot
Two of them are engine#3120 add-on-route rows: with no HIP add-on there is no hip: kernel, the row falls through to the named Loom expectation (require_kernel_subsequence_route) and the Loom route does not schedule that kernel for the shape. The other three are packed/native layout expectations the no-add-on (native) path does not meet. Same rows, same text, at 6164e5ba -- this pin neither adds a failure nor fixes these five.
Control: previous pin vs merged pin, same box and staging pattern
| suite | 6164e5ba (previous pin, runs/dv6164) |
d2369fe2 (this run) |
|---|---|---|
add-on hrx-ops-test full |
407 passed, 3 failed (mixed q6_k, FA q1, FA q4), 1 known-fail | 410 passed, 0 failed, 1 known-fail |
add-on test-hrx-ops full |
295 passed, 0 failed | 295 passed, 0 failed, 406027 ms |
no-add-on hrx-ops-test full |
401 passed, 9 failed (5 pre-existing + mixed q4_k/q6_k + FA q1/q4) | 405 passed, 5 failed (the 5 pre-existing), 1 known-fail |
So the merged pin turns the add-on suite green and takes the no-add-on suite from 9 failures to the 5 that were already failing at 6164e5ba; the mixed-layout pair and the FA split pair now pass in both builds (in the full suites and alone).
Environment
dmesg: no amdgpu reset, wedged, page fault or ring timeout in either ticket window (12:32:55Z - 12:38:24Z and 12:38:45Z - 12:45:31Z); the newest such line in the log is at uptime 2737 s (~11:03Z, an hour and a half before these runs, from an earlier job). Tctl 39 C -> 34 C in the first ticket, 32 C -> 37 C in the second.test-hrx-opsis run under its own flag prefix:HRX_OPS_TEST_OUTPUT=all. The first ticket invoked it withhrx-ops-test's flags (--hrx-test-output all), which its parser rejects (rc 2 before a case ran); it was re-run in a secondbox-hold bothticket with the correct env, and that is the summary above.
Logs on the box (strixhalo)
- status:
/data/dev/cl-hrxtest/runs/hwgate-d2369.status,/data/dev/cl-hrxtest/runs/hwgate-d2369b.status - add-on full:
/data/dev/cl-hrxtest/runs/hwgate-d2369-1b-addon-hrx-ops-test.log - add-on
test-hrx-ops:/data/dev/cl-hrxtest/runs/hwgate-d2369b-addon-test-hrx-ops.log - no-add-on full:
/data/dev/cl-hrxtest/runs/hwgate-d2369-2-noaddon-hrx-ops-test.log - named rows:
/data/dev/cl-hrxtest/runs/hwgate-d2369-3-addon-rows.log,.../hwgate-d2369-3-noaddon-rows.log - failure detail re-runs:
/data/dev/cl-hrxtest/runs/hwgate-d2369-fail-*.log - scripts:
/data/dev/cl-hrxtest/hwgate-d2369-ticket.sh,.../hwgate-d2369-ticket-b.sh - build logs (ryzen):
/home/bcloud/.cache/scratch-hwgate/{configure-addon,configure-noaddon,build-addon,build-noaddon}.log
Carries llama.cpp#508 and #509 into the engine pin — the two fixes for the device regressions the first device-tier run
at
6164e5bafound (the self-hosted gate has been offline since the 1bit OS reinstall, so that run was made by hand).What moves
third_party/llama.cpp6164e5ba->d2369fe2(llama.cpp#508, weekly: ship the sealed NPU kernels by default; launcher requires sealed kernels (rebased on main) #509)registry/architectures.json: regenerated byscripts/registry-regen.sh(llama.cpp source sha)config/gpu-kernels.configdoes not move.The regression: the Q8_1 alias fallback kept the alias source's row shape (#508, engine#3380)
Add-on
hrx-ops-testat6164e5bawas 407 pass / 3 fail / 1 known-fail (it was 399/0/9 at the 23-Nov pin). Onefailure class:
qwen_decode_split_flash_attention.*.masked.head96.value64withq8_alternate == nullptr(the 4-queryrow fails the plan-size assert first). Cause: #503's Q8_1 comparator required both values'
ne[0]to be128-aligned; the split-FA output publishes its alternate for
[64,32,1]and the consumer readsreshape_2d(..., 2048, tokens)— a pure ordered range over the same bytes, but the source'sne[0]is 64, so thefallback refused it. At head size 128 the source
ne[0]is 128 and the same lookup passed, which is exactly why onlyhead96/value64 broke. #508 compares the requested value's rows (128-aligned), keeps #503's alias rule (a plain revert
fixes these rows but reopens engine#3383), and moves the two rows to host tier — they never open a device and reproduce
cpp:5440/5420 on a host.
The test bug: the mixed-layout row compared ValueIds across two imports (#509, engine#3389)
mixed_weight_layout_program.q4_k/q6_kcompared aValueIdfromimported_mixed.graphagainst bindings of the decodeprogram's separate import. Ids do not align across imports; the collision matched was the 2048-float activation
(binding length 8192 vs the weight's 215040 bytes). No product path broke and no expectation is re-baselined — the row
reads the decode program's own weight value.
Device evidence (strixhalo gfx1151, root, one
box-hold bothticket each, runtime libs from the pin's package)Per-PR runs only; a combined #508+#509 full device run was not made.
test-hrx-opswas already 295/295 at the pin.Host-side (this branch)
cmake --build build --target onebit npu_template_test: clean.ctest -R 'pin|registry|template': 23/23 passed.scripts/pre-pr-checks.sh --tree-only --base origin/main: green; skipship_f16_audit/kernel_id_selftest(no gpu-kernels tree here).
hw_gatelabel added; the self-hosted runners still cannot run (nogit/g++-16/~/lbin the runner environment onthe reinstalled 1bit OS), so the device evidence above is the manual equivalent. No pin rollback is needed: #503 is
kept and corrected.
Closes #3483 (its items 1-2 are device-verified at this pin; item 3, the compile-count/TTFT sweep, stays unmeasured and
is noted there). Refs engine#3380, engine#3389.