# Validation
## Graph composition 0.7 qualification, 2026-09-16
All-feature CPU and documentation tests, strict all-target Clippy, and 19
inference hardware tests pass. Native GPU (14), coordinated execution (3), and
heterogeneous NPU (3) tests pass; execution Miri checks pass 24 tests with three
intentional-leak cases ignored. Composition tests check retained slots, alias
validation, exact image-operation results, lazy staging retries, and warm replay
without intermediate device copies, graph creation or device allocations.
The broader end-to-end performance targets are not met or fully qualified.
This release does not claim a general latency, throughput, startup or memory
improvement across applications. Graph-wide scratch reuse and further native
pipeline integration remain outside this release.
## Shared inference 0.6 qualification, 2026-09-16
Rust 1.91 all-feature CPU tests and stable strict Clippy pass. GPU-only and NPU
feature configurations build; `npu` is the only optional feature. Miri passes
24 execution/ownership tests with leak checks enabled; three intentional native
quarantine tests run outside Miri. Strict Rustdoc and package verification pass.
On gfx1151/XDNA2, the coordinated, owned-inference and mixed GPU/NPU suites pass,
including cross-lane ordering, retained-output backpressure, cancellation/drain,
native allocation budgets and quarantine. Pinned H3 and Krea pipeline fixtures
retain exact outputs after migration; H3 additionally checks four independent
idle-unit evictions, exact reload, native-stage lane exclusion and zero budget
charges at teardown. Compiler/driver allocations and allocator rounding remain
outside explicit budget accounting. These are correctness and ownership checks,
not a claim of universal speedups or whole-system memory reductions.
## Reviewed native bundle, 2026-09-09
The replacement bundle uses freshly built HRX/Loom and the AMD runtime from
TheRock build 26672984641. Its 13 library files, license texts, inventory, and
source-archive reference are pinned in `bundle.json`.
```text
06000605de874bc972e17e90f94a3816302fdd2a17040cfaf1df1f0b70483cc4
```
The library bytes passed all 27 CPU tests, both Rust doctests, and all 18 ignored
GPU/compiler tests on gfx1151. Installation started with an empty cache and used
no runtime, compiler, or HSA overrides. Every dynamic dependency resolves to the
bundle or a documented host library. The Arch library chain and `loom-compile`
are absent. Source hashes match the recorded upstream manifests; this does not
claim byte-identical reconstruction of AMD's CI build.
The final archive also passed all 13 native tests from an isolated checkout of
commit `2530451`. The public default URL installed into a second empty cache
without GitHub authentication, and `HRX_OFFLINE=1 hrx info` initialized gfx1151.
The source archive returns HTTP 200 anonymously; GitHub reports matching SHA-256
digests for both uploaded archives.
Cargo's publishing dry run passed, packaging 70 files (185.1 KiB compressed) and
successfully compiling the packaged crate. No crates.io upload was performed.
See [native/RELEASE.md](native/RELEASE.md) for source and build evidence.
The View API tests also check nested offsets, parent bounds, empty and overflowing
regions, and unchanged surrounding bytes after stream transfers and graph replay.
A release benchmark run after this change measured 24.3 GiB/s queued uploads,
130 ns host dispatch recording, and 806 ns host recording per 32-kernel replay.
This run uses the reviewed bundle; the historical comparison below uses the
original bundle. Each metric is the median of nine samples after three warmups.
## Original bundle results, 2026-09-09
Tested on Linux x86_64 with a gfx1151 GPU. Archive installation was checked with
an empty cache. Native tests use the verified bundle cache with `HRX_OFFLINE=1`
and without runtime, compiler or HSA library overrides.
| CPU tests | 27 passed |
| Rust API doctests | 2 passed |
| Ignored runtime and compiler tests | 18 passed |
| Feature matrix | All 8 subsets build, including on Rust 1.88 |
| Clippy | Passes with warnings denied on stable and Rust 1.88 |
| Rustdoc | Passes with warnings denied |
| Package contents | Internal review documents excluded |
The native tests cover queued transfers, staging batching and reuse, event
ordering between streams, moving pending streams between threads, rejection of
shared scratch allocations, argument packing, workgroup validation,
resource retention, graph replay, compiler caching and diagnostics.
The tested archive SHA-256 is:
```text
c151a978eff1c7def5c54b9acfd595cc1e8ca21b793b4613864a18281d846bb1
```
A cached directory matched every file digest in `bundle.json`. Repacking it
reproduced this archive hash and replaced the stale `34591d78…` archive in
`artifacts/`. The anonymous release URL returned 404 during the initial bundle
check. After the repository became public, an unauthenticated HEAD request to
the pinned archive returned HTTP 200 on 2026-09-09. This availability check did
not repeat installation or GPU tests. Dependency provenance and notices remain
incomplete; see [THIRD-PARTY.md](THIRD-PARTY.md).
To repeat the bundle check with an empty cache:
```sh
export XDG_CACHE_HOME="$(mktemp -d)"
unset HRX_RUNTIME_DIR HRX_LOOM_LIBRARY HRX_BUNDLE_MANIFEST
cargo run --all-features --bin hrx -- prepare /path/to/hrx-linux-x86_64-gfx1151.tar.gz
HRX_OFFLINE=1 cargo run --all-features --bin hrx -- info
HRX_OFFLINE=1 cargo test --all-features -- --ignored --test-threads=1
```
These results cover this crate. Consumer model quality and performance were not
retested. Only gfx1151 was exercised; GPU timestamp profiling is not implemented.
## Stream performance
Release builds on the same Ryzen AI MAX+ 395 / Radeon 8060S (gfx1151), using
Rust 1.95.0-nightly (5fb2ff861), Linux 7.2.3 and the bundle above. The baseline is
commit `af2f7c7`; the candidate removes `Gpu`, `compat` and the application C API
helpers. Both run the same [benchmark](examples/stream_bench.rs) through `Stream`.
| Queued upload, 256 MiB in 4 MiB chunks | 23.80 GiB/s | 24.08 GiB/s |
| Dispatch recording, host time per kernel | 131 ns | 131 ns |
| Dispatch batch through completion, per kernel | 2.158 µs | 2.154 µs |
| Graph replay, host time per 32-kernel replay | 815 ns | 815 ns |
| Graph batch through completion, per kernel | 2.200 µs | 2.194 µs |
| Scratch acquire/recycle, 1 MiB | 43.1 ns | 43.8 ns |
| Allocate/drop, 1 MiB | 367 ns | 361 ns |
Each process discards three warmups and takes the median of nine samples. The
table takes the median of five processes per version, alternating execution
order. Compilation, loading and initial data setup are outside the timed sections.
Each dispatch sample records 2,048 kernels; each graph sample replays 32 kernels
256 times. Samples end with stream synchronization. Upload and kernel outputs
are checked. Scratch samples contain 50,000 acquire/recycle pairs; allocation
samples contain 2,000 allocate/drop pairs.
The measured medians differ by less than 2%. Graph replay reduces host recording
work to roughly 25 ns per kernel here.
## Paired graph schedules, 2026-09-10
The corrected benchmark uses 32 disjoint input/output pairs in both recordings.
One recording chains the kernels and the other declares them independent. Each
sample replays 32 kernels 256 times and waits for completion. After three warmup
pairs it takes nine pairs, alternating chained/independent and
independent/chained order. Every output is checked.
One run on the gfx1151 host above measured:
| Chained | 4.373 µs |
| Independent | 1.926 µs |
The difference includes scheduling, barriers and possible overlap; it is not a
fixed cost per edge and does not predict model speedups. The reported metric is
`graph_scheduling_difference_ns_per_kernel`. These are CPU wall-clock timings,
not GPU timestamps; unrelated system load can affect them.
The previous Euler independence figures are withdrawn. Those nodes shared an
in/out allocation: a zero timestep did not make concurrent writes safe. The
separate 64-fill probe uses disjoint allocations, but its timing difference also
cannot be extrapolated into a universal edge price.
An empty `join` ends a native recordable partition and adds a queue barrier.
Passing producer nodes directly to a single consumer avoids that extra operation.
Additional native workstreams are considered only after the first 16 recordable
nodes within a partition. A graph's shape and this scheduling policy both matter;
node count alone does not establish concurrent execution. The pinned public API
has no partition, workstream or inserted-barrier counters.
The upload measurement includes the host staging copy on this integrated GPU;
it is not PCIe bandwidth.
To run after preparing the bundle:
```sh
HRX_OFFLINE=1 cargo run --release --example stream_bench
```
To compare another revision, copy `examples/stream_bench.rs` into its checkout,
build both with the same Rust toolchain, and alternate their release binaries.
For older revisions, adapt the transfer signatures using [CHANGELOG.md](CHANGELOG.md).
Keep other GPU work idle and use the same native bundle for both.
## CI
`.github/workflows/ci.yml` runs on pushes and pull requests using stable
Rust and Rust 1.91. It checks formatting, builds all targets, runs clippy, CPU tests
and rustdoc, checks GPU-only and NPU-enabled builds, and lists package contents.
`.github/workflows/gpu.yml` runs on pushes or manual dispatch. It needs a
registered runner with labels `self-hosted`, `linux`, `x64`, and `gfx1151`, access
to `/dev/kfd` and the render node, rustup, curl, and HTTPS access. Runner
registration is still outstanding.
The GPU job provisions an empty cache and runs every ignored test, including
compiler and library tests. It fails if provisioning fails. The optional
repository variable `HRX_BUNDLE_MANIFEST` is an HTTPS URL to a mirror manifest;
the workflow downloads it and sets the process environment variable to its local
path. Without a mirror, the job uses the pinned release.