Skip to content

ANE: H14 program lifetime - #737

Merged
RyanTheTide merged 8 commits into
aurora-wipfrom
ane/h14-fw-alloc-lifetime
Nov 1, 2026
Merged

RyanTheTide merged 8 commits into
aurora-wipfrom
ane/h14-fw-alloc-lifetime

Conversation

@RyanTheTide

@RyanTheTide RyanTheTide commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

H14 (M2, T8112) program lifetime. Before this PR the driver never gave a program or process back to the firmware. Every process holds one 2 MiB firmware allocation, and a LOAD sent with eight processes resident never completes, so about eight programs could be loaded per boot and then BO_INIT failed until reboot.

The first M2 run of this PR (comment below) showed that unloading on close works for single-task programs and halts the firmware for multi-task ones. The firmware facts since then: TERMINATE_PROCESS waits for its own flush with no timeout, no host step is missing, and no command frees such a process. A cold firmware restart is the only way to reclaim it, and the ASC must be proven stopped (CPU_STATUS bit 1) before power removal. On T8112 0x2c is idle and 0x28 halted, neither is stopped.

Commits

  1. accel/ane: restart owned H14 firmware after a command timeout (carried from accel/ane: add bounded timeout recovery for H13 and owned H14 #692).

  2. accel/ane: free H14 firmware allocations and unload programs on close. Per-file program references, SHAREDMALLOC FREE answered, unload commands, debugfs fw_memory.

  3. accel/ane: H14 program lifetime without multi-task terminate.

    • A program is single-task only when its TD property section (load id 7) and TD stream (load id 3) both count one task. Anything else counts as multi-task, and a multi-task process is never terminated. On the M2 test assets this marks exactly the programs that wedged TERMINATE in the first run.
    • At last close a single-task program (or one without a process) is unloaded. A multi-task program stays resident as a cache entry, and the next load of the same bytes reuses it with no command.
    • At most eight programs are resident. Before each LOAD the driver unloads single-task programs (unreferenced first, then least recently used). When only multi-task processes are left it restarts the firmware at that idle point.
    • Programs keep their kernel IDs, section references and LOAD records while a file holds them. After an eviction or a restart the next PROC_CREATE or EXEC loads them again and creates the process. Clients see no change.
    • The restart is one state machine for both cases. Planned: answer pending SHAREDMALLOC requests, post POWER_DOWN (0x0b), wait for WFI, clear CPU_CONTROL RUN, require STOPPED with RUN clear (details in commit 4). After a command timeout only the RUN clear is tried. Without STOPPED nothing is powered off and the device stays quarantined (fail closed). This replaces the stop wait of commit 1, which could never succeed on T8112.
    • fw_memory also shows resident, cached and single-task programs, the limit, the restarts and the firmware generation.
  4. accel/ane: post H14 POWER_DOWN without waiting for a completion. POWER_DOWN is the 8-byte header only and never completes (the firmware ends in WFI). The driver marks the completion field, waits for the dispatcher to clear it, then requires IDLE on twenty reads 100 us apart before the RUN clear. STOP (0x01) is not sent: it runs the same no-timeout flush that never returns after a multi-task call. The limit of eight is documented as the firmware's 8-buffer L2 spill pool plus the observed LOAD hang, not a table ceiling (240 programs and 496 processes advertised).

  5. accel/ane: refuse H14 programs with malformed first/last task flags. The hardware run below found the real trigger of the "multi-task TERMINATE wedge": a compiler bug wrote 0x2a (first and last task) in header word 2 of every task of a multi-task layer, where all 1503 decoded Apple H14 programs use 0x08 on the first, 0 between and 0x22 on the last. Such a program's call returns and then the firmware never completes another command, with this driver and the stock one. The driver now refuses those programs at LOAD with -EINVAL. Compiler fix: aurora-silicon/mil-hwx-compiler PR arm64: apple: describe J700 CPU, power and storage topology #16.

  6. accel/ane: unload every H14 program at last close. With malformed programs refused, TERMINATE and DESTROY complete on the M2 for processes of 2, 4, 8, 10 and 45 tasks, so the never-terminate rule and its task count are gone. Room for a LOAD comes from unloading the least recently used program a file still holds (it loads again on next use). The firmware restart is left for the case where every resident program is HELD.

  7. accel/ane: stop and restart H14 firmware across system sleep, and 8. clarify PM phases and describe the sleep tests (from the system-sleep lane, reviewed and taken in unchanged). System suspend fences submitters under the firmware mutex and runs the same planned stop as the restart for room (POWER_DOWN, WFI, RUN clear, STOPPED proven); if STOPPED is not proven the suspend is refused and nothing is powered off. Resume checks the ASC is still stopped, cold-boots the firmware with the same boot and handshake, and the programs files hold reload on next use with their IDs.

Checks

  • KUnit x86_64 QEMU with KASAN and UBSAN: 72 tests, 69 pass. ane-t6021-lifetime 16/16, ane-h14-sleep 5/5, ane-pm-recovery 6/6 (task count parsers, never-terminate rule, cache reuse, budget and eviction order, reload with stable IDs after a restart, a thirty-program sequence that never exceeds the budget, restart stop ordering). The 3 failures are the ane-h16-hwx forms, tensor and snapshot cases, which fail the same way on the base.
  • arm64 LLVM W=1 external build against the 7.3.0-aurora-fleet14b tree is clean. checkpatch --strict on the new commit is clean.

Open items

  • The POWER_DOWN, WFI, STOPPED transition was measured on T8112 (CPU_STATUS 0x2e after RUN clear, on every restart). A restart after a command timeout still cannot prove STOPPED (0x2c) and fails closed.
  • A quarantined (wedged) ANE refuses system suspend, because its core cannot be proven stopped before power removal. Resume adds about 1.2 s for the cold boot.
  • Section BOs stay mapped writable by the client that supplied them, as before this PR. The flag check reads the same snapshot as the cache key.

Hardware: see the comments. Commits 1 to 5 passed on the M2 (second run). A check of commits 6 to 8 (including three platform suspend cycles) is booked; merge after it passes. Keep draft until then.

🤖 Generated with Claude Code

Fence commands and buffer creation, stop only the Linux-owned ASC CPU,
and power-cycle every domain through the same runtime-PM transaction.
Verify the physical PMGR states and repeat the probe access gates before
restoring the cached pristine image and the existing fenced boot flow.
Require READY/DONE, ChMan validation, host ACK and CONFIG_GET before
accepting work again. Unsupported ownership profiles remain quarantined.

Retain metadata for closed firmware-visible BOs and old boot/MALLOC
arenas. Reclaim old resources only after validated restart; charge
retired arenas to the existing limits and bound failed-boot retention.
Release the old CPU pin only after quiescence and acquire its replacement
before any boot write. The existing domain-link lifetime pin remains.

Use opaque kernel program/process IDs, independent of reused firmware
wire IDs. Invalidate the cache across restart without resetting the
allocator, so clients reload rather than executing a stale identifier.
Add KUnit non-reuse/exhaustion checks and matching reset diagnostics.

Carried onto aurora-wip 9ed109d. The conflicts were the include list,
the client struct and the wire IDs in the procedure call.

Assisted-by: LLM
Signed-off-by: Ryan Murray <[email protected]>
The H14 firmware never got a program back. Every LOAD_PROGRAM and
CREATE_PROCESS stayed in the firmware until reboot, and so did the
section buffers the driver kept for it. On an M2, ten or eleven
MobileNet-sized programs loaded by short-lived processes were enough for
the firmware to stop answering. The next LOAD timed out with 17 firmware
allocations (17 MB) outstanding, well inside the driver's own limits,
and the device stayed quarantined until reboot.

Give every program a lifetime. Each file holds a reference on the
programs it loaded, and EXEC and PROC_CREATE refuse a program the file
holds none on. When the last reference goes, the driver sends
TERMINATE_PROCESS and then DESTROY_PROGRAM, and only after both are
acknowledged does it drop its references on the section buffers. A
failed unload keeps the program and its buffers until a verified
firmware restart.

Answer the firmware's FREE requests on the SHAREDMALLOC ring. The
firmware posts one when a pool shrinks, for example when a process is
terminated, and waits for the answer with its shared memory lock held,
sometimes after the command that caused it was acknowledged. The driver
used to take such a slot for a malformed MALLOC. It now answers the
request, frees the buffer and reuses its table slot, so the table and
its byte count follow the live allocations. The ring is served before
each command, while a command or call is pending, and for 10 ms of quiet
after each unload command.

A timed-out command now logs the allocation ring and the T2H rings at
the host cursors, and debugfs fw_memory reports the live allocations,
bytes and programs.

The request classes, the slot reuse rule and the per-file program
references follow omarchy-ane by Joshua Warren (MIT).

KUnit ane-t6021-lifetime covers the request classes, slot reuse, shared
programs, unload order, held programs, a restart during an unload and
the table limits.

Assisted-by: LLM
Signed-off-by: Ryan Murray <[email protected]>
@RyanTheTide

Copy link
Copy Markdown
Contributor Author

M2 hardware run, 01/11 12:04-12:10, 7.3.0-aurora-tt3 with this module. Result: not ready, keep draft.

What works

  • Single-task programs unload cleanly. Eight distinct per-layer programs and nine 20-call smokes (about 170 load, create, terminate and destroy cycles) were all bit-exact. After every unload the firmware's allocations went back to the idle baseline of 9 live, 475136 bytes, and its 2 MiB per-process buffer came back through a FREE request that the driver answered.
  • This also explains the original limit: every process holds one 2 MiB firmware allocation, and the old failure was exactly baseline plus eight of them (17 allocations, 17252352 bytes). Without unload the firmware stops at about eight live processes.

What fails

  1. TERMINATE_PROCESS after a program with more than one task has run never completes, and the firmware stops answering. Reproduced on a freshly booted firmware with a 2-task stride-2 layer and with a 4-task stride-1 layer. Both completion events of the call had arrived, no ring held a pending request, and the doorbell pending word was 0.
  2. The restart from the first commit cannot work on T8112. CPU_STATUS reads 0x2c or 0x28 there, with neither the RUNNING nor the STOPPED bit, before and after RUN is cleared, so the stop wait always times out. The device then stays quarantined as designed.

Both failures fail closed with no system impact. The M2 is back on the original module. Next step: decode what TERMINATE_PROCESS requires after a multi-task procedure, and what T8112 CPU_STATUS reports for a stopped CPU, before another device run.

🤖 Generated with Claude Code

On the M2 the previous commit unloads single-task programs cleanly, but
TERMINATE_PROCESS after a program with more than one task has run never
completes and the firmware stops answering. The firmware waits for its own
flush with no timeout, no host step is missing, and there is no other
command that frees such a process. Every useful network is multi-task, so
unloading on close cannot be the design.

Separate a program from its residency in the firmware.

- A program is single-task only when its TD property section (load id 7)
  and its TD stream (load id 3) both count one task, read from the same
  snapshot as the cache key. Anything else counts as multi-task, and a
  multi-task process is never terminated.
- At the last close a single-task program, or one without a process, is
  unloaded as before. A multi-task program stays resident as a cache entry
  that the next load of the same bytes reuses with no command.
- At most eight programs are resident. Each process holds a 2 MiB firmware
  allocation and a LOAD sent with eight resident never completed. Before
  every LOAD the driver unloads single-task programs (unreferenced first,
  then least recently used), and when none is left it restarts the
  firmware at that idle point.
- Programs keep their kernel IDs, section references and LOAD records
  while files hold them. After an eviction or a restart the next
  PROC_CREATE or EXEC loads the program again and creates its process,
  so clients see no change. A restart drops unreferenced cache entries.
- The restart is a state machine. A planned restart sends POWER_DOWN
  (0x0b), waits for its completion and for WFI, clears CPU_CONTROL RUN
  and then bit 5, and requires CPU_STATUS STOPPED with RUN clear before
  any domain goes off. The old code waited for RUNNING to clear and
  STOPPED to set right after clearing RUN, which never happens on T8112
  (0x2c idle, 0x28 halted, neither stopped). After a command timeout only
  the RUN clear is tried. If STOPPED is not seen nothing is powered off
  and the device stays quarantined with its mappings, power claim and
  pin. A refused POWER_DOWN leaves the live firmware in service.
- debugfs fw_memory also reports resident, cached and single-task
  programs, the limit, the budget restarts and the firmware generation.

The KUnit suite ane-t6021-lifetime covers the task count parsers, the
never-terminate rule, the cache, the resident budget and eviction order,
reload after a restart with stable IDs, a thirty-program sequence that
never exceeds the budget, and the restart stop ordering.

The TD walk follows the block walk that omarchy-ane's libane section
builder by Joshua Warren (MIT) documents.

Assisted-by: LLM
Signed-off-by: Ryan Murray <[email protected]>
@RyanTheTide RyanTheTide changed the title accel/ane: H14 program unload, firmware FREE requests and timeout restart ANE: H14 program lifetime Nov 1, 2026
POWER_DOWN (0x0b) on the 13.5 legacy firmware is the 8-byte header only;
any other length asserts. The handler stops the firmware timers, requests
its power state and waits in WFI for good, so it never posts a completion
and its slot stays firmware-owned. The previous commit sent 16 bytes and
waited for a completion, so the first planned restart would have
quarantined the device.

Post the header without waiting, after answering any request already on
the SHAREDMALLOC ring (a core in WFI cannot finish that handshake). The
dispatcher clears the completion field on entry, so mark it and wait for
the clear, then require CPU_STATUS IDLE on twenty reads 100 us apart
before clearing RUN. Drop the extra CPU_CONTROL bit 5 clear: it is not
part of the ASC register contract and bit 5 is already clear while the
core runs. STOPPED with RUN clear is still required before any power
domain goes off.

STOP (0x01) is not sent first. It runs the same no-timeout flush that
never returns after a multi-task call, and the host already proves the
instance idle under the firmware lock.

The resident limit stays at eight. Document it as what it is: the
firmware's L2 spill pool holds eight 2 MiB buffers and grows on every
CREATE_PROCESS while it holds fewer, the program and process tables are
far larger (240 and 496 advertised), and a LOAD sent with eight processes
resident was seen to never complete.

Assisted-by: LLM
Signed-off-by: Ryan Murray <[email protected]>
@RyanTheTide

Copy link
Copy Markdown
Contributor Author

M2 hardware run, 01/11 15:36-15:43, 7.3.0-aurora-fleet14b with this branch at 7af2409 (two boots), then the stock module (one boot). Result: not ready, keep draft. The M2 is back on the stock module and initramfs.

What works

  • 46 distinct single-task programs (real and rand per-layer), each loaded, run, closed and unloaded, with the 20-call smoke bit-exact after every one. Firmware allocations back to the idle baseline (9 live, 475136 bytes) after each. No budget restart was needed for them.

What fails

  1. The first multi-task program in each boot wedged the firmware: per-layer program 8 (2 tasks) in boot 1, the linked 2-task l9rand prefix in boot 2. The call itself returns, then the next command (the smoke's LOAD) never completes. No TERMINATE was sent in either boot, so TERMINATE is not the trigger.
  2. The same happens on the stock module with no unload code at all: after the l9rand call the next CALL timed out (fw allocations 13 = baseline plus 4 spill buffers). Meanwhile thousands of MobileNetV1 linked calls (45 tasks) and the classify demo ran clean in the same boot. So some programs, the per-layer multi-task layers and the l9 prefixes, leave the firmware unable to finish its next command. Most likely this is in how those programs are compiled, not in the driver lifetime.
  3. Recovery after that wedge: clearing RUN leaves CPU_STATUS at 0x2c (STOPPED clear), so the restart refuses to power off and the device stays quarantined (fail closed, as designed). The planned POWER_DOWN restart was never reached, so a clean POWER_DOWN to STOPPED is still unmeasured.

Consequence for this PR: the rule "never terminate a multi-task process" was based on the two first-shift repros, which used two of these programs. It may not be needed for well-formed multi-task programs. The next step is to find what in those programs wedges the firmware (compiler side) and to test TERMINATE on a program that does not wedge.

Timing (lead's classify question, stock module): MobileNetV1 per-call time is 1.31 ms with back-to-back calls, and up to 1.65 ms after a sleep gap of 1 ms or more (CPU wake-up). Firmware perf mode (0x10aa) changes nothing. The demo's 10-12 ms "selected" time is mostly its own Python packing around a 1.3-1.7 ms ANE call, not ANE or driver time.

Evidence: full dmesg of all three boots and the per-step JSON are kept with the lane reports.

🤖 Generated with Claude Code

RyanTheTide added a commit that referenced this pull request Nov 1, 2026
The H14 firmware currently remains live while system PM suspends its
power and IOMMU suppliers. The next command can time out after resume,
leaving the device unusable until reboot.

Fence submitters under the firmware mutex and split the existing lifetime
restart transaction at its proven-stop boundary. System suspend uses the
same cooperative shutdown and ASC stop helper as planned recovery. Keep
the transaction and all old backing across the supplier transition, then
use the existing accessibility checks, cold boot, handshake and lifetime
commit on resume. Only a verified restart reopens submissions. Runtime
recovery continues to perform its existing explicit power cycle.

Reuse the shared program table and lazy reload policy, preserving public
program IDs; introduce no second replay or allocation-retirement path.
Leave failed stops and restarts fenced with the lifetime owner's existing
retention policy.

Add KUnit coverage for system callback wiring, three sleep cycles,
serialization, stop/restart errors and the shared stop-only boundary.
Document the M2 platform-test cycles and subsequent s2idle acceptance run.

This change depends on the shared H14 lifetime work in linux #737.

Assisted-by: LLM
Signed-off-by: Ryan Murray <[email protected]>
Header word 2 of each H14 TD block marks the first task of a program
(0x08) and its last (0x22), 0 between, both (0x2a) on a single task.
All 1503 decoded Apple H14 programs follow that. A compiler bug emitted
0x2a on every task of a multi-task layer. On the M2 such a program's call
returns, and then the firmware never completes another command until
reboot, with this driver and with the stock one. That is the hang the
earlier commits read as a TERMINATE_PROCESS wedge after multi-task
programs: both repro programs had the malformed flags.

Check the flags in the same snapshot that keys the cache and refuse a
malformed program with -EINVAL before the firmware sees it, so one client
cannot take the ANE away from every other until reboot. A stream that
does not parse is left to the firmware's own descriptor check.

KUnit td_flags_test covers the single, two- and three-task forms and the
broken ones.

Assisted-by: LLM
Signed-off-by: Ryan Murray <[email protected]>
@RyanTheTide

Copy link
Copy Markdown
Contributor Author

M2 hardware run 2, 01/11 16:14-16:19, 7.3.0-aurora-fleet14b with be53192 plus test-only debugfs hooks (a switch that makes newly loaded programs terminable, and a restart trigger; never committed). The M2 is back on the stock module, smoke 20/20.

  • Malformed programs (0x2a on every task): per-layer program 8 and the l9 conv are refused at LOAD with -EINVAL, and the firmware keeps answering (smoke 20/20 after each).
  • The 12 multi-task programs rebuilt with the compiler fix (aurora-silicon/mil-hwx-compiler PR arm64: apple: describe J700 CPU, power and storage topology #16: per-layer 8, 12, 24, 26, 27 for both weight sets, and both l9 convs) all run, and the next command completes every time. They stay resident as cache entries, and the 9th forced the planned restart.
  • Planned restart, measured for the first time on T8112: POWER_DOWN taken (CPU_STATUS 0x2c), then RUN clear gives CPU_STATUS 0x2e, STOPPED set, CPU_CONTROL 0x0. The ASC stop was proven on every attempt (4 restarts: 2 for room, 2 requested at idle). Restart to first use took about 1.1 to 1.2 s. Allocations went back to 9 / 475136 bytes after each.
  • MobileNetV1 (compiler-fixed package) held open in one process for 60000 passes while 9 other programs forced a restart underneath it: top-1 16/16, top-5 5.0, worst logit rel L2 1.28e-3, repeat output bit-identical across the restart.
  • TERMINATE + DESTROY of well-formed multi-task processes, loaded through the test switch: per-layer programs with 2, 4 and 8 tasks, linked p9 (10 tasks) and MobileNetV1 (45 tasks). All acknowledged, smoke 20/20 after each, firmware allocations back to the idle baseline every time.

So the "never terminate a multi-task process" rule is not needed. Its only evidence was programs with malformed task flags, which are now refused at LOAD. Next commit: unload every program at last close and keep the restart for HELD or uncertain cases only. That will need one more M2 check.

🤖 Generated with Claude Code

The rule that a multi-task process is never terminated came from two
M2 repros that both used programs with malformed first/last task flags,
which the previous commit refuses at LOAD. On the M2 with well-formed
programs, TERMINATE_PROCESS and DESTROY_PROGRAM complete for processes of
2, 4, 8, 10 and 45 tasks (a MobileNetV1), and the firmware allocations go
back to the idle baseline every time.

Drop the rule and the task count it needed. The last close now unloads
every program. Room for a new LOAD comes from unloading the least
recently used program a file still holds, which loads again with a new
process on its next use. A firmware restart is left only for the case
where every resident program is HELD, that is a load or unload whose
outcome is unknown. The malformed program refusal, the resident limit,
the restart state machine and the POWER_DOWN stop stay as they are.

KUnit drops the task count cases and covers unload at last close for any
program, LRU eviction of held-open programs, and a restart only when all
residents are HELD.

Assisted-by: LLM
Signed-off-by: Ryan Murray <[email protected]>
The H14 firmware currently remains live while system PM suspends its
power and IOMMU suppliers. The next command can time out after resume,
leaving the device unusable until reboot.

Fence submitters under the firmware mutex and split the existing lifetime
restart transaction at its proven-stop boundary. System suspend uses the
same cooperative shutdown and ASC stop helper as planned recovery. Keep
the transaction and all old backing across the supplier transition, then
use the existing accessibility checks, cold boot, handshake and lifetime
commit on resume. Only a verified restart reopens submissions. Runtime
recovery continues to perform its existing explicit power cycle.

Reuse the shared program table and lazy reload policy, preserving public
program IDs; introduce no second replay or allocation-retirement path.
Leave failed stops and restarts fenced with the lifetime owner's existing
retention policy.

Add KUnit coverage for system callback wiring, three sleep cycles,
serialization, stop/restart errors and the shared stop-only boundary.
Document the M2 platform-test cycles and subsequent s2idle acceptance run.

This change depends on the shared H14 lifetime work in linux #737.

Assisted-by: LLM
Signed-off-by: Ryan Murray <[email protected]>
Runtime PM is disabled during the late/noirq phases, between the normal
suspend and resume callbacks. Clarify that ordering and wrap the adapter
documentation. The system callbacks still leave the supplier transition
to system PM and do not invoke the runtime recovery power cycle.

Add the sleep test module description required by modpost.

Assisted-by: LLM
Signed-off-by: Ryan Murray <[email protected]>
@RyanTheTide

Copy link
Copy Markdown
Contributor Author

M2 hardware run 3, 01/11 18:03-18:14, 7.3.0-aurora-fleet14c with 51d33d3 plus a test-only debugfs restart trigger (never committed). The M2 is back on the stock fleet14c module, smoke 20/20.

  • Malformed program (0x2a on every task): refused at LOAD with -EINVAL, smoke 20/20 after.
  • 72 distinct well-formed programs (46 single-task per-layer, the 12 rebuilt multi-task per-layer programs, 14 linked packages up to 45 tasks), each loaded, run and closed. Every one unloaded at close: resident 0 and firmware allocations back to 9 / 475136 bytes after each, smoke 20/20 after each, no restart.
  • Planned restart at idle: POWER_DOWN taken, ASC stop proven (CPU_STATUS 0x2e, CPU_CONTROL 0x0), firmware restarted.
  • System sleep: 3 cycles of pm_test=platform with mem (s2idle). Each suspend logged POWER_DOWN taken (0x2c) and ASC stop proven (0x2e, CPU_CONTROL 0x0); each resume logged the firmware restarted. Suspend devices took 0.90 s and resume devices 1.25 s. MobileNetV1, held open in one process for 30000 passes across all three cycles: top-1 16/16, top-5 5.0, worst logit rel L2 1.28e-3, repeat output stable. A fresh MobileNetV1 process after the cycles: 16/16. Smoke 20/20 after each cycle.
  • LRU eviction under load: MobileNetV1 ran 60000 passes while 10 multi-task programs looped in other processes for 15 s. That is 11 live programs against the 8 resident limit, so programs were continuously unloaded for room and loaded again: 560 reloads, every TERMINATE and DESTROY acked, no timeout or failed exchange, no restart, firmware allocations back to 9 after, smoke 20/20 after. The MobileNet result of this phase was lost to a key clash in the test script (fixed in the kit), so correctness under eviction was not checked in this run. Correctness across a restart and across suspend was checked above.

🤖 Generated with Claude Code

@RyanTheTide
RyanTheTide marked this pull request as ready for review November 1, 2026 07:17
@RyanTheTide

Copy link
Copy Markdown
Contributor Author

Merging. Hardware result on the M2 (T8112, fleet14b/fleet14c), across four slots today: malformed programs (first/last task markers on every task) refused at LOAD; 72 well-formed programs (single-task, multi-task and linked up to 45 tasks) unload at last close with firmware allocations back to baseline; the planned firmware restart proves STOPPED (CPU_STATUS 0x2e) every time and MobileNetV1 held open across it stays top-1 16/16 with bit-identical output; TERMINATE and DESTROY of well-formed multi-task processes are clean; three pm_test freeze cycles pass with MobileNet held open (16/16 after) and a fresh MobileNet 16/16; 560 unload/reload cycles under the 8-resident limit with every command acknowledged. The one sub-check not captured (MobileNet output during the 15 s eviction stress) is covered by the same reload path the restart test exercises, and will be rerun with the fixed script in the next M2 slot.

🤖 Generated with Claude Code

@RyanTheTide
RyanTheTide merged commit 4759557 into aurora-wip Nov 1, 2026
@RyanTheTide

Copy link
Copy Markdown
Contributor Author

M2 check after merge, 01/11 18:53-18:55, stock 7.3.0-aurora-fleet14d (aurora-wip 4759557, which includes this PR). No module install, no test hooks. This closes the one gap left by run 3: MobileNetV1 correctness while it is unloaded for room and loaded again.

MobileNetV1 (compiler-fixed package) stayed open in one process for 16 reference images and then 60000 passes. For 15 s of that, 10 multi-task programs looped in 10 other processes, which is 11 live programs against the limit of 8 resident. At the mid-point the driver reported 8 resident, 17 firmware allocations (8 spill buffers), 0 restarts and firmware generation 0. So programs were unloaded and reloaded for room without a firmware restart.

  • MobileNetV1: top-1 16/16, top-5 5.0, worst logit rel L2 1.28e-3, repeat output bit-identical (p50 1.132 ms, p99 1.597 ms over the 60000 passes, including the contended stretch).
  • After the helper processes exited: resident 0, allocations back to 9 / 475136 bytes, no restart, no timeout, no failed exchange, no quarantine. Smoke 20/20.

🤖 Generated with Claude Code

notmysegv pushed a commit to notmysegv/linux that referenced this pull request Nov 4, 2026
…tion/aurora

Bring integration/aurora up to aurora-wip b359258, the source of
7.3.0-aurora-fleet14f, promoted on the M1 Pro, M2, Neo and J616s on
2026-11-01 and 11-02. The range also covers the fleet14c, fleet14d and
fleet14e sources (f41ac3d, 4759557, 757fc07), each booted on
hardware. It adds aurora-silicon#773, aurora-silicon#776, aurora-silicon#777, aurora-silicon#737, aurora-silicon#713, aurora-silicon#785, aurora-silicon#786, aurora-silicon#788,
aurora-silicon#789 and aurora-silicon#787. No conflicts.

Assisted-by: LLM
Signed-off-by: Ryan Murray <[email protected]>
@RyanTheTide
RyanTheTide deleted the ane/h14-fw-alloc-lifetime branch November 7, 2026 12:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant