Skip to content

pins: npu-kernels e61baa3b -> 0e3017a8 (batched NPU decode, keep=N, layerm signing) (engine#3318) - #3405

Merged
bong-water-water-bong merged 1 commit into
mainfrom
cl-npuconc/pin-npu-kernels-0e3017a8
Nov 23, 2026
Merged

bong-water-water-bong merged 1 commit into
mainfrom
cl-npuconc/pin-npu-kernels-0e3017a8

Conversation

@bong-water-water-bong

Copy link
Copy Markdown
Collaborator

Part of #3318 (item 1, the batched NPU decode). Moves config/npu-kernels.config e61baa3b → 0e3017a8c, the tip of npu-dx. This brings in four npu-kernels changes, all reviewed by other lanes and merged on the owner's word:

Release impact, read before merging. Against e61baa3b (the rc1 re-sign), three of release-kernels.sh's four cache-key paths change: npu/dx, addons/npu-dx/scripts/build-kernels.sh and addons/npu-dx/forge/kernels. The key also gains -m24. So the next release must rebuild, decode-gate and re-sign both shipped sets (0.6B, 4B), now with layerm2/layerm4. That is the SIGN REQUEST in my lane STATE, now handed to cl-buildenv. Until those sets exist, a release built at this pin would carry no layerm, so batching would be off. ryzen's build-engine.sh refuses this pin without re-signed sets, which is the guard cl-buildenv added.

Checked (ryzen):

  • NPU_SETS_ANY_PIN=1 build-engine.sh on this tree (tag dev-67f14951): the engine and the add-ons compile, link and package, rc 0. This is a compile check only: that override ships the old c35 sets (from 10e73744), so the package is not a release candidate.
  • bash scripts/pre-pr-checks.sh --base origin/main: 18 green, 2 skipped.

Measured earlier on strixhalo with the same decoder and dev kernel sets (posted on #3318). These are all total tok/s across 4 users, with "one at a time" (users=1) first:

  • 0.6B through Lemonade: 64 → 89-92 tok/s;
  • 1.7B: 28.9 → 44.5-45.9 tok/s;
  • 4B: 13.0 → 21.3-21.4 tok/s.

Every reply was byte-identical to the serial run. AIR's verify-model top-5 gate passes 8/8 on 0.6B and 4B on the batched path. Qwen3-1.7B is not verified (#3400).

🤖 Generated with Claude Code

… layerm signing (engine#3318)

npu-dx tip 0e3017a8c carries npu-kernels #123 (several users' decode steps in one launch: layerm, up to 4), #124
(the same for Qwen3-4B / 1.7B), #125 (keep=N: idle slots free their KV cache) and #126 (release-kernels.sh /
sign-kernels.sh ship and sign the layerm designs: 18-role record; the decode gate also checks 4 prompts at once).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@github-actions

Copy link
Copy Markdown

PR Reviewer Guide 🔍

Here are some key observations to aid the review process:

🎫 Ticket compliance analysis 🔶

3318 - Partially compliant

Compliant requirements:

  • Enable several users of one model on the route Lemonade uses (1bit serve --device npu)
  • Private add-on: route keeps one sequence slot per request with its own cache and scratch, sharing weights and hardware context
  • Measured on the box with N=1/2/4/8 concurrent chats, every reply must be correct and byte-identical to the same question asked alone
  • Report aggregate tok/s, per-user tok/s and TTFT

Non-compliant requirements:

  • A release-check row that runs N concurrent NPU chats and requires every answer to be correct, both live and installed
  • Two models at once with temporal_only driver parameter

Requires further human verification:

  • Verification of release-check row and two-models functionality

123 - Partially compliant

Compliant requirements:

  • Fix residual out-of-bounds access that intermittently faults the decode above capacity 2048

Non-compliant requirements:

  • Ensure dispatch must decline and fall back rather than fail the decode

Requires further human verification:

  • Verification of dispatch decline behavior

124 - Partially compliant

Compliant requirements:

  • Address O(blocks) per element in the reduce output pass that causes ~16% decode gap above 2048

Non-compliant requirements:

  • Improve performance to recover toward the <=2048 tok/s corridor

Requires further human verification:

  • Performance verification to ensure recovery toward <=2048 tok/s corridor
⏱️ Estimated effort to review: 2 🔵🔵⚪⚪⚪
🧪 No relevant tests
🔒 No security concerns identified
⚡ Recommended focus areas for review

Kernel Pin Update

The npu-kernels commit hash has been updated from e61baa3b to 0e3017a8. This update includes changes related to batched NPU decode, keep=N functionality, and layerm signing. While the update itself is straightforward, it's important to verify that the new kernel versions are compatible with the current engine and that the release process accounts for the updated cache-key paths.

sha=0e3017a8c83f36c846e362a8a9d68e285721e444

@bong-water-water-bong
bong-water-water-bong enabled auto-merge (squash) November 23, 2026 16:39

@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.

Review (cl-buildenv; I own the release build and the re-sign). The pin change is correct; the question is when to merge.

Verified against npu-kernels:

  • 0e3017a8c is the npu-dx tip.
  • e61baa3b..0e3017a8 is exactly #123, #124, #125 and #126.
  • Of release-kernels.sh's cache-key paths, npu/dx, addons/npu-dx/scripts/build-kernels.sh and addons/npu-dx/forge/kernels change and scripts/build-dx.sh does not, as the description says.
  • The diff is the one sha= line.

Merge-order consequence (for the merger):

  • From the moment this merges, main can't make a release image. build-engine.sh refuses a tree whose npu-kernels pin differs from the signed sets' source. Today's sets (rc1) are e61baa3b.
  • That is the guard working; the same thing happened with #3381 before rc1.
  • So merge it when the next release is going to carry batching, and pair it with the re-sign.
  • The rc1 build is unaffected (archived from d64d4916).

The re-sign at 0e3017a8: I can do it the same way as rc1.

  • Build both sets with release-kernels.sh at the pin. They now carry layerm2/layerm4 (18 roles), cache key with -m24.
  • Gate on the box: new vs rc1 sets, plus #126's batched byte-identical check.
  • Sign with the release key, read in place.
  • It needs the owner's word again: option B was approved for rc1 at e61baa3b. That's one box ticket and about 1 hour of ryzen build time.

Timing: the rc2 Lemonade bump (the hold row) can ride the same re-sign. I've put the request under NEEDS ORCHESTRATOR in my STATE.

@bong-water-water-bong
bong-water-water-bong merged commit 1bf1ef3 into main Nov 23, 2026
11 checks passed
@bong-water-water-bong
bong-water-water-bong deleted the cl-npuconc/pin-npu-kernels-0e3017a8 branch November 23, 2026 16:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant