wai-ops/1-i32 on GPUs: WGSL kernels exact at acc32 and acc64, and the tier on the adapters a run showed equal (G1) #380
Loading…
Reference in a new issue
No description provided.
Delete branch "wai/ops-gpu"
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?
G1: WAI's integer operators (
wai-ops/1-i32) run on GPUs, and determinism-tiers claims the tier exactly as far as runs showed it. This closes the line "No decoder of these capabilities runs on either [GPU or NPU] in this revision, and the tier is not claimed there".What is in it
wai/wai-ops-gpu:wai-ops/1-i32(integer-operators §9.1) as WGSL compute kernels through wgpu, so Metal, Vulkan and DX12 natively, and a browser's WebGPU.acc32runs one word per value (itsproductintermediates formed from 16-bit halves).acc64implementation (integer-operators §7.3).layernorm_c,l2norm,softmax,sigmoidorelurun on the CPU, with the reason named.checktensor that leaves its range refuses the decode at its operator (field_range).wai-rs
ops_gpu(off by default):int_ops::run_graphis where every integer decoder runs a graph. Insideint_ops::gpu::with_gpuit runs each graph on the device.with_gpu_comparedalso runs the interpreter and compares every graph.Tests that do not pass on a skip:
ops-conformance/graph vector the subset covers, at both widths;wai-rs/tests/ops_gpu.rsdecoding the six integer capabilities' committed vectors and refusal fixtures with their graphs on the device.With
WAI_OPS_GPU_REQUIRE=1an absent adapter fails.determinism-tiers §5 and §6: the tier is claimed for
wai-ops/1-i32graphs on the adapters a run showed equal. Nothing is claimed for another adapter, backend or driver version, nothing for DX12, and nothing for NPUs. The adapters:tools/ops-gpu-bench: time, and energy where the host has a counter, per capability, on the CPU and on each adapter, every decode compared byte for byte with the CPU's.CI:
wai-ops-gpu.ymlruns the Metal and browser legs on themacosrunner, gated on this PR's own diff.Checks
wai-ops-gpu:cargo test --locked --releasewithWAI_OPS_GPU_REQUIRE=1on the build host's Metal GPU (re-run by the lead 2026-10-21)wai-rs --features ops_gpu,video_int,audio_int,splat_int,world_int --test ops_gpu(same host)wai-ops-gpu --all-targetsscripts/check-lockfiles.shSpeed and energy (
ops-gpu-bench --secs 3 --min-runs 5, build host, Metal, 2026-10-21)These are the committed test vectors, which are tiny. They measure dispatch overhead more than throughput, and no speed claim is made.
none, because another process used the GPU during each window: the host runs CI.Not done
wai-ops/1-npuon XDNA and others): a follow-up slice.wai-ops-gpu.ymlyet: this PR is its first.🤖 Generated with Claude Code