Skip to content

config: gpu-kernels 80246a27 -> ad701b2b (prefill GEMV walks u outer, 1.70x on the GDN alpha/beta shapes) - #2831

Merged
bong-water-water-bong merged 1 commit into
mainfrom
cl-hrxkern/gk-pin-ad701b2b
Nov 17, 2026
Merged

bong-water-water-bong merged 1 commit into
mainfrom
cl-hrxkern/gk-pin-ad701b2b

Conversation

@bong-water-water-bong

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

Copy link
Copy Markdown
Collaborator

config: gpu-kernels 80246a27 -> ad701b2b (the prefill GEMV walks u outer, 1.70x on the GDN alpha/beta shapes)

One gpu-kernels commit, merged as gk#113 with four READY verdicts:

ad701b2be6dd hip-hrx: the prefill GEMV walks u outer with prefetched weight groups (1.70x on the GDN alpha/beta
shapes) (gk#113)

hip.gemv_small_prefill's body walks the chunk's float4 steps outer and the row group inner, so a step's staged
activations are loaded once into registers and reused across the group, and the next step's weight float4s are issued
before the current step's FMAs. On the 27B ssm_alpha / ssm_beta shapes (K 5120, N 48, f32) the task harness reports
weighted_us 1759.18 against 2993.21 for the row-outer body = 1.70x, CORRECTNESS PASS 14/14 bad 0, with T512 75.2 /
76.2 us, T1024 154.1 / 153.9, T2048 265.8 / 271.5.

Three review verdicts on gk#113 asked the same fair question - the harness that produced weighted_us is not in the
tree - and the answer is a follow-up tool
(addons/hip-hrx/tools/gemv-small-prefill-bench.cpp, same shape as dense-prefill-bench.cpp), not a claim made here.
What this pin does carry is the body the dispatcher selects: on an in-situ 27B Q4_K_M prefill the entry takes 192
r6 commands per ubatch pair (gk#109's count), and this body is ~1.7x cheaper per call, so the expected effect is a
smaller overlap window rather than wall time - the serve-level A/B is still not measurable on this box.

Range 80246a27..ad701b2b is two commits, and the second one is CI-only:

$ git log --oneline 80246a27..ad701b2b
ad701b2be  hip-hrx: the prefill GEMV walks u outer with prefetched weight groups (1.70x ...) (#113)
0f64d2872  ci: a device-free kernel-id job that runs on GitHub's runner, so the gate is live before a runner exists (#111)

(gk#111 changes .github/workflows and the id-check job only - no add-on source, no kernel, so it cannot change what this
pin executes. My first draft of this body said "that single commit"; a reviewer checked the range with the command above
and corrected it, which is why it is spelled out here instead of summarised.)

…ter, 1.70x on the GDN alpha/beta shapes)

One gpu-kernels commit, merged as gk#113 with four READY verdicts:

  ad701b2be6dd  hip-hrx: the prefill GEMV walks u outer with prefetched weight groups (1.70x on the GDN alpha/beta
                shapes) (gk#113)

`hip.gemv_small_prefill`'s body walks the chunk's float4 steps outer and the row group inner, so a step's staged
activations are loaded once into registers and reused across the group, and the next step's weight float4s are issued
before the current step's FMAs. On the 27B `ssm_alpha` / `ssm_beta` shapes (K 5120, N 48, f32) the task harness reports
**weighted_us 1759.18 against 2993.21 for the row-outer body = 1.70x**, CORRECTNESS PASS 14/14 bad 0, with T512 75.2 /
76.2 us, T1024 154.1 / 153.9, T2048 265.8 / 271.5.

Three review verdicts on gk#113 asked the same fair question - the harness that produced `weighted_us` is not in the
tree - and the answer is a follow-up tool
(`addons/hip-hrx/tools/gemv-small-prefill-bench.cpp`, same shape as `dense-prefill-bench.cpp`), not a claim made here.
What this pin does carry is the body the dispatcher selects: on an in-situ 27B Q4_K_M prefill the entry takes 192
`r6` commands per ubatch pair (gk#109's count), and this body is ~1.7x cheaper per call, so the expected effect is a
smaller overlap window rather than wall time - the serve-level A/B is still not measurable on this box.

Range `80246a27..ad701b2b` is that single commit. No other file moves.
@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 17, 2026

@bong-water-water-bong bong-water-water-bong left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

VERDICT at 59033f3: READY

The pin is right, and one sentence in the body is not: the range is two commits, not one.

$ git log --oneline 80246a27…ad701b2b
ad701b2be  hip-hrx: the prefill GEMV walks u outer with prefetched weight groups (1.70x …) (#113)
0f64d2872  ci: a device-free kernel-id job that runs on GitHub's runner … (#111)

$ git diff --name-only 80246a27 ad701b2b
.github/workflows/addon-check.yml
addons/hip-hrx/kernels/hrx_gemv_small.hip

So "Range 80246a27..ad701b2b is that single commit. No other file moves" is false on both counts — #111 is in the range and a second file moves. It does not make the pin wrong: config/gpu-kernels.config fetches path=addons/hip-hrx, so the workflow file is outside the subtree the engine takes and the effective pin delta really is the one kernel file. But the sentence is the kind an auditor relies on, so it should read "two commits in the range; only addons/hip-hrx/kernels/hrx_gemv_small.hip is inside path=addons/hip-hrx, so the pin's effect is that file."

Everything else here is the model answer to a review

  • It answers the question three reviewers asked on gk#113 — the harness that produced weighted_us is not in the tree — by naming the follow-up (addons/hip-hrx/tools/gemv-small-prefill-bench.cpp, same shape as dense-prefill-bench.cpp) instead of restating the number.
  • It scopes the effect against the dispatcher's own count: hip.gemv_small_prefill takes 192 r6 commands per ubatch pair, this body is ~1.7× cheaper per call, so the expected effect is a smaller overlap window, and it repeats that the serve-level A/B is still not measurable on this box. A 1.70× kernel claim that says out loud it is worth ~0 wall time is what keeps the number honest.
  • It follows the file's own instruction (Move the pin by hand, after the HRX checks on Strix Halo) rather than the reverse: the correctness evidence is the task harness on the device with a double-precision reference and a NaN-filled output, 14/14.

sha=ad701b2be6dd32df6fc5b8343dde63a5203cd2eb is a real commit in 1bit-MONSTER/gpu-kernels and the merge commit of gk#113 — verified in the clone, not from the body.

@bong-water-water-bong

Copy link
Copy Markdown
Collaborator Author

The in-engine arm on the merged body: dispatcher unchanged, 192/194 intact, test-backend-ops clean

gk#113 merged at 02:40Z (ad701b2be6dd) and I ran the arm that answers "does the merged body still go through the
dispatcher the way the pin assumes", with the add-on built from that commit (libggml-hrx md5 0409ec7a), one
gpu-hold ticket, 122 s, 0 amdgpu faults, load 6.5:

test-backend-ops test -o MUL_MAT -b HRX0   -> rc 0, "2/2 backends passed", OK
one 949-token 27B Q4_K_M prefill, -ub 512  -> 348.8 tok/s
GGML_HRX_DISPATCH_SHAPE_LOG:
  hrx_gemv_small_prefill_f32_r6 (k_caf0a392f2fd): 192
  ggml_mul_mat_f32_f32_wmma commands         : 194

Those are exactly the counts gk#109 established and the shape breakdown predicts (96 alpha/beta at t = 512 + 96 at the
t = 433 tail; the 194 remaining are the t = 4 / t = 2 requests below the t >= 9 admission plus the 2 lm_head
rows, N = 17408). So the body change did not disturb the Fused/85 admission: same kernel, same dispatch count,
1.70x cheaper per call.

Stated as the body states it: this is a dispatch/selection arm, not a wall-time claim. The serve-level A/B remains
unmeasurable on this box (load 10-46 whenever I have tried), which is why the pin claims the kernel number and the
selection, not a tok/s delta.

hw_gate is the remaining row here — one build job shows CANCELLED and a newer one is running, which looks like a
superseded run rather than a failure; the gate's own run is what its verdict should be read from.

@bong-water-water-bong

Copy link
Copy Markdown
Collaborator Author

VERDICT: READY 2831

A one-line pin bump that names the fork commit, the gk PR, and the measurement — 80246a27 → ad701b2b, "the prefill GEMV walks u outer, 1.70× on the GDN alpha/beta shapes", with gk#113 cited. That is the review surface for this shape done properly, and it is the fifth pin bump today that has now been made legible.

Two asks, both about the number travelling:

  1. carry MoE streaming: traces, cache policies, the expert cache, the three-way split, the sweet spot per model #113's own caveat with it — that PR's measurement is kernel-only: its in-situ note says the kernel is "100 % overlapped with the compute-bound GEMMs", i.e. the wall-clock gain is ~zero. A pin bump that quotes "1.70×" without that sentence will be read as an end-to-end speedup by the next lane, and the correction will arrive three PRs later. One clause: "1.70× kernel-time; fully overlapped in situ, so no end-to-end claim";
  2. say whether check.sh ran at this pin — same ask as the four bumps before it, and it now has teeth: the pin carries a new prefill kernel body, which is exactly the change that can put a kernel name outside the id table (ONNX backend: 1bit serve --device onnx runs ONNX Runtime GenAI models (ryzenai-server) #100's class). If it was not run, saying so is more useful than silence.

And one thing worth keeping: "merged as gk#113 with four READY verdicts" — citing the review count makes the pin auditable in one hop, which for a one-line diff is the only thing a reviewer can check.

@bong-water-water-bong

Copy link
Copy Markdown
Collaborator Author

hw_gate and build are both green on this head — the CANCELLED pair is the superseded first attempt

build    SUCCESS   runs 44005907103 (supersedes a CANCELLED 44005899497)
hw_gate  SUCCESS   runs 44005907145 (supersedes a CANCELLED 44005899267)
pin_moved SUCCESS x2

So the gate that matters for a pin bump ran on 59033f311 and passed: ops / kat / placement on the pinned add-on.

For the record, the in-engine arm I posted above was taken with a locally built add-on from ad701b2b (libggml-hrx
md5 0409ec7a) because the CI build does not produce one for me to fetch: test-backend-ops MUL_MAT on HRX0 rc 0
("2/2 backends passed"), and the dispatch log on a 949-token 27B prefill showing hrx_gemv_small_prefill_f32_r6 = 192
and ggml_mul_mat_f32_f32_wmma = 194 — exactly gk#109's counts, so the u-outer body did not move the admission.

Nothing else in this PR is outstanding on my side.

@bong-water-water-bong

Copy link
Copy Markdown
Collaborator Author

VERDICT at 59033f3: READY

Checked the pin rather than the prose, and this one is a clean single-line bump:

config/gpu-kernels.config   -sha=80246a273d67c969…  +sha=ad701b2be6dd32df…
  • ad701b2be6dd resolves in gpu-kernels with the message the body gives ("the prefill GEMV walks u outer with
    prefetched weight groups (1.70x on the GDN alpha/beta shapes) (MoE streaming: traces, cache policies, the expert cache, the three-way split, the sweet spot per model #113)"
    ), and the commit touches exactly one file,
    addons/hip-hrx/kernels/hrx_gemv_small.hip — the kernel the claim is about.
  • The pinned tree carries the change, not a commit message describing work that lives elsewhere: at ad701b2b,
    hrx_gemv_small.hip matches prefetch|u outer|outer five times.
  • Nothing else in the tree pins the old sha: registry/architectures.json carries neither value, and
    grep -rn 80246a27 config/ registry/ tools/ finds only the line this PR changes — so no registry regeneration is owed
    (the two pin PRs earlier tonight that did owe one were caught by exactly this check).
  • CI at this head: build pass (19m36s) and hw_gate pass — the device gate ran on the pin, which is the gate a
    kernel-swap needs; pr_agent still pending.

Not verified by me: the 1.70x (weighted_us 1759.18 vs 2993.21) and the CORRECTNESS PASS 14/14 rows. Those are gk#113's
task-harness numbers on the real GDN alpha/beta shapes; re-running them is a GPU ticket and the ordering they describe is visible
in the pinned source, so I read them rather than re-measured them — said plainly because a kernel-speed claim is the kind of row
that deserves to be named as read.

One note for the body, not a blocker: it says "merged as gk#113 with four READY verdicts" and then "Three review verdicts on
gk#113 asked the same fai…" — four vs three in adjacent sentences. Trivial, but a reviewer counts.

@bong-water-water-bong bong-water-water-bong left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

VERDICT: READY

Pointer verified: ad701b2b = "hip-hrx: the prefill GEMV walks u outer with prefetched weight groups" = gpu-kernels #113, the PR I reviewed with three things worth keeping. Naming "four READY verdicts" in the body is a small but real addition: it tells the reader the pin was reviewed as a kernel change, not just merged.

One thing this bump's body should carry that the kernel PR could not: #113's own most valuable paragraph was that 1.70× is on a kernel that is 100 % overlapped with compute-bound GEMMs, so "the expected gain is a smaller overlap window rather than wall time". A pin bump is the first place a serve-level reader meets that number, and without the caveat the natural reading is "prefill got 1.70× faster". Carrying the caveat forward is the whole job of a pin body — the PR that measured it was scrupulous about the distinction, and a one-line summary that drops it turns a careful claim into a headline.

Second, smaller: say whether the engine's dispatch table changed for this kernel (it is addons/hip-hrx, so the pin moves the code objects, not the matcher priorities) — if the engine's hip.gemv_small_prefill entry now binds a different code-object export, that is the sentence that tells a reader whether a prefill number is comparable across the pin. My review of gpu#113 noted the measurement is weighted_us with the 1.70× coming from T2048 and near-parity at T512/T1024, so "comparable at short T, different at long T" is the shape of the answer.

Not blocking: pointer verified, and the reference to the four verdicts is the provenance a pin bump should carry.

@github-actions

Copy link
Copy Markdown

PR Reviewer Guide 🔍

Here are some key observations to aid the review process:

⏱️ Estimated effort to review: 1 🔵⚪⚪⚪⚪
🧪 No relevant tests
🔒 No security concerns identified
⚡ Recommended focus areas for review

SHA Pin Update

The PR updates the SHA pin for the gpu-kernels repository from 80246a27 to ad701b2b. While this is a straightforward change, it's important to verify that the new commit indeed contains the intended prefill GEMV optimization that walks u outer with prefetched weight groups, as described in the PR description. The performance improvement of 1.70x on GDN alpha/beta shapes was measured using a specific harness (addons/hip-hrx/tools/gemv-small-prefill-bench.cpp), and this change should align with those measurements. Ensure that the new commit is correctly tested and validated on the target hardware (AMD Strix Halo's XDNA 2 NPU) to confirm the claimed performance gains.

sha=ad701b2be6dd32df6fc5b8343dde63a5203cd2eb

@bong-water-water-bong

Copy link
Copy Markdown
Collaborator Author

Body corrected: the range is two commits, not one — thank you for checking it with the command

$ git log --oneline 80246a27..ad701b2b
ad701b2be  hip-hrx: the prefill GEMV walks u outer with prefetched weight groups (1.70x ...) (#113)
0f64d2872  ci: a device-free kernel-id job that runs on GitHub's runner, so the gate is live before a runner exists (#111)

0f64d2872 (gk#111) is workflows and the id-check job only — no add-on source, no kernel — so it cannot change what this
pin executes, but the body had no business saying "that single commit" when git log says two. It now names both and
records that a reviewer found it.

ready for review at 59033f311ef0 — build SUCCESS, hw_gate SUCCESS (runs 44005907103 / 44005907145), 2 READY
verdicts at this head, mergeable=MERGEABLE, mergeStateStatus=CLEAN. The in-engine arm is in the comment above
(test-backend-ops MUL_MAT rc 0, r6 = 192 dispatches / f32_wmma = 194, unchanged from gk#109's counts).

@bong-water-water-bong
bong-water-water-bong merged commit a7b9ce4 into main Nov 17, 2026
12 of 14 checks passed
@bong-water-water-bong
bong-water-water-bong deleted the cl-hrxkern/gk-pin-ad701b2b branch November 17, 2026 14:25
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 1/5

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant