WAI on GPUs: decode-equivalence's conditions with WGSL's integer semantics suite; Media Capabilities and WebCodecs in dispatch #452

Closed
dcharlot wants to merge 10 commits from wai/gpu-int-tier into wai/cross-fabric

2026-10-22

Transaction Science
wai CHANGELOG: the GPU tier's conditions, and platform decode in dispatch
Some checks failed
joule-moq-room room service / joule-moq-room · does this change touch it (pull_request) Successful in 7s
joule-moq-web browser client / joule-moq-web · does this change touch it (pull_request) Successful in 6s
wai-web reach builds / wai-web reach · does this change touch it (pull_request) Successful in 10s
joule-moq-room room service / joule-moq-room, every target (pull_request) Successful in 1m1s
wai-quantum WebGPU member / member · discrete GPU, Vulkan (jetson-hub) (pull_request) Successful in 28m19s
WAI conformance / independent verifiers · claims, JWP, key discovery and integer payloads (Python) (pull_request) Successful in 27m0s
WAI conformance / cargo-class corpora · linux (pull_request) Failing after 2m20s
WAI conformance / cross-arch byte-equality · linux (pull_request) Successful in 27s
WAI conformance / quantum core and corpus under wasm32-wasip2 (wasmtime) (pull_request) Successful in 2m5s
wai-ops-gpu integer operators on GPUs / builds · no adapter is not a pass (linux) (pull_request) Successful in 2m29s
wai-pack / wai-pack · linux (pull_request) Successful in 3m6s
wai-quantum studio and desktop / studio · browser (pull_request) Successful in 4m18s
WAI energy receipts / energy receipts · linux (pull_request) Successful in 10m4s
wai-quantum WebGPU member / member · software Vulkan (linux) (pull_request) Successful in 2m12s
wai-quantum WebGPU member / shader checks · browser build · wasip2 inertness · MSRV (pull_request) Successful in 3m14s
wai-web wasm32 / wai-web wasm32 build · corpus, menu and writers (pull_request) Successful in 4m12s
WAI mbt2018_mean integer decode (regenerated vectors) / regenerate mbt2018_mean integer vectors → Rust decode, required (pull_request) Successful in 5m24s
wai-web reach builds / wai-web reach builds · the package of record, every output as recorded (pull_request) Successful in 2m53s
wai-web reach builds / wai-web reach builds · this tree's wai-web, every rung on its engine line (pull_request) Successful in 4m5s
standards workspaces build + test / macOS energy backends (pull_request) Successful in 7m39s
WAI conformance / cargo-class corpora · macos (pull_request) Failing after 1m37s
WAI conformance / cross-arch byte-equality · macos (pull_request) Successful in 17s
WAI conformance / codec wrappers · fuzz smoke, text decode limits, C entry points, provenance, the semantic path (pull_request) Successful in 39s
WAI energy receipts / energy receipts · macos (pull_request) Successful in 3m45s
wai-ops-gpu integer operators on GPUs / Metal GPU and browser WebGPU (macos) (pull_request) Successful in 2m19s
wai-pack / wai-pack · macos (pull_request) Successful in 2m15s
wai-quantum studio and desktop / desktop app · macos (pull_request) Successful in 1m50s
wai-quantum WebGPU member / member · Metal (macos) (pull_request) Successful in 2m13s
wai-quantum WebGPU member / member · browser WebGPU (macos) (pull_request) Successful in 1m29s
joule-moq-web browser client / joule-moq-web · browser end-to-end (macos) (pull_request) Successful in 5m47s
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-22 13:46:18 -04:00
Transaction Science
wai-web: the platform_decode bundle, and a page that runs it against the platform
platformQuery and platformOrder bind wai::platform_decode behind the
platform_decode feature, built as its own bundle, so the main bundle is
unchanged. demo/platform_decode.html queries and decodes every AV1 floor
object of the packaging corpus through WebCodecs with the derived
configuration, asks about the same family at 1920x1080, encodes HEVC with
the platform's own encoder and decodes it back with the codec string read
from the stream, and orders a learned entry and an AV1 entry from the
answers; verify_platform_decode.mjs drives it in a headless browser.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-22 13:46:18 -04:00
Transaction Science
platform-decode: Media Capabilities and WebCodecs in dispatch
A new extension, from Media Capabilities (WD 18 October 2026), WebCodecs
(WD 19 October 2026) and its AV1 and HEVC registrations: the query a sink
forms from the payload, never from what an encoder declared; supported:
false making the capability unsupported for that object; smooth and
powerEfficient ordering only, never written as energy; prefer-hardware a
hint, not evidence of hardware; the default order and the WAI1 advertising
rule; the energy budget read from energy-measurement. SPEC §4 and §7.1
point to it. §6 records a browser run on an arm64 desktop.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-22 13:46:18 -04:00
Transaction Science
wai-rs: platform decode capabilities in dispatch (platform-decode)
wai::platform_decode: the query a sink makes of Media Capabilities and
WebCodecs for an entry, read from its payload (AV1: the AV1-ISOBMFF codec
string from the sequence header, full where the stream is not 4:2:0
BT.709 studio range; HEVC: the Annex E.3 string, cropped and coded sizes
and bit depth from the SPS); the answers; the energy budget as read from
energy-measurement (OnChipCounter, measured, on a reference sink); and the
default order, a SPEC §7.1 deployer policy: power-efficient classical
decode and budgeted learned decode first, then smooth, then other
classical, then learned without a budget, manifest order within a rank.
select() runs §7.1 in that order; advertise_for_envelope() is the WAI1
rule. Pure logic, no feature, no dependency.

platform-decode-conformance: order.json (every rule, and the WAI1 cases)
and queries.json (packaging-corpus floors, and an SPS a hardware encoder
wrote whose level is not the one it declared). The tests also derive
every corpus floor to its HLS master's codec string and size, reproduce
the AV1-ISOBMFF examples, read SPSs with sub-layers and emulation
prevention, and catch each rule turned off.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-22 13:46:18 -04:00
Transaction Science
ci(wai-ops-gpu): the semantics suite and the WGSL rules on every leg
The Metal leg requires the semantics line with every guarded case equal
and the edited semantics kernel refused, and counts sixteen tests; the
browser step runs the vectors against the wasm32 reference under Node and
requires the page's semantics lines; the linux leg's absent-adapter check
covers tests/semantics.rs. wgsl-conformance is a trigger path.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-22 13:46:18 -04:00
Transaction Science
determinism-tiers §5: claiming decode-equivalence on a GPU
The conditions under which a decoder may claim the tier for output its GPU
computed, from WGSL (CRD 21 October 2026) and naga 30.0.1 as read: integer
only, so no reassociation or fusion (WGSL §15.7.5) can change a result; no
subgroup or quad operation and no extension (§15.5, §15.6.3); no result
that depends on scheduling and no out-of-bounds access (§6.5.7); the
translator's integer guards on, and no operation it leaves to the hardware
reached; the WGSL integer semantics vectors and the implementation's probe
passed first, on that adapter; the claim naming adapter and translator.

The GPU bullet lists the adapters on which this revision's kernels passed:
Metal, a browser's WebGPU, Vulkan on Linux and Windows, DX12 on Windows,
with the capability corpora decoding to the CPU's bytes on each but the
browser. The 0x1002 adapter, which passed on the previous kernel text and
has not run the suite, is no longer claimed. §6's row records the run.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-22 13:46:18 -04:00
Transaction Science
wai-ops-gpu browser: the semantics suite through the browser's WGSL compiler
run_semantics holds the committed vectors to the reference compiled to
wasm32 in the page and runs them, with SplitMix64 cases, on every adapter
the page is offered; semantics_reference.mjs does the first half under
Node, with no GPU. run.mjs serves wgsl-conformance and, under
WAI_OPS_GPU_REQUIRE, requires both lines.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-22 13:45:33 -04:00
Transaction Science
wai-ops-gpu: the shipped shaders held to the GPU tier's rules on naga's IR
tests/wgsl_rules.rs parses every shipped module with naga 30.0.1 and
validates it with no capability, then holds it to determinism-tiers §5's
GPU conditions: bool, i32 and u32 only, a closed list of expressions and
integer built-ins, one atomic kind with its result unused, no barrier or
workgroup memory, shift amounts masked below 32 and clamp bounds literal
and ordered, every integer operation one the semantics suite runs, and
naga's guards (naga_div, naga_mod, naga_neg, naga_abs, signed arithmetic
through unsigned) in each module's MSL and HLSL. It holds the crate to the
checked create_shader_module, and shows nine planted violations each
refused by the rule it breaks. naga enters as a native dev-dependency, the
release wgpu 30.0.1 already locks.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-22 13:45:32 -04:00
Transaction Science
wai-ops-gpu: every run-time shift amount masked, the run-time clamps as min(max())
naga 30.0.1 passes a shift amount to MSL, HLSL and SPIR-V without reducing
it modulo 32, and writes an integer clamp as MSL's clamp, which leaves
bounds out of order undefined. The kernels already handled every shift of
32 or more explicitly and load refuses lo > hi; masking each run-time
amount with & 31u and writing the two run-time clamps as min(max(e, lo),
hi) gives WGSL's result unchanged and makes the translated code defined on
every backend. The clamp mutant follows its text.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-22 13:45:32 -04:00
Transaction Science
wai-ops-gpu: WGSL's integer semantics on every adapter before it runs a graph
A suite of every integer operation WGSL defines on i32, u32 and their
two-component vectors, at the run-time cases MSL, HLSL and SPIR-V leave
open: wrapping arithmetic and negation, division and remainder by zero and
of the most negative i32 by -1, shift amounts 0..40 and past them, clamp
bounds in and out of order, bit fields at and past the word. Each result is
written from the WGSL text (semantics::reference), never from a shader.

Discovery runs it after the arithmetic probe and refuses an adapter that
differs on a guarded case. The cases no kernel reaches (a shift of 32 or
more, clamp bounds out of order) are marked unguarded: reported, not
deciding. wgsl-conformance/integer.jsonl holds the edge cases, written by
wai-wgsl-vectors; tests/semantics.rs holds the file to the reference, runs
it and SplitMix64 cases on every adapter, and shows a remainder written by
hand refused at discovery.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-22 13:45:32 -04:00