wai-rs: fast integer decode kernels that give the same integer for every output #108
Merged
dcharlot
merged 6 commits from 2026-09-30 19:52:11 -04:00
wai/land-07-int-decode-kernels into main 2026-09-29
Merge wai/land-06-ci-headline-tests into wai/land-07-int-decode-kernels
Some checks failed
wai cross-architecture byte-equality / linux-aarch64 (pull_request) Successful in 23s
WAI conformance / cargo-class corpora · linux-arm64 (pull_request) Successful in 1m46s
WAI conformance / cross-arch byte-equality · linux-arm64 (pull_request) Successful in 22s
no-vanity-metrics / Scan committed Markdown for vanity metrics (pull_request) Successful in 3s
standards workspaces build + test / eoc-rs (pull_request) Successful in 1m47s
standards workspaces build + test / jcp-rs (pull_request) Successful in 1m16s
standards workspaces build + test / proof-rs (pull_request) Successful in 1m11s
standards workspaces build + test / sandbox-rs (pull_request) Successful in 2m6s
standards workspaces build + test / smart-byte-rs (pull_request) Successful in 2m34s
wai cross-architecture byte-equality / linux-x86_64 (pull_request) Successful in 23s
WAI conformance / cargo-class corpora · linux (pull_request) Successful in 2m3s
WAI conformance / cross-arch byte-equality · linux (pull_request) Successful in 22s
WAI conformance / C2PA manifest emission · signed, read back, validated (pull_request) Successful in 40s
wai formal verification (integer core) / kani (pull_request) Successful in 4m26s
WAI JPEG-AI whole decode (pinned inputs, required) / fetch pinned JPEG-AI inputs → whole decode + pixel hash, required (pull_request) Successful in 52s
WAI neural decoders end-to-end / synthetic fixtures → Rust decode → reference (±4) (pull_request) Failing after 1m4s
WAI neural sink gates / model-free refusals of the neural sink (pull_request) Successful in 23s
standards workspaces build + test / arl-rs (pull_request) Successful in 2m12s
standards workspaces build + test / joule-ui-rs (pull_request) Successful in 2m6s
WAI mbt2018_mean integer decode (regenerated vectors) / regenerate mbt2018_mean integer vectors → Rust decode, required (pull_request) Successful in 2m34s
standards workspaces build + test / jouledesk-rs (pull_request) Successful in 2m15s
standards workspaces build + test / joulehook-rs (pull_request) Successful in 2m10s
standards workspaces build + test / sense-rs (pull_request) Successful in 1m54s
standards workspaces build + test / macOS energy backend (jcp-energy) (pull_request) Successful in 2m8s
wai cross-architecture byte-equality / macos-arm64 (reference) (pull_request) Successful in 24s
WAI conformance / cargo-class corpora · macos (pull_request) Successful in 2m24s
WAI conformance / cross-arch byte-equality · macos (pull_request) Successful in 22s
wai cross-architecture byte-equality / windows-x86_64 (pull_request) Has been cancelled
WAI conformance / cargo-class corpora · windows (pull_request) Has been cancelled
WAI conformance / cross-arch byte-equality · windows (pull_request) Has been cancelled
Brings in, through the refreshed previous link, main's OER differential fuzzer (54e89b56) and its audit of the OER extension against both verifiers (860ead8c, documentation only), so this link is checked against current main. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Merge wai/land-05-prior-nnc into wai/land-06-ci-headline-tests
Some checks failed
wai cross-architecture byte-equality / linux-aarch64 (pull_request) Successful in 18s
WAI conformance / cargo-class corpora · linux-arm64 (pull_request) Successful in 1m5s
WAI conformance / cross-arch byte-equality · linux-arm64 (pull_request) Successful in 17s
no-vanity-metrics / Scan committed Markdown for vanity metrics (pull_request) Successful in 3s
standards workspaces build + test / eoc-rs (pull_request) Successful in 1m47s
standards workspaces build + test / jcp-rs (pull_request) Successful in 1m17s
standards workspaces build + test / proof-rs (pull_request) Successful in 1m11s
standards workspaces build + test / sandbox-rs (pull_request) Successful in 2m7s
standards workspaces build + test / smart-byte-rs (pull_request) Successful in 2m33s
wai cross-architecture byte-equality / linux-x86_64 (pull_request) Successful in 14s
WAI conformance / cargo-class corpora · linux (pull_request) Successful in 1m13s
WAI conformance / cross-arch byte-equality · linux (pull_request) Successful in 14s
WAI conformance / C2PA manifest emission · signed, read back, validated (pull_request) Successful in 41s
wai formal verification (integer core) / kani (pull_request) Successful in 4m3s
WAI JPEG-AI whole decode (pinned inputs, required) / fetch pinned JPEG-AI inputs → whole decode + pixel hash, required (pull_request) Successful in 1m14s
WAI neural decoders end-to-end / synthetic fixtures → Rust decode → reference (±4) (pull_request) Failing after 1m5s
WAI neural sink gates / model-free refusals of the neural sink (pull_request) Successful in 23s
WAI mbt2018_mean integer decode (regenerated vectors) / regenerate mbt2018_mean integer vectors → Rust decode, required (pull_request) Successful in 2m33s
standards workspaces build + test / arl-rs (pull_request) Successful in 2m51s
standards workspaces build + test / joule-ui-rs (pull_request) Successful in 2m25s
standards workspaces build + test / jouledesk-rs (pull_request) Successful in 2m34s
standards workspaces build + test / joulehook-rs (pull_request) Successful in 2m27s
standards workspaces build + test / sense-rs (pull_request) Successful in 2m40s
standards workspaces build + test / macOS energy backend (jcp-energy) (pull_request) Successful in 2m57s
wai cross-architecture byte-equality / macos-arm64 (reference) (pull_request) Successful in 16s
WAI conformance / cargo-class corpora · macos (pull_request) Successful in 1m8s
WAI conformance / cross-arch byte-equality · macos (pull_request) Successful in 13s
wai cross-architecture byte-equality / windows-x86_64 (pull_request) Has been cancelled
WAI conformance / cargo-class corpora · windows (pull_request) Has been cancelled
WAI conformance / cross-arch byte-equality · windows (pull_request) Has been cancelled
Brings in, through the refreshed previous link, main's OER differential fuzzer (54e89b56) and its audit of the OER extension against both verifiers (860ead8c, documentation only), so this link is checked against current main. Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-09-28
wai-rs: hold the fast integer kernels to the JPEG AI decode path's math-library guard
Some checks failed
wai cross-architecture byte-equality / linux-aarch64 (pull_request) Successful in 23s
WAI conformance / cargo-class corpora · linux-arm64 (pull_request) Successful in 1m35s
WAI conformance / cross-arch byte-equality · linux-arm64 (pull_request) Successful in 21s
no-vanity-metrics / Scan committed Markdown for vanity metrics (pull_request) Successful in 3s
standards workspaces build + test / eoc-rs (pull_request) Successful in 1m48s
standards workspaces build + test / jcp-rs (pull_request) Successful in 1m18s
standards workspaces build + test / proof-rs (pull_request) Successful in 1m12s
standards workspaces build + test / sandbox-rs (pull_request) Successful in 2m8s
standards workspaces build + test / smart-byte-rs (pull_request) Successful in 2m30s
wai cross-architecture byte-equality / linux-x86_64 (pull_request) Successful in 22s
WAI conformance / cargo-class corpora · linux (pull_request) Successful in 2m4s
WAI conformance / cross-arch byte-equality · linux (pull_request) Successful in 24s
WAI conformance / C2PA manifest emission · signed, read back, validated (pull_request) Successful in 43s
wai formal verification (integer core) / kani (pull_request) Successful in 4m28s
WAI JPEG-AI whole decode (pinned inputs, required) / fetch pinned JPEG-AI inputs → whole decode + pixel hash, required (pull_request) Successful in 57s
WAI neural decoders end-to-end / synthetic fixtures → Rust decode → reference (±4) (pull_request) Failing after 1m9s
WAI neural sink gates / model-free refusals of the neural sink (pull_request) Successful in 25s
WAI mbt2018_mean integer decode (regenerated vectors) / regenerate mbt2018_mean integer vectors → Rust decode, required (pull_request) Successful in 2m30s
standards workspaces build + test / arl-rs (pull_request) Successful in 5m20s
standards workspaces build + test / joule-ui-rs (pull_request) Successful in 2m38s
standards workspaces build + test / jouledesk-rs (pull_request) Successful in 2m16s
standards workspaces build + test / joulehook-rs (pull_request) Successful in 1m57s
standards workspaces build + test / sense-rs (pull_request) Successful in 2m4s
standards workspaces build + test / macOS energy backend (jcp-energy) (pull_request) Failing after 2m9s
wai cross-architecture byte-equality / macos-arm64 (reference) (pull_request) Successful in 25s
WAI conformance / cargo-class corpora · macos (pull_request) Successful in 2m14s
WAI conformance / cross-arch byte-equality · macos (pull_request) Successful in 20s
wai cross-architecture byte-equality / windows-x86_64 (pull_request) Has been cancelled
WAI conformance / cargo-class corpora · windows (pull_request) Has been cancelled
WAI conformance / cross-arch byte-equality · windows (pull_request) Has been cancelled
jpegai_synthesis and int_transformer now run their loops through int_kernels, so int_kernels is on the JPEG AI exact decode path. Every other module on that path denies clippy's disallowed_methods (wai-rs/clippy.toml) so that no platform math-library call can enter it; int_kernels now does too. It calls none of the listed methods, so this changes no code, only makes the guard cover the whole path it describes. Co-Authored-By: Claude Opus 5.5 <[email protected]>
wai-rs: fast integer decode kernels that give the same integer for every output
WAI's integer decoders ran scalar, single-threaded loops, and no throughput figure existed for them. Integer arithmetic is exact, so the work can be re-partitioned across lanes and threads without changing any result, as long as each output element's arithmetic and overflow behaviour are unchanged. - src/int_kernels.rs holds the fast convolution, transposed-convolution, matmul and elementwise kernels. Each gives the same integer as the scalar reference for every output element. Threading uses std:🧵:scope and is not used on wasm32. - A fast kernel runs only where its own arithmetic cannot overflow and the reference can size its output; operands outside that bound, and geometries where the padded input outgrows the reference's proportion, are handed to the reference kernel. With overflow checks on, the fast path panics where the reference panics; with them off, it returns the same integers. - Equivalence is tested, not argued: every committed integer-decoder vector is decoded under the reference and under each fast policy against its frozen hash (tests/int_kernels_vectors.rs), edge geometry runs through the public decoders (tests/int_kernels_geometry.rs), and wai-conformance runs both in dev and release profiles on every leg. The Kani harnesses are unchanged and still verify. - wai_decode_bench times reference and fast decodes interleaved in one process, best of N. research/decode-throughput.md records the measured figures, the machine and the method, and which benchmarked vectors are trained models; the largest gain is on the int_hyper synthesis topology (synthetic weights). Co-Authored-By: Claude Opus 5.5 <[email protected]>
ci(wai): run the JPEG AI cross-platform pinned-output test in the whole-decode job
Some checks failed
wai cross-architecture byte-equality / linux-aarch64 (pull_request) Successful in 15s
WAI conformance / cargo-class corpora · linux-arm64 (pull_request) Successful in 1m1s
WAI conformance / cross-arch byte-equality · linux-arm64 (pull_request) Successful in 16s
no-vanity-metrics / Scan committed Markdown for vanity metrics (pull_request) Successful in 3s
standards workspaces build + test / eoc-rs (pull_request) Successful in 1m49s
standards workspaces build + test / jcp-rs (pull_request) Successful in 1m25s
standards workspaces build + test / proof-rs (pull_request) Successful in 1m16s
standards workspaces build + test / sandbox-rs (pull_request) Successful in 2m7s
standards workspaces build + test / smart-byte-rs (pull_request) Successful in 2m29s
wai cross-architecture byte-equality / linux-x86_64 (pull_request) Successful in 15s
WAI conformance / cargo-class corpora · linux (pull_request) Successful in 1m14s
WAI conformance / cross-arch byte-equality · linux (pull_request) Successful in 14s
WAI conformance / C2PA manifest emission · signed, read back, validated (pull_request) Successful in 41s
wai formal verification (integer core) / kani (pull_request) Successful in 3m56s
WAI JPEG-AI whole decode (pinned inputs, required) / fetch pinned JPEG-AI inputs → whole decode + pixel hash, required (pull_request) Successful in 1m12s
WAI neural decoders end-to-end / synthetic fixtures → Rust decode → reference (±4) (pull_request) Failing after 1m7s
WAI neural sink gates / model-free refusals of the neural sink (pull_request) Successful in 26s
WAI mbt2018_mean integer decode (regenerated vectors) / regenerate mbt2018_mean integer vectors → Rust decode, required (pull_request) Successful in 2m34s
standards workspaces build + test / arl-rs (pull_request) Successful in 5m15s
standards workspaces build + test / joule-ui-rs (pull_request) Successful in 2m26s
standards workspaces build + test / jouledesk-rs (pull_request) Successful in 2m29s
standards workspaces build + test / joulehook-rs (pull_request) Successful in 2m22s
standards workspaces build + test / sense-rs (pull_request) Successful in 2m25s
standards workspaces build + test / macOS energy backend (jcp-energy) (pull_request) Failing after 2m19s
wai cross-architecture byte-equality / macos-arm64 (reference) (pull_request) Successful in 13s
WAI conformance / cargo-class corpora · macos (pull_request) Successful in 1m1s
WAI conformance / cross-arch byte-equality · macos (pull_request) Successful in 13s
wai cross-architecture byte-equality / windows-x86_64 (pull_request) Has been cancelled
WAI conformance / cargo-class corpora · windows (pull_request) Has been cancelled
WAI conformance / cross-arch byte-equality · windows (pull_request) Has been cancelled
The pinned-output test (tests/jpegai_cross_platform.rs) needs the same inputs the whole-decode job already fetches and checks, but no job ran it. The job now runs it with the other two tests, requires it by name, and triggers on changes to it. determinism-tiers §6 and the CHANGELOG say so. Verified locally with the job's own script and the pinned inputs: all three required tests ran and passed, the pinned pixel hash was checked, and no test printed a skip banner. Co-Authored-By: Claude Opus 5.5 <[email protected]>
wai: the headline decode tests fail on a missing input, and CI supplies their inputs
The tests behind WAI's whole-decode claims read inputs from outside the repository and returned early — reporting a pass — when those inputs were absent. No workflow supplied them, so the claims were not checked continuously. - WAI_REQUIRE_SOTA_VECTORS=1 turns a missing input into a failure. A path variable naming a missing or incomplete input fails with or without the switch. Local runs without either still skip, and every skip prints a banner saying the claim was not verified. - wai-sota-vectors.yml regenerates the int_hyper vectors from the pretrained mbt2018_mean checkpoint (pinned by SHA-256, with a pinned Python stack) and runs int_hyper_synth and int_video_sota_keyframe with the switch set. The regenerated vectors identify one run, not one machine: the encoder side is float. - wai-jpegai-e2e.yml fetches the pinned JPEG AI inputs from the public models root, checks each against a SHA-256 manifest, and runs the whole-decode and reconstruction-binding tests with the switch set, requiring each test by name and the pinned pixel hash. - Both jobs fail on any skip banner, and trigger on the kernels and float helpers the decode imports. - The int_hyper claims are stated as the checks CI runs, with its quality measured on the pinned image; JPEG AI cross-machine identity is stated as a measurement, not a registry-class claim. determinism-tiers §5–§6 record the jobs. Neither workflow has yet run through the forge. Co-Authored-By: Claude Opus 5.5 <[email protected]>