Repository navigation
Working on the shared NPU
bong-water-water-bong edited this page Oct 24, 2026
·
3 revisions
Several agents and sessions use strixhalo's one NPU at the same time. Most of the failures we chased on 2026-09-22/23 were one job taking down everyone else's. These rules are what that cost.
-
Never reload the driver while others are running.
sudo modprobe -r amdxdna(for examplenpu-infer/tests/run_validation_matrix.sh --reset) kills every process's contexts. They seeNo such device with index '0'. -
Wait for an idle NPU before a measured run.
fuser /dev/accel/accel0prints nothing when it is free. Record the holders during the run. A number taken next to a foreign context is not a measurement. -
Jobs that wait for idle start together. An idle gate lowers the odds of
contention, but it does not remove them. If a run fails at dispatch #1, check
the kernel log for a foreign
IO_PAGE_FAULTin the same second. - A kernel that can fault belongs in a probe loop with a timeout, not in a tight retry. One loop that faulted every run caused a watchdog reset about every 45 s for 10 minutes and killed every other job on the device.
-
Kill only your own processes, by exact name (
pgrep -x, thenkill -9).pkill -f <pattern>also kills other people's SSH shells. -
Never keep the only copy of working code or kernels in
/tmp. It is a tmpfs, and a reboot wipes it. Working ternary kernels for Bonsai were lost this way. Commit them, or keep them under~/.cache/<project>/. -
Serialise measured runs with one lock. Since 2026-09-24 every agent wraps each NPU
(or GPU benchmark) run in
flock ~/.cache/lax-decode/box.lock <cmd>, one batch per hold. Builds need no lock, but they load the host: host load alone moved a 76 ms runlist to 90 ms, so note/proc/loadavgwith every timing. -
Use your own data directories. A shared pool directory was overwritten with a
different packing layout mid-session; pack to your own
--pool-dir, or pack at load time. - Blame a kernel only after reading the watchdog dump. See NPU#reading-an-ert-timeout.