Repository navigation
accel/ane: prepare H16 UUID submission and strict HWX validation - #681
Merged
Merged
Conversation
Track pending execution UUIDs before channel-7 publication and retire only matching terminal channel-6 events. Keep one deadline across acknowledgment and completion, order coherent DMA accesses, and quarantine failed or uncertain requests without exposing private output mappings. Validate complete HWX containers, tensor and program descriptors, aperture records, symbols and payload-only kernel relocations. Match execute buffers to kernel-owned process resources and revoke per-file authority on close. Add hardware-free KUnit coverage for validation and pending request paths. Keep H16 registration and section-only loading refused until preload, startup, the original-container ABI and process-resource decoding exist. Assisted-by: LLM Signed-off-by: Ryan Murray <[email protected]>
RyanTheTide
added a commit
that referenced
this pull request
Oct 31, 2026
The accepted dependency patch is already applied verbatim as 4700e91, with SHA-256 89bdf5072e468dd750580348679c0caa552ad26a07911ed218ac809495a1e8fd. Record the original PR #681 head as an ancestor so merging it upstream does not create add/add conflicts for the already extended HWX files. Preserve the current source tree unchanged. Assisted-by: LLM Signed-off-by: Ryan Murray <[email protected]>
RyanTheTide
marked this pull request as ready for review
October 31, 2026 13:58
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
H16 submission currently lacks a pending-UUID lifetime path, so a transport acknowledgment cannot establish that inference outputs are ready. This draft connects the execute serializer and terminal-event classifier to the shared driver, with private coherent DMA buffers, one acknowledgment/completion deadline, failure quarantine and per-file process ownership.
It also adds bounded validation of the original HWX, tensor/program descriptors, five-entry aperture table, symbols and payload-only kernel relocations. SHA-256 covers the complete immutable original snapshot. Only a kernel-owned process resource map may supply execute indices, classes, permissions and mappings.
H16 inference remains unavailable. Registration, section-only LOAD and the short H14 CREATE_PROCESS body stay refused. There is no original-container load ABI, decoded H16 process-resource provider, complete preload validator or cold-boot backend to install an executable H16 process. Custom BARs and channel-5 allocation replies also remain refused until their providers exist. This draft must not be treated as the first-inference enablement PR. H17 ownership refusal remains in place.
Validation:
First J616s smoke and rollback:
The concrete preparation command, from this tree with the pinned add-128 HWX supplied, is:
This verifies the 49,152-byte HWX SHA-256
231f54c28ea6b14a2867fac78eac1a2cb22aa3b0eeaa28113ed03c520b83a1d3, prepares two 32,768-byte inputs, poisons output and checks the CPU oracle. It performs no inference. A runnable Linux H16 inference command cannot yet be specified against this tree: no original-HWX loading interface exists, and the section-only ABI is intentionally refused. Providing and testing that invocation is a prerequisite to marking first-inference work ready.After those providers and the matching userspace runner are reviewed, the first separately authorized J616s run must load that exact original HWX, create its validated process and execute at priority 5 with a 5,000 ms absolute deadline. Require matching UUID/program/process/procedure state-1 completion, then DMA ordering and a complete output comparison. Repeat once without reloading, re-poisoning output first. Both 32,768-byte outputs must equal
expected.bin, SHA-256d113d9ae6734b7a7e233458229f64f382da99a3f93868eef3abb06a29f7f4ce8. State 0/3 and channel-7 acknowledgment are insufficient. Any state-2 failure, timeout, malformed completion or output mismatch requires quarantine and retention of firmware-visible mappings; do not retry in that boot.Before a future candidate boot, retain the complete known-good kernel/module/DTB set and its recovery entry; use a one-shot candidate entry with the fallback intact. On failure, preserve the failure log, boot the retained recovery entry and restore the known-good selection. Do not unload or reset an uncertain DMA owner in place. This draft changes no device state, so no target rollback has been performed.
The source rollback is:
Rebuild the complete matching kernel/module set before any later device installation.