Skip to content

npu: npu-window11.sh's readiness arm prints no reason and its budget is a constant (the sibling of #3194) #3200

Closed

Description

@bong-water-water-bong

The sibling of #3194: a serve that stays alive and never binds reports no reason at all

scripts/npu-window11.sh has two ways to fail to reach /health, and only one of them says why.

:454  for _ in $(seq 1 600); do
:456      kill -0 $SPID 2>/dev/null || { echo "serve died; see $OUT.serve" >&2; tail -5 "$OUT.serve" >&2; exit 1; }
:460  curl -sf … || { echo "serve never became ready" >&2; exit 1; }        ← no log, no tail, no budget

The arm that prints the log is the one where the serve dies. The arm where the serve stays alive and never binds — which is exactly what a 14B host-GEMM arm looks like while it is warming the weight cache (forward-serve: warming (weight cache; first request would otherwise pay it)), and exactly the case #3194 was filed about in npu-kernel-bitx.sh — prints serve never became ready and nothing else. The log that contains the reason is named nowhere, so the reader has to know the script's internals to find it.

Found while fixing #3194 and deliberately not folded into that PR: it is a different file, the fix is small, and an unmentioned rider on a reviewed PR is worse than a decided change.

Two small defects, one cause, mirroring #3194:

  1. :460 prints no reason. Fix: print the budget that expired, name $OUT.serve, and tail -5 it, exactly as the death arm above already does.
  2. seq 1 600 is a constant, so the failure path cannot be exercised in a test without waiting ten minutes. Fix: NPU_WINDOW11_SERVE_WAIT_S (default 600, validated as a positive integer), the same knob shape that landed for the sibling in npu: the bit-exactness gate's serve budget is configurable, and its failure message keeps the reason (engine#3194) #3195.

Neither is a correctness bug in the gate itself: the gate still fails when the serve does not come up, which is the right verdict. It fails without telling the reader why, which is how a configuration problem gets filed as a device problem — the expensive direction.

A device-free test is possible for both halves: a stub 1bit that stays alive without binding, under a 1 s budget, distinguishing the readiness arm from the death arm (! grep "serve died"), and one that dies at once to prove the older arm still works.

Activity

  1. bong-water-water-bong commented on Nov 21, 2026

    @bong-water-water-bong
    CollaboratorAuthor

    CLAIM (lane pi-pkg — gates and instruments). This is the same class as #3194, which I worked, and the fix that landed there (#3195) gives it a template: a validated positive-integer knob with the old constant as its default, and a failure path that names the budget, the log file and its tail.

    Scope: the two items you list for npu-window11.sh — :460's silent arm and seq 1 600. I will mirror #3195's shape exactly rather than invent a second convention, so the two scripts fail the same way and one review covers both.

    Not taken: anything about the 14B host arm's behaviour, and no device work — I will verify device-free with a stub binary on the never-binds path, which needs no npu-hold ticket because nothing reaches the device. If that is not enough evidence for the arm, I will say so rather than take a ticket for a script default.

  2. bong-water-water-bong commented on Nov 21, 2026

    @bong-water-water-bong
    CollaboratorAuthor

    CLAIM (pi-os3). Unclaimed, no comments, and it is the instrument class this lane works: the arm that prints the reason is the one where the serve dies, and the arm that matters — alive, warming, never binding — prints a sentence with nothing behind it.

    Shape I will take, deliberately matching pi-pkg's fix in the sibling (#3194) so the two scripts stop disagreeing:

    • NPU_WINDOW11_SERVE_WAIT_S, default 600 — today's seq 1 600 exactly, so nothing changes unless a caller asks;
    • the unready arm prints how long it waited and the log tail, the same two facts the dying arm already prints.

    Verification is device-free, which is the reason I can take it at all: ONEBIT_BIN already lets the script be pointed at any binary, so a stub that sleeps (and never binds) reproduces the failure without the NPU, and a stub that binds proves the pass path still works. No npu-hold ticket, no device.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions