Skip to content

pins: llama.cpp e0e7c8d3 -> 6164e5ba, the packed/mixed-layout + attention-output next-q8 rows re-pointed, dynamic-workload specialization restored (llama.cpp#505, #506, #507; engine#3389, #3380, #3382) - #3481

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

Conversation

@bong-water-water-bong

@bong-water-water-bong bong-water-water-bong commented Nov 24, 2026 •

Copy link
Copy Markdown
Collaborator

Carries llama.cpp#505, #506 and #507 into the engine pin. Engine-side half of #3389, #3380 and #3382.

What moves

#3389 -- packed / mixed-layout rows ask for a packed copy again (#505)

The four rows had stopped exercising the packed path (their graphs read Q4_K / Q6_K as stored; #3120 replaced the
packed assertion without leaving a row that still made the request). Rebuilt around shapes that do request it --
one-token Q6_K decodes for weight_persistence_sequence, a program pair for mixed_weight_layout_program.{q4_k,q6_k},
q6_decode_source_eligibility in place of q4_prefill_source_eligibility -- plus three host-tier rows that fail when
a graph stops asking for the packed rows. Host tier 10 -> 13 passed, 0 failed; a deliberate revert of the packed-layout
acceptance fails them.

#3380 -- the attention-output next-q8 rows were unfusable, not unselected (#506)

Two reasons, neither the predicate: the rows built the residual as a graph input (the matcher correctly refuses to
fuse an in-place add into caller-owned memory, #95), and the shipped add-on's hip.gemv_wide (329) claims every
one-token Q4_K projection whose q8_1 input already exists before this route (300) is tried, binding the same
FA-published alternate -- so the unread-write cost the issue describes does not apply to the shipped build. The rows
now take their residual from a producer as the shipped graph does, assert the measured plan, and are host cases.

#3382 -- the dynamic-workload specialization is restored, both halves (#507)

f2099e9b7 dropped both halves of c37033e0b's dynamic-workload feature: the matcher tags (rmsnorm/scale/unary/copy
back to Exact) and the runtime (kernel_executable_key() keyed on every workload value again;
specialize_workload, the retained launch program and the per-dispatch launch evaluation were gone, so re-tagging
alone would have changed one log field). Both are restored: the ops answer Dynamic again, one executable is cached
across token counts, and the launch program re-evaluates geometry per dispatch.

Control (host tier; the fork's own -DGGML_HRX=ON tests, both add-on and no-add-on builds)

#505: host tier 10 passed -> 13 passed, 0 failed, 0 known-fail
      packed-layout acceptance deliberately reverted: FAIL binding.layout == layout (ggml-native vs q6k-packed-...)
#506: before: plan.dispatches.size() == 3 / fallback projection; after: [PASS] both rows,
      plan shows qwen.matmul.attention_output_q4k_q8_1_x4_next_q8 (fused); host tier 12 passed / 0 failed
#507: new test-hrx-dynamic-workload passes: Dynamic answered at 3/18/512 tokens, ONE cache entry for element_count
      9216 and 262144, launch program 2 then 4 workgroups, exact path still compile-time geometry
      control A (only the four tags reverted): FAIL at :106 (== WorkloadSpecialization::Dynamic)
      control B (only kernel_executable_key restored): FAIL at :212 (second.entry == first.entry)
      control C (whole tree at e0e7c8d3): the target does not build (no specialize_workload / launch_program)
      no regressions: hrx-ops-test host 10/10; hrx-backend-test host 95/5 identical to pre-change;
      check_stale_expectations 490/490 selectable

Host-side (this branch)

  • 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 hw_gate/hrx_build runners are still offline (same state #3424/#3407/#3462/#3475/#3477
merged under). Not verified, and why this PR is a pin bump rather than a measured win: the four rebuilt device rows
and the re-pointed rmsnorm/scale/unary/copy rows on gfx1151 (the box was queue-deep for hours), plus #3382's
compile-count / TTFT prompt-length sweep and #3380's fused-route-vs-hip.gemv_wide comparison. Those are recorded on
the issues.

Closes #3389, #3380. Refs #3382 (its measurement stays open).

@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 10:02
…ention-output next-q8 rows re-pointed, and the dynamic-workload specialization restored (llama.cpp#505, #506, #507; engine#3389, #3380, #3382)

llama.cpp#505 (engine#3389): the four packed / mixed-layout rows had stopped requesting a packed copy (their graphs
read Q4_K / Q6_K as stored; #3120 replaced the packed assertion without leaving a row that still made the request).
Rebuilt around shapes that do request it -- one-token Q6_K decode for weight_persistence_sequence, a program pair for
mixed_weight_layout, q6_decode_source_eligibility in place of q4_prefill_source_eligibility -- plus three host-tier
rows (host_weight.packed_decode.q6_k, host_weight.mixed_layout_declined.{q4_k,q6_k}) that fail when a graph stops
asking for the packed rows. Host tier 10 -> 13 passed; a deliberate revert of the packed-layout acceptance fails them.

llama.cpp#506 (engine#3380): the two qwen_decode_attention_output_next_q8 rows were unfusable, not unselected -- their
residual was a graph INPUT (the matcher correctly refuses to fuse an in-place add into caller-owned memory, #95), and
the shipped add-on's hip.gemv_wide (329) claims the projection first and binds the same FA-published q8_1 alternate.
Rows take their residual from a producer as the shipped graph does, assert the measured plan, and are host cases; the
registration comment records the Transient-residual requirement and the 329 matcher.

llama.cpp#507 (engine#3382): f2099e9b7 dropped BOTH halves of c37033e0b's dynamic-workload feature -- the matcher tags
and the runtime (kernel_executable_key() keyed on every workload value again; specialize_workload, the retained launch
program and the per-dispatch launch evaluation were gone). Restored both: Dynamic is answered again for
rmsnorm/scale/unary/copy, one executable is cached across token counts, and the launch program re-evaluates geometry
per dispatch. New host row test-hrx-dynamic-workload (one cache entry for element_count 9216 and 262144, launch program
2 then 4 workgroups, exact path still compile-time geometry) with three controls: only the tags reverted -> FAIL,
only the cache key restored -> FAIL, the whole tree at e0e7c8d3 -> the target does not build. concat_dim0 stays Exact
because the corpus compiles it from ops/copy_f32.loom with row_count as a config.decl -- that needs a corpus change.

Not verified: the gfx1151 device rows (box queue-deep under other lanes' tickets), and the compile-count / TTFT
prompt-length sweep engine#3382 asks for, plus whether #3380's fused route beats hip.gemv_wide + separate add/rms/mul
(moving that registration above 329 needs a Strix Halo measurement). Noted on the issues.

registry/architectures.json is regenerated by scripts/registry-regen.sh (llama.cpp source sha).
@bong-water-water-bong bong-water-water-bong changed the title pins: llama.cpp e0e7c8d3 -> 5fc06ebf, the packed / mixed-layout rows and the attention-output next-q8 rows re-pointed (llama.cpp#505, #506; engine#3389, #3380) pins: llama.cpp e0e7c8d3 -> 6164e5ba, the packed/mixed-layout + attention-output next-q8 rows re-pointed, dynamic-workload specialization restored (llama.cpp#505, #506, #507; engine#3389, #3380, #3382) Nov 24, 2026
@bong-water-water-bong
bong-water-water-bong enabled auto-merge (squash) November 24, 2026 10:20
@bong-water-water-bong
bong-water-water-bong merged commit ad10a17 into main Nov 24, 2026
11 of 13 checks passed
@bong-water-water-bong
bong-water-water-bong deleted the bump-hrx/5fc06ebf branch November 24, 2026 10:24
@github-actions

Copy link
Copy Markdown

PR Reviewer Guide 🔍

Here are some key observations to aid the review process:

🎫 Ticket compliance analysis 🔶

3389 - Partially compliant

Compliant requirements:

  • Rebuilt the test cases to use graphs that request a packed copy
  • Maintained the mixed-layout assertions
  • Re-pointed the rows to the new graph shapes

Non-compliant requirements:

  • None

Requires further human verification:

  • None

3380 - Partially compliant

Compliant requirements:

  • Fixed the residual input issue by ensuring it comes from a producer
  • Updated the test rows to assert the measured plan

Non-compliant requirements:

  • None

Requires further human verification:

  • None

3382 - Partially compliant

Compliant requirements:

  • Restored the Dynamic specialization for the listed operations

Non-compliant requirements:

  • None

Requires further human verification:

  • None
⏱️ Estimated effort to review: 3 🔵🔵🔵⚪⚪
🧪 PR contains tests
🔒 No security concerns identified
⚡ Recommended focus areas for review

Subproject Update

The llama.cpp subproject has been updated from commit e0e7c8d3 to 6164e5ba. This update includes changes related to packed/mixed-layout handling, attention-output next-q8 fusion, and dynamic workload specialization, which are directly tied to the issues addressed in this PR.

Subproject commit 6164e5ba8b3bb7d1fb832cd3cf0730b9535d7ea2

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 3/5

Projects

None yet

1 participant