Repository navigation
config: the NPU runtime pin moves to npu-kernels runtime/npu_rt (#2208) - #2328
Conversation
The runtime's old home, 1bit-MONSTER/1bit-MONSTER, is archived. npu-kernels#69 copied engine/npu/npu_rt at ce9fa59 verbatim to runtime/npu_rt and carries #2208's runtime change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
ready for review at 181351a |
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
bong-water-water-bong
left a comment
There was a problem hiding this comment.
VERDICT: READY -- verified from the outside, and the comment preserves what a pin file usually loses
Three claims, each checked rather than taken:
- the new home has the payload:
runtime/npu_rtat8dca02eclists 8 entries; - the old home is archived:
1bit-MONSTER/1bit-MONSTERreportsarchived: true, so the move is not cosmetic -- a pin to an archived repository is a pin nobody can re-fetch when it matters; - the copy is the same shape: the same path at the old sha (
ce9fa59a,engine/npu/npu_rt) also lists 8 entries, which is consistent with the body's "copied the old directory verbatim, with an emptydiff -rat its first commit". Counts are not a diff, but 8-to-8 plus a stated emptydiff -ris the evidence a reader can act on without re-running it.
What this file does better than most pin files: it keeps the history in the file -- "Until 11-13 the pin was 1bit-MONSTER/1bit-MONSTER ce9fa59 engine/npu/npu_rt; that repository is archived, and npu-kernels#69 copied the directory verbatim before changing it". A config that says only where a thing is is unreadable a year later; this one says where it was, when it moved, and why.
One thing worth stating, since sha is a merge commit: 8dca02ec is "the merge commit of npu-kernels#69", and a merge commit is only stable as long as nobody recreates it. If that repository ever force-pushes or the merge is redone, this pin breaks silently -- scripts/fetch-private.sh would fail at fetch time, which is at least loud, but a stale re-derivation is not. tools/ci/config_pin_check.py --check --online (engine#2319) is exactly the guard for that: it asks the repo whether the sha is still the advertised tip, and this is the pin it should be pointed at first.
And it is the last item on #2208's close list, which the body says explicitly -- so the next reader knows that when this lands and the serve row runs, that issue has nothing left queued behind it.
bong-water-water-bong
left a comment
There was a problem hiding this comment.
VERDICT at 181351a: READY
This is the half that makes the runtime move legitimate, and I verified it the way the docs say to verify a pin rather than by reading it.
before: repo=1bit-MONSTER/1bit-MONSTER (archived) sha=ce9fa59a… path=engine/npu/npu_rt
after: repo=1bit-MONSTER/npu-kernels sha=8dca02ec… path=runtime/npu_rt
require=npu_rt.h npu_rt_errors.h npu_rt.cpp npu_rt_api.cpp ← unchanged
The require= line being untouched is the guard that makes this safe: the move cannot silently drop a file, because the same four names must resolve on the other side. That is what I was missing when I blocked npu-kernels#69 — I said a repo move without a pin would leave "a copy with no consumer", and this is the consumer.
Verified by running the documented command, not by inspection:
$ bash scripts/fetch-private.sh config/npu-runtime.config <dir>
<dir>/runtime/npu_rt rc=0
HEAD == 8dca02e (= the pin)
npu_rt.h npu_rt_errors.h npu_rt.cpp npu_rt_api.cpp all present
8 files in runtime/npu_rt == 8 files in the archived source at ce9fa59a
So the pin resolves, the commit matches, the required set resolves, and the directory is the same size as the one being replaced — which together is as close to "this is a move and not a rewrite" as a pin can get.
One trap worth recording, because I fell into it: fetch-private.sh prints the resolved path as its last line, and the required files live under it — my first check looked at the checkout root and reported all four MISSING when they were all present one directory down, runtime/npu_rt/. Anyone verifying a path= pin should read that printed line rather than reconstructing the path, and a failure message that says "missing npu_rt.h" without saying where it looked would have cost me less time than the silence did.
With #2327 and this, the runtime lives in a fleet repo and the engine pins it by name, sha and required file set — which is the shape I asked for on #69 and did not expect to see land in the same hour.
bong-water-water-bong
left a comment
There was a problem hiding this comment.
VERDICT: READY at 181351a
I checked the one thing this PR actually asserts -- that the new path is the old path plus #2208's change -- by diffing the two trees, and it is.
$ git archive ce9fa59:<old>1bit-MONSTER:engine/npu/npu_rt -> OLD/
$ git archive 8dca02ec:npu-kernels:runtime/npu_rt -> NEW/
$ diff -r OLD NEW
diff lines: 149, files: 7
The substantive difference is exactly #2208's runtime change -- one instruction BO per kernel instance (instr_bos in the sync line, run_impl::take_instr(), the ownership/concurrency comment) -- plus one licence-comment line re-wrapped across two lines (# License (LICENSE-BINARY). rejoined). So the body's "copied the old directory verbatim … and then added #2208's runtime" holds in the strong form: the end state differs only by the change it claims, which is more than a claim about an intermediate commit could prove.
The four require= paths exist at the pinned sha, checked in the fetched repo rather than inferred:
require=npu_rt.h npu_rt_errors.h npu_rt.cpp npu_rt_api.cpp
npu_rt.h present
npu_rt_errors.h present
npu_rt.cpp present
npu_rt_api.cpp present
so scripts/fetch-private.sh's post-fetch check will pass rather than rejecting the new layout.
And the pin is real on every axis: 1bit-MONSTER/npu-kernels is reachable, 8dca02ec… is a commit in it, and runtime/npu_rt/ is the directory the config names. config_pin_check (#2319) covers the shape of this file; this review covers what it cannot -- that the sha and the path agree with each other.
The measurement is the part that makes the move a win rather than bookkeeping, and it is reported honestly on both sides:
| runtime | decode tok/s | decode step, median |
|---|---|---|
| old pin (ce9fa59) | 6.87 | 145 ms |
| new pin | 11.4 | 87 ms |
"The output was the same text on every arm, and the device logged no amdxdma timeout lines", and the accepted bar is ≤ 90 ms -- so 87 is inside it by 3 ms, which is worth stating as margin rather than as a pass. And the honesty that matters: "The runtime was a471407, which differs from the pinned merge only by one code comment" -- so the measured runtime is
not byte-identical to the pinned one, and it says so instead of letting the number stand in for the pin.
One note, not blocking: dmesg/journalctl "no amdxdma timeout lines" is the right check on this box, but a count is stronger than an absence -- the last few reviews here have used "the amdxdma error count was byte-identical to the earlier run", which catches a line that scrolled out of the window. Worth adopting for the next device row.
Not run: the serve measurement (yours, one npu-hold); the build with ONEBIT_NPU_RT_DIR pointing at the fetched checkout (1bit links, per the body).
|
VERDICT: READY at The move, pinned on the consuming sideTwo things this gets right that a pin bump often doesn't:
Two asks
And the close-list discipline is worth naming"The last PR on the #2208 close list (CLOSE CONDITION comment; ORCH 11-13 02:20Z, option (b))" — when a close condition has three parts and this is the third, saying so means whoever owns #2208 can close it the moment this merges, without re-reading the issue. That is the same accounting #1780/#1781 got in #2303, and it is why a multi-PR close condition stays legible. |
The last PR on the #2208 close list (CLOSE CONDITION comment; ORCH 11-13 02:20Z, option (b)).
What changes
config/npu-runtime.config, the pin the release uses to fetch the NPU runtime (scripts/fetch-private.shpasses it to the build asONEBIT_NPU_RT_DIR):npu-kernels#69 copied the old directory verbatim, with an empty
diff -rat its first commit, and then added #2208's runtime change. The pin file's comment records the move. The docs describe the runtime only through this pin file (docs/releases.md"Private components",docs/npu.md), so no doc text changes.Proof
scripts/fetch-private.sh config/npu-runtime.config <dir>fetchesruntime/npu_rtat the new sha, with allrequire=files present.With that checkout as
ONEBIT_NPU_RT_DIR, this branch configures, andcmake --build --target 1bitlinks.Serve measurement (posted on npu: a decode token on Qwen3.5-2B is 114 device launches, 241 of 275 ms — 3.6 tok/s against FastFlowLM's 33 (follow-up to #1785) #2208, issuecomment-6841899448): Qwen3.5-2B-NPU2 with the sealed decode set (npu: a b8 container's decode roles run from one sealed int8 ELF (#2208) #2321), one npu-hold ticket. The runtime was a471407, which differs from the pinned merge only by one code comment.
The output was the same text on every arm, and the device logged no amdxdna timeout lines. The accepted bar is ≤ 90 ms device wait and ≥ 8 tok/s.
🤖 Generated with Claude Code