wai-ops: wai.audio.int_codec decodes through the integer operator set, goldens unchanged (D2c, M3) #264
Loading…
Reference in a new issue
No description provided.
Delete branch "wai/d2c-m3"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
D2c, third decoder:
wai.audio.int_codecdecodes through the integer operator setwai-ops/1(integer-operators, Draft). Every committed golden is byte-identical. The audio synthesis is lowered bywam1/1(§13.3, with its PCM step) and loaded with its certificate, and the interpreter runs it witht_outas its scalar and the fast transposed convolutions behind it, held to it. The direct decode remains only as a test oracle.Stacked on #257 (
wai.splat.int_codec, M2): this branch mergeswai/d2c-m2-m3at3bd4d566, so until #257 lands its diff includes M2's commits. Review from064b8ef8on; the M3 commits are listed below.The seven gates, each in its own commit
064b8ef8). wai-ops gainslower::wam1_net; wai-rs gainsint_audio::ops::wam1_net, the parsedAudioModelin wai-ops' form. Both committed audio sets (the conformance vector's and the synthetic one) lower to their committed graphs from their bytes and from the parsed model. Loading gives the certificates' verdicts:acc64, notacc32, first failing atg_s's input range (the vector's at 47 bits, as Appendix C predicted), with the PCM step's scalar crop keeping it out of the accelerator subset. New testtests/int_audio_ops.rs.4a19f1eb).int_audio::ops::decode_typeddecodes through the lowering; the direct decode becomesint_audio::legacy. The committed vector, asWIA1and as its JSON form, gives the direct decode's samples, the PCM SHA-256 sidecar4b0344c8…and the export's FNV-1ae5ff66ad1b86117c. byte-exact-conformance gains the golden through the lowering.78d60107,dc51cade). Every committed audio fixture keeps its code both ways. Twenty-six more, one for each refusal the direct decode makes in integer-payloads §5 and §7's order, are refused alike. At the edge of everycheckrange of the committed set, a clip at±X_ℓdecodes to the same samples both ways and one past it is refused both ways; so is the PCM step's range, at its top and bottom. Also: the registryopsmember (acc64,full,wam1/1,rans64t4097/lenient/canonical), SPEC §5 and §7, and the CHANGELOG entry.dc59a0cb). The audio half oftests/int_ops_differential.rs, with the planned-break oracle shared with splat: randomWAM1sets andWIA1clips (escapes, medians at the 2^47 bound, whole channels at the input's check range and one past it,t_outthe latent is shortest for and not, cut or extended streams). A planned-breaks test shows each break, the PCM step's among them. 3000 cases per push; the nightly runs an hour per profile (--features legacy_int,splat_int,audio_int).51810ba1,457ba5b0). The committed synthesis's four transposed convolutions run on the fast kernel under every fast policy, counted, and give the interpreter's samples; the decode gives the same samples or refusal under the reference and four fast policies. int_audio's equivalence of its fast one-dimensional kernel with its scalar one is retargeted at the interpreter (random convolutions ofwam1/1's shape). The inverse GDNs and the PCM step run on the interpreter; the host lends no IGDN kernel, and the audio decode does not need one.67fa63e4,4ba5eb5c).int_audio::decode_typeddecodes through the lowering; the direct path and its helpers arecfg(any(test, feature = "legacy_int")).int_payload::declared_costruns the same pre-stream plan, lowering included.checkranges a producer must meet.WIA1payload (the vector, the fourteen fixtures, the staged base) are unaffected.9474a402,90a6f64e). The direct path's fast dispatchconv_t_1dand its equivalence tests go; the guardlayer_in_rangelives only in the test-only direct decode, which runs the scalar kernel. The dispatch's edge-geometry cases move into tests through the lowered graph under every policy: any stride aWAM1field holds, an uncropped length past the cap, padding past the fast kernels' pad factor, and an input that could overflow, refused by its check range.Merges:
3df705dd(#257's branch),5b74b05b(main at5d4ae64c; CHANGELOG kept both sides).Falsifications (each shown red, then green after restore)
igdnsums first, then shifts once (the row the audio golden carries)rqfloor → half_upX_ℓ + 1; the PCM range one too highpad.min(2); the committed set's paddings are 2)igdnsums first, after the switchtests/int_audio.rs;int_kernels_vectors::int_audio_clip; the corpus verifyChecks at the head (build host)
wai-verify vectors verify;wai_ops_check.py; wai-web's native tests; wai-web built for wasm32, whoseWIA1andWIS1decodes under Node give the native sidecars' SHA-256; the int_synth wasm corpus check; the registry export check.Not in this PR
run_net_checked's last production caller (the conditional codec): M4.🤖 Generated with Claude Code
Refusal parity (tests/int_splat_ops.rs): - every committed wai.splat.int_codec fixture of int-payload-conformance is refused by a sink with its code, and each that parses is refused alike, with that code, by the decode through the lowering and by the direct decode; - a fixture for each refusal the direct decode makes, in integer-payloads 7's order, each one change from the committed set or cloud (afrac, the per-channel lengths, a median, a table, the three caps, a layer's lengths and padding, the attribute shape, a stream too short, run out, or with a word unread, latents past layer 0's range): both decodes refuse it with the same code, the one section 8 gives; - at the edge of every check range: each layer of the committed set alone, lowered, takes tensor l's range [-X_l, X_l] from the full graph; an input at X_l runs to the same output both ways, and one at X_l + 1 is refused by the graph (field_range, input 0) and by run_net_checked (out of range, that layer). Registry: codecs::capability_ops gives wai.splat.int_codec {acc64, full, whm1/1, stage rans64 t4097/lenient/canonical}; registry/capabilities.json regenerated by `wai registry export`; the unit test names both capabilities. SPEC 5's row cites integer-payloads 6 and integer-operators 13.2; SPEC 7 names the capability. The CHANGELOG entry starts (the byte-equality matrix, the ops member). Co-Authored-By: Claude Opus 5.5 <[email protected]>86785571, with #243-#246, #250, #252) into wai/d2c-m2-m33bd4d566, #257 with main ataac73b5c) into wai/d2c-m3 3df705ddc35d4ae64c, with #253) into wai/d2c-m3