open-standards/wai/byte-exact-conformance/Cargo.toml
Transaction Science 446865697c WIV1 and WIR1 gate 5 (WIP, committed before running): the 32-bit form behind a feature, held to the exact form
A stage-only decode has no fast kernel behind an interpreter. What a faster
fabric runs instead is E9's 32-bit form (§5E E9, Width): the form D3b's
integer GPU legs take. Gate 5 holds it to the exact form.

- wai-ops: residual_step_i32 and i32_form_fits behind the new i32_forms
  feature (and cfg(test), cfg(kani), so the unit tests and K29 keep them);
  residual_step_by_i32, E9 through its 32-bit form for a driver whose
  operands are i64. wai-verify declares the feature name its included
  sources test.
- wai-rs i32_forms: int_video::ops::{decode_typed_i32,
  decode_pframes_typed_i32} and staged::wir1::ops::apply_unit_i32, the
  drivers with E9 as a parameter.
- Parity: every committed clip and layer through the 32-bit form as through
  the exact form (tests/int_video_ops.rs, tests/wir1_ops.rs), changed
  streams too; the differential compares the 32-bit form on every random
  case; byte-exact-conformance (i32_forms on by default) decodes WIV1 and the
  staged sets through it to the pinned digests on every leg.
- CI: the fast-kernel steps carry i32_forms, appended so gate.sh's grep
  still finds them.

Gate 4's falsification, for the record: ops::frame's block grid taken as
w / block, which only a grid with a partial last column reaches (every
committed clip's sides are multiples of its block). Gates 1 to 3 stayed
green (int_video_ops 5, wir1_ops 5); int_video_random_clips_decode_alike
failed at seed 3372 (h 5, w 3, block 4). Timed 300 s, seed 20261017: debug
2,402,935 clips and 408,439 layers, release 11,948,953 and 3,322,036,
alike.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-17 11:28:23 -04:00

44 lines
2 KiB
TOML

# Cross-architecture byte-equality conformance for WAI's integer-exact paths.
#
# Deliberately a SEPARATE tiny crate: it #[path]-includes the pure-integer
# sources from wai-rs (rans.rs, int_synth.rs — single source of truth, no copy)
# so it compiles with NO system codec libraries and NO ONNX runtime. That is
# what lets the CI matrix run it on every OS/arch in about a minute, proving
# the `replicate` determinism contract on real silicon rather than asserting it.
[package]
name = "wai-byte-exact-conformance"
version = "0.1.0"
edition = "2024"
rust-version = "1.97"
license = "Apache-2.0"
publish = false
# The included wai-rs sources carry `cfg(kani)` items (set only by the model
# checker in wai-verify). Declared so this crate's builds do not warn on it.
[lints.rust]
unexpected_cfgs = { level = "warn", check-cfg = ["cfg(kani)"] }
[dependencies]
serde = { version = "1", features = ["derive"] }
serde_json = "1"
sha2 = "0.10"
# The integer operator set the included decoders run their networks through
# (`wai-rs/src/int_ops.rs`, included at the crate root). no_std, no dependencies.
wai-ops = { path = "../wai-ops" }
[features]
# wai-rs's test-only switch for the integer decoders' direct decodes (`int_synth::legacy`),
# declared so the included source's `cfg` names a known feature. The goldens here decode
# as a sink does, through the integer operator set; the crate's own tests compile the
# direct decode's unit tests under `cfg(test)`.
legacy_int = []
# wai-rs's features for the splat and audio decoders (`int_splat`, `int_audio`), which
# this crate always includes: on by default, so the included sources' tests that need
# them run here too.
splat_int = []
audio_int = []
# wai-rs's feature for the 32-bit forms of the stage operators (E9's by identity), which
# the goldens below decode `WIV1` and `WIR1` through on every leg of the matrix as well:
# the arithmetic a 32-bit fabric runs, held to the same digests. On by default.
i32_forms = ["wai-ops/i32_forms"]
default = ["splat_int", "audio_int", "i32_forms"]