Skip to content

pins: llama.cpp d2369fe2 -> f61e1b93, the split decode attention publishes its Q8_1 alternate only when a consumer reads it (llama.cpp#511; engine#3380) - #3490

Merged
bong-water-water-bong merged 1 commit into
mainfrom
bump-hrx/f61e1b93
Nov 24, 2026
Merged

bong-water-water-bong merged 1 commit into
mainfrom
bump-hrx/f61e1b93

Conversation

@bong-water-water-bong

Copy link
Copy Markdown
Collaborator

Carries llama.cpp#511 into the engine pin: the split decode attention now publishes its Q8_1 alternate only when a
consumer actually reads it. Closes engine#3380's remaining half (the known-fail row).

What moves

  • third_party/llama.cpp d2369fe2 -> f61e1b93 (llama.cpp#511)
  • registry/architectures.json: regenerated by scripts/registry-regen.sh (llama.cpp source sha)
  • config/gpu-kernels.config does not move.

Why

match_flash_attention_decode_split_next_q8_dispatch() (dispatch-flash-attention.cpp:659) runs the loom
ggml_flash_attention_decode_split_f32_f16_wmma_next_q8 kernel, which writes the attention output and its Q8_1 x4
packing in one launch so the next projection need not quantise the activation — and it called
append_alternate_value unconditionally. A graph ending at the attention output (exactly qwen_flash_attention)
therefore planned a copy nothing can read; that row has been the suite's last known-fail, labelled engine#3380.

llama.cpp#511 applies the existing graph-only consumer qualification (dispatch-q8-publication.h's
common_for_each_q8_consumer through full ordered reshape aliases + common_q8_consumer_is_qualified_projection, the
#449/#504 machinery). Kernel selection, the q8 transient and bindings[9] are untouched — only the alternate metadata
is conditional. qwen_flash_attention becomes a plan-only host case with the known-fail label removed; the seven
test-hrx-ops fa_decode_split.* rows assert the no-alternate plan and keep asserting the q8 transient binding.
Publication-when-a-consumer-exists stays pinned by qwen_decode_split_flash_attention.*.masked.head96.value64 and
qwen_decode_attention_output_next_q8.*.

Device evidence (strixhalo gfx1151, add-on build, package runtime libs, root, one box-hold both ticket)

before (d2369fe2): hrx-ops-test 410 passed, 0 failed, 1 known-fail, 411 total
                   [KNOWN-FAIL] qwen_flash_attention  (the unread-publish reason)
after  (#511)    : hrx-ops-test 411 passed, 0 failed, 0 known-fail, 411 total, 106897 ms
                   single row [PASS] qwen_flash_attention (110 ms)
                   test-hrx-ops 295 passed, 0 failed; the seven publish rows pass
                   no amdgpu reset / wedged / page-fault / ring-timeout in the ticket window

Host control (no device)

Pre-fix source + the new host row: FAIL (find_alternate_value(...) == nullptr, and the fa_decode_split rows FAIL
the no-alternate assertion). With the fix: all 5 rows pass, host hrx-ops-test 18 passed / 0 failed, test-hrx-ops
2 passed, check_stale_expectations.py --check 488 literals selectable.

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; skips hip_f16_audit / kernel_id_selftest
    (no gpu-kernels tree here).

hw_gate label added; the self-hosted runners still cannot run (no git/g++-16/~/lb in the reinstalled 1bit OS),
so the device evidence above is the manual equivalent, taken at this pin.

With this the shipped route's add-on device tier is 411 passed / 0 failed / 0 known-fail plus test-hrx-ops
295/0 — no parked rows left. The no-add-on build's 5 pre-existing failures are tracked by engine#3488.

Closes #3380.

…ishes its Q8_1 alternate only when a consumer reads it (llama.cpp#511; engine#3380)

The split-FA decode matcher (match_flash_attention_decode_split_next_q8_dispatch) runs a loom kernel that writes
the attention output AND its Q8_1 x4 packing in one launch so the next projection need not quantize the activation,
and it called append_alternate_value unconditionally. A graph that ends at the attention output -- exactly the
qwen_flash_attention row -- therefore planned a copy nothing can read; the row had been parked as the suite's last
known-fail with that reason (engine#3380).

llama.cpp#511 applies the existing graph-only consumer qualification (dispatch-q8-publication.h's
common_for_each_q8_consumer through full ordered reshape aliases + common_q8_consumer_is_qualified_projection, the
#449/#504 machinery) to that publication. Kernel selection, the q8 transient and bindings[9] are untouched -- only the
alternate metadata is conditional. The qwen_flash_attention row becomes a plan-only host case with the known-fail
label gone; the seven test-hrx-ops fa_decode_split.* rows assert the no-alternate plan and keep asserting the q8
transient binding. Publication-when-a-consumer-exists stays pinned by qwen_decode_split_flash_attention.*.masked.head96.value64
and qwen_decode_attention_output_next_q8.*.

Device evidence (strixhalo gfx1151, add-on, package runtime libs, root, one box-hold both ticket):
  before (d2369fe2): hrx-ops-test 410 passed, 0 failed, 1 known-fail (qwen_flash_attention)
  after  (#511)    : hrx-ops-test 411 passed, 0 failed, 0 known-fail, 411 total; the single row PASSes;
                     test-hrx-ops 295 passed, 0 failed; the 7 publish rows pass; no reset/fault in the window
Host control (no device): pre-fix source + the new host row FAILs (find_alternate_value(...) == nullptr, and the
fa_decode_split rows FAIL the no-alternate assertion); with the fix all 5 rows pass, host hrx-ops-test 18/0,
test-hrx-ops 2/0, check_stale_expectations 488/488 selectable.

registry/architectures.json is regenerated by scripts/registry-regen.sh (llama.cpp source sha).
@bong-water-water-bong bong-water-water-bong added the hw-gate Run the HRX hardware gate on Strix Halo (docs/hw-gate.md) label Nov 24, 2026
@bong-water-water-bong
bong-water-water-bong enabled auto-merge (squash) November 24, 2026 13:20
@github-actions

Copy link
Copy Markdown

PR Reviewer Guide 🔍

Here are some key observations to aid the review process:

🎫 Ticket compliance analysis 🔶

449 - Partially compliant

Compliant requirements:

  • The PR restores the consumer-driven activation publication by updating llama.cpp to f61e1b93 which includes the necessary changes from llama.cpp#511
  • The PR updates the registry/architectures.json to reflect the new llama.cpp commit

Non-compliant requirements:

  • The PR does not explicitly show the re-registration of the kernels in dispatch_registration/ as mentioned in the ticket
  • The PR does not show the specific test updates for the 7 host cases

Requires further human verification:

  • Verification that the 7 host cases in hrx-backend-test now pass
  • Verification that the kernel registrations are properly restored in dispatch_registration/

3380 - Partially compliant

Compliant requirements:

  • The PR updates llama.cpp to f61e1b93 which includes the fix from llama.cpp#511 that addresses the conditional publication of Q8_1 alternate
  • The PR ensures that qwen_flash_attention no longer has a known-fail label

Non-compliant requirements:

  • The PR does not explicitly show the verification that the fused matcher is now selected in appropriate configurations

Requires further human verification:

  • Verification that the fused matcher qwen.matmul.attention_output_q4k_q8_1_x4_next_q8 is properly selected in configurations without add-on GEMV
  • Verification that the test case qwen_flash_attention now passes without known-fail label
⏱️ Estimated effort to review: 2 🔵🔵⚪⚪⚪
🧪 No relevant tests
🔒 No security concerns identified
⚡ Recommended focus areas for review

Outdated Commit Reference

The registry/architectures.json file has been updated to reference the new llama.cpp commit, but it's unclear if all the necessary kernel registrations have been restored in the dispatch_registration/ directory as required by the ticket. This change alone does not guarantee that the previously dropped kernels are properly registered.

"llama.cpp (hrx)": "f61e1b93dd3ffc3b5a76918ffa16ea01a4fda83d"

@bong-water-water-bong
bong-water-water-bong merged commit b1b95ce into main Nov 24, 2026
13 of 17 checks passed
@bong-water-water-bong
bong-water-water-bong deleted the bump-hrx/f61e1b93 branch November 24, 2026 13:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

hw-gate Run the HRX hardware gate on Strix Halo (docs/hw-gate.md) Review effort 2/5

Projects

None yet

Development

Successfully merging this pull request may close these issues.

hrx: the fused Qwen attention-output next-q8 matcher (qwen3_moe_dense_linear_q4k_q8_1_x4_next_q8) is selected in no configuration

1 participant