Repository navigation
serve: say when a build links no private NPU route (engine#3193) - #3236
Conversation
…forward is chosen (engine#3193) engine#3193 measured `1bit serve --device npu` on FastFlowLM/Qwen3-0.6B-NPU2 through Lemonade with a binary configured without -DONEBIT_NPU_PRIVATE. Such a build serves the pack on the per-op forward, which a release build (scripts/weekly.sh links the add-on) does not do for this pack. The log said "serving it through the per-op forward" and nothing about the build, so the number was read as the shipped path's. The load log now adds one line naming the missing add-on when no private route is linked. Behaviour is unchanged. Checked: one npu-hold ticket (srcversion 5682285F370899D14A057FF, 0 new IO_PAGE_FAULT/TDR), `1bit serve -m <FastFlowLM/Qwen3-0.6B-NPU2 snapshot> --device npu` with two builds of this commit: configured without the add-on it serves on the per-op forward and prints the new line; with the add-on it takes the private route and does not. Both answer "The capital of France is **Paris**". Co-Authored-By: Claude Opus 5.5 <[email protected]>
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
|
VERDICT at ecb137d: READY — the line prints only where the release build would take a private route, and I checked the two ways this could have been wrong rather than taking the body's word. What I verified in the tree
Two notes, neither an ask
Nothing else: one file, one branch, no control flow moved. |
bong-water-water-bong
left a comment
There was a problem hiding this comment.
VERDICT at ecb137d: READY
The change is right and small: 8 lines in the per-op-forward branch, gated on npu::private_routes_available() (which already exists at npu/private_route.cpp:110 and is exercised by npu_private_route), no behaviour touched, and the ledger it fixes is the one engine#3193 is about — a build without the add-on measured as if it were the release. merge-tree origin/main rc 0.
Two notes, both about the same thing and both cheap, because a message whose whole purpose is "do this to get the route" should not send an operator two different ways:
-
Our two messages now point at different documentation, and the older one points at a section that does not exist. The new line says
docs/releases.md "Private components"— which is real (docs/releases.md:418). The existingprivate_route_missing()(npu/private_route.cpp:104) saysdocs/npu.md, "Private routes", anddocs/npu.mdhas no such section: the docs call it "add-on routes" (docs/npu.md#add-on-routes, cited that way bydocs/serve.md:452anddocs/PORTING.md:28). So the same operator, hitting two different paths in the same binary, is sent to one good pointer and one broken one. Worth aligning them here, since this PR is the one touching the operator-facing text. -
The flag is spelled
-DONEBIT_NPU_PRIVATEhere and-DONEBIT_NPU_PRIVATE=<add-on checkout>everywhere else.CMakeLists.txt:3204isset(ONEBIT_NPU_PRIVATE "" CACHE PATH …)and:3209fatals with "has no addons/CMakeLists.txt" when it is set to something that is not a checkout — so a bare-DONEBIT_NPU_PRIVATEis either empty (a no-op that leaves the operator exactly where they started) or, if they pass=ON, aFATAL_ERROR. Every doc line that shows the flag shows a value (docs/npu.md:3855,docs/laya.md:268,docs/hybrid.md:26). Copy-pasting the new message's spelling gets a build that still has no private route, and the next measurement would be misread the same way this PR is fixing.
Neither blocks: the log line is the fix and it works. If you would rather not touch the second message in this PR, then a sentence in the body saying the two pointers are deliberately different is enough for a reviewer to accept it knowingly — I would just not leave the "Private routes" pointer unmentioned, since that one is already wrong on main.
A build configured without
-DONEBIT_NPU_PRIVATEserves FastFlowLM's Qwen3 packs on the per-op forward, while release builds serve them on the private route. The load log only said "serving it through the per-op forward", so a measurement of such a build was read as the release path's (engine#3193). When no private route is linked, serve now prints one more line naming the missing configure option; behaviour is unchanged.Checked on the NPU with two builds of this commit: without the add-on the line prints, with it the private route is taken and the line does not print. Both answer the same.
🤖 Generated with Claude Code