Skip to content

weekly: ship the sealed NPU kernels by default; launcher requires sealed kernels - #508

Closed
bong-water-water-bong wants to merge 1 commit into
mainfrom
npu/weekly-npu-on
Closed

bong-water-water-bong wants to merge 1 commit into
mainfrom
npu/weekly-npu-on

Conversation

@bong-water-water-bong

Copy link
Copy Markdown
Collaborator

The release path that consumes the sealed NPU kernel sets was written but never opened as a PR. This is that PR — no code changes made by me; the branch is taken as-is.

What it turns on

  • scripts/weekly.sh: WEEKLY_NPU_KERNELS now defaults to 1, so the weekly build calls the private checkout's release-kernels.sh into $BUILD/npu/kernels, seals the sets and passes -DONEBIT_NPU_PRIVATE / -DONEBIT_NPU_RELEASE=ON — i.e. the shipped binary loads sealed kernels only.
  • scripts/lemond-onebit.sh: the launcher now always exports ONEBIT_KCRYPT_REQUIRE_SEALED=1, so a packaged Lemonade backend refuses plain kernel sets instead of accepting them.
  • config/npu-kernels.config, docs/releases.md: pin/wording follow-up.

Why it matters

Without this, merged main still has WEEKLY_NPU_KERNELS:-0, so the weekly artifact carries no NPU kernels at all and the launcher does not require sealing — the closed-source delivery (#503) exists but nothing in the release path uses it.

Interaction with what already landed

#505 (merged, f90d041d) already makes the packaging side correct — the allowlist staging, pack_is_dynelf and the package_checks leak scan — so this branch no longer has to carry any of that; it only flips the release path on and hardens the launcher. npu-kernels #15/#16 (merged, 8d93d89d) make the producer emit clean sealed sets.

Verified on strixhalo with the merged packaging code, WEEKLY_NPU_KERNELS=1 and the merged producer: three clean sealed sets (11 files each = layout.json + 10 layer1.elf, 10/10 sealed, zero layer1.work/.mlir/.o), and a package whose package_checks returns rc=0 on every line, including NPU kernels: 33 files under npu/kernels, all sealed, no private source, host-only ELFs, and no symbol table or build-machine paths in the packed 1bit.

…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 <noreply@anthropic.com>
@bong-water-water-bong

Copy link
Copy Markdown
Collaborator Author

Superseded by #509: this branch predates #505 and conflicts on scripts/weekly.sh where #505 added the exact-allowlist leak scan. #509 is the same commit cherry-picked onto current main with both changes kept (the presence check and the allowlist scan). Closing rather than force-pushing your branch.

@bong-water-water-bong
bong-water-water-bong deleted the npu/weekly-npu-on branch October 23, 2026 11:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant