Skip to content

accel/ane: prepare H16 UUID submission and strict HWX validation - #681

Merged
RyanTheTide merged 1 commit into
aurora-wipfrom
ane/h16-execute-lifecycle
Oct 31, 2026
Merged

RyanTheTide merged 1 commit into
aurora-wipfrom
ane/h16-execute-lifecycle

Conversation

@RyanTheTide

@RyanTheTide RyanTheTide commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

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:

  • Final-revision x86_64 KUnit under KASAN/UBSAN: 41/41 pass, including 19 new cases; no sanitizer reports.
  • Arm64 LLVM compilation of the shared firmware runtime, HWX validator and test objects passes. Both shared driver composite objects link. This is object compilation, not a complete installable kernel build.
  • Strict checkpatch: zero findings. SPDX validation passes for all six new files.
  • Fixture selftest: all three hashes and 16,384 fp16 oracle values pass.
  • No reference hardware was accessed, installed or booted.

First J616s smoke and rollback:

The concrete preparation command, from this tree with the pinned add-128 HWX supplied, is:

python3 tools/testing/selftests/drivers/ane/h16-fixture.py \
  --hwx "$HWX" --out-dir "$FIXTURE_DIR"

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-256 d113d9ae6734b7a7e233458229f64f382da99a3f93868eef3abb06a29f7f4ce8. 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:

git revert --no-commit 49862608f3e1195c650fbfa25fc2c757f48dba14

Rebuild the complete matching kernel/module set before any later device installation.

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
RyanTheTide marked this pull request as ready for review October 31, 2026 13:58
@RyanTheTide
RyanTheTide merged commit 935618f into aurora-wip Oct 31, 2026
@RyanTheTide
RyanTheTide deleted the ane/h16-execute-lifecycle branch October 31, 2026 13:58
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