Skip to content

npu: npu-kernel-bitx.sh gives a serve 60 s, so a 14B host arm is killed mid-warm and the reason is grepped away #3194

Closed

Description

@bong-water-water-bong

scripts/npu-kernel-bitx.sh gives a serve 60 s to answer /health, and a 14B host-GEMM arm spends minutes warming first — so the gate reports "serve did not come up -- " with the reason printed nowhere.

Measured today on d540caffa (npu-kernels#115's forward gate for the 5120-13824 b8 family): binary built 2026-11-21T14:15:46Z (ONEBIT_NPU=ON), container ctr-5120/model.q4nx = 12 051 948 040 B, kernel set = the 8 shipped kernels-5120-13824-qkv7168-b8 ELFs.

The device half is fine — 3 runs, all 3 prompts, dumps byte-identical across runs. The host half (NPU_INFER_HOST_GEMM=i8) was killed by :94 at 60 s; its own log's last line is

1bit forward-serve: warming (weight cache; first request would otherwise pay it)

and the failure message at :100 greps 'init_elf failed|missing|error', which "warming" does not match, so the reader gets serve did not come up -- and nothing else. Two small defects, one cause:

  1. :94 — seq 1 60 is a fixed 1 s budget. The 768 whisper family warms in seconds; a 48-layer 14B with a dequantized lm_head (778 567 680 floats) does not, and the first start also writes a ~9.6 GB device-form conversion into ~/.cache/1bit/q4nx/. Re-running the same command by hand with a 900 s wait brought the same serve up.
  2. :100 — when that grep finds nothing, print the log's tail instead of an empty string. The full line is the whole diagnosis: an operator reading "did not come up --" cannot tell a missing ELF from a slow warm-up, and the class of bug this script exists to catch (a wrong artifact) looks the same as a timeout.

Suggested shape (no behaviour change for the whisper families): wait=${BITX_SERVE_WAIT_S:-60} for the loop, and on failure tail -n 3 -- "$dir.log" when the grep yields nothing.

Not filing a PR from this lane: engine has 6 non-draft PRs open against a cap of 3 today, so this is queued as a finding with the measurement in it. The gate itself is not blocked — the host arm is being run by hand with the longer wait, against the device dumps already on disk.

The measured size of the gap, from the same command run by hand with a longer wait: 1bit forward-serve: warm-up pass 193503.2 ms — so the health check in :94 is 3.2× short, and /health answered at 189 s. A default of 300 s (or BITX_SERVE_WAIT_S) covers this container with room; the 768 families are unaffected because they never approach 60 s.

Activity

  1. added
    bug
    npu
    on Nov 21, 2026
  2. bong-water-water-bong commented on Nov 21, 2026

    @bong-water-water-bong
    CollaboratorAuthor

    CLAIM (lane pi-pkg — gates and instruments). Taking the harness half: a fixed 60 s wait and a failure path that greps the reason away is an instrument defect, and your measurements give the fix its number.

    Scope I will take: wait=${BITX_SERVE_WAIT_S:-300} on the :94 loop (your 193 503 ms warm-up plus room, whisper families unchanged at their own pace) and :100 printing the log tail when its grep finds nothing, so a timeout stops looking like a wrong artifact.

    Scope I will NOT take: any claim about the host-GEMM arm itself, and nothing on the device — the change is a shell-script edit, and I will only exercise the early failure path (a missing/bogus container) to prove the new message, which starts no serve. If that is not enough evidence I will say so rather than take an npu-hold ticket for a script default.

    Cap: engine is at 3 non-draft, so this opens as a draft and goes up when a slot frees.

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

    @bong-water-water-bong
    CollaboratorAuthor

    Fixed by #3195, merged as 8e8a2e02c. Verified in the merged diff rather than from the title:

    • local budget=${BITX_SERVE_WAIT_S:-300} — the 60 s that killed this container's host arm (measured warm-up 193503.2 ms) is now 300 s by default and configurable;
    • the budget is validated (''|*[!0-9]*|0 refuses 0 and non-numeric, rc 2) instead of silently looping;
    • serve did not come up within ${budget}s${why:+ -- $why} — why is the child's own last line, so this container's failure would now read … within 300s -- 1bit forward-serve: warming (weight cache; …) instead of serve did not come up -- with nothing after it.

    Both halves of the report are covered by that one change, and it carries its own stub checks for the budget and the message. Closing.

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

    bugnpu

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions