Repository navigation
weekly: ship the sealed NPU kernels by default; launcher requires sealed kernels (rebased on main) - #509
Merged
Conversation
…res sealed kernels - scripts/weekly.sh: WEEKLY_NPU_KERNELS defaults to 1 (the npu gate phase passed on Strix Halo: oracle/greedy64/prefill/reproducible PASS, 90.33 tok/s against a 60 floor, release build, embedded key). WEEKLY_NPU_KERNELS=0 builds a package without them. - scripts/lemond-onebit.sh: exports ONEBIT_KCRYPT_REQUIRE_SEALED=1 unconditionally, no opt-out; the release 1bit refuses plain kernel sets on its own as well. - package_checks: with the kernels on, the engine tarball must carry the three sets (Qwen3-0.6B, 1.7B, 4B); lemonade_package_checks: lemond-onebit must export the variable. Unit-checked on synthetic packages (3 sets ok / 1 set FAIL; export ok / missing FAIL). - config/npu-kernels.config: npu-kernels npu/kernel-cache-key (#15, kernel cache keyed by kernel inputs); moves to #15's merge commit once it lands. - docs/releases.md: the release carries the kernels. Co-Authored-By: Claude Fable 5.1 <[email protected]> (cherry picked from commit 4e778cd)
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
This was referenced Nov 24, 2026
bong-water-water-bong
added a commit
that referenced
this pull request
Nov 24, 2026
…s the requested value's rows, and the mixed-layout row reads its own import (llama.cpp#508, #509; engine#3380, #3389) (#3487) Two device regressions found by the first device-tier run at the pin 6164e5ba (the self-hosted gate has been offline since the 1bit OS reinstall, so this run was made by hand): add-on hrx-ops-test was 407 pass / 3 fail / 1 known-fail. llama.cpp#508 (engine#3380): find_alternate_value's Q8_1 comparator required BOTH values' ne[0] to be 128-aligned. The split-FA output publishes its alternate for [64,32,1] and the consumer reads reshape_2d(..., 2048, tokens) -- a pure ordered range over the same bytes, but the source's ne[0]=64 -- so the fallback refused it and the q8 publish had no alternate (q8_alternate == nullptr on ...query1.kv512.masked.head96.value64; the 4-query row failed the plan-size assert first). At head size 128 the source ne[0]=128 and the same lookup passed, which is why only head96/value64 broke. The row width that matters is the requested value's, which is 128-aligned. A plain revert of #503 fixes it but reopens engine#3383, so this is a targeted comparator change; the two rows also become host cases (they never open a device and reproduce cpp:5440/5420 on a host). llama.cpp#509 (engine#3389): mixed_weight_layout_program.q4_k/q6_k compared a ValueId from imported_mixed.graph against bindings of the decode program's SEPARATE import. Ids do not align across imports; the collision it matched was the 2048-float activation (binding length 8192 vs the weight's 215040 bytes). No product path broke and no expectation is re-baselined -- the row now reads the decode program's own weight value. Device evidence (strixhalo gfx1151, root, one box-hold both ticket, runtime libs from the pin's package): before: 23-Nov staged build PASS/PASS on the two FA rows; pin 6164e5ba FAIL/FAIL (and a fresh rebuild at the pin reproduced it, so the staging was not the cause) #508 alone: both FA rows PASS; full add-on suite 409 passed / 1 failed / 1 known-fail (the 1 being #3389's row) #509 alone: both mixed rows PASS on add-on AND no-add-on; full add-on 408 passed / 2 failed / 1 known-fail (the 2 FA) host control: 0/2 at 6164e5ba, 17/17 with #508; revert of #503 alone -> rows PASS but #503's host row fails registry/architectures.json is regenerated by scripts/registry-regen.sh (llama.cpp source sha). A combined #508+#509 full device run was not made; the two per-PR runs are above. #3483's compile-count/TTFT sweep (its item 3) remains unmeasured. Co-authored-by: bong-water-water-bong <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Replacement for #508, which was opened from
npu/weekly-npu-onand is CONFLICTING — that branch predates #505, soscripts/weekly.shclashed where #505 added the exact-allowlist leak scan. Rather than force-push someone else's branch, this is4e778cdcherry-picked onto currentmain(f90d041d) with the conflict resolved, opened from my own branch.The conflict resolution
#505and this change both touch the NPU block ofpackage_checks. Both are kept:WEEKLY_NPU_KERNELS=1now the default, and the artifact must carry at least 3layout.jsonsets;#505's exact-allowlist scan — every file undernpu/kernelsmust belayout.jsonorlayer1_*/layer1.elfand must be sealed, naming any leaked path.Nothing is dropped from either side;
bash -npasses.What it turns on
scripts/weekly.sh:WEEKLY_NPU_KERNELSdefaults to 1, so the weekly build runs the privaterelease-kernels.shinto$BUILD/npu/kernelsand passes-DONEBIT_NPU_PRIVATE/-DONEBIT_NPU_RELEASE=ON— the shipped binary loads sealed kernels only.scripts/lemond-onebit.sh: the packaged launcher always exportsONEBIT_KCRYPT_REQUIRE_SEALED=1, so it refuses plain kernel sets.config/npu-kernels.config,docs/releases.md: pin and wording.Why it matters
Merged main still has
WEEKLY_NPU_KERNELS:-0: the weekly artifact would carry no NPU kernels and the launcher would not require sealing, so #503's closed delivery exists but nothing in the release path uses it.Verification
Run from this branch's tree (not a proxy):
weekly.sh <workdir> packagewith node/npm on PATH andWEEKLY_TAG=v2026.43, so the engine tarball is the weekly-named artifact1bit-v2026.43-linux-x86_64.tar.zst, produced with the merged producer and the merged packaging code, and checked bypackage_checks. Log:~/wt/npupkg-wrun/logs/package-checks.log.Verified: the real weekly artifact, weekly-named, all checks green
weekly.sh <workdir> packagerun from this branch's tree (node/npm on PATH,WEEKLY_TAG=v2026.43) with the mergedproducer (#15/#16) and the merged packaging code (#505):
~/wt/npupkg-wrun/engine-pkg/1bit-v2026.43-linux-x86_64.tar.zst(37.8 MB)~/wt/npupkg-wrun/logs/package-checks.log— 9/9 ok, including the checks that matter here:All three NPU sets travel as
layout.json+layer1_*/layer1.elfonly (33 files = 3 + 30, every ELF sealed), and thepresence check this branch adds (
>= 3 sets when WEEKLY_NPU_KERNELS=1) passes alongside #505's exact-allowlist scan.One build-tree repair was needed to get there and is not a code change:
libhrx.so.0andlibloomc.so.0sit deep inthe build tree where
lddcannot resolve them, sopack_localizenever learned to copy them and the first weekly runfailed at
every library is packed. Placed beside the HRX binaries (where a normal build has them), after which lddresolves both and the check passes.
The stage also produced the Lemonade + onebit package, and it passes too
lemonade-onebit-v2026.43-linux-x86_64.tar.zst(44.7 MB) carries 67 files undernpu/kernelsand a sampledlayer1.elfbegins1BPKCRYP— sealed, not plaintext. That last line is this PR's launcher change being enforced onthe real artifact, not just in a unit test. (The stage then continues to the 1bit OS image, a separate artifact.)