Expand description
Consumer-facing runtime for the certified WGSL Forge.
Everything else in crate::wgsl_forge is about proving a kernel correct
(the differential oracle in oracle) and tuning
its schedule (tune + the topology-keyed ManifestCache). That machinery
always runs against deterministic, seed-derived test vectors so the GPU result
can be checked bit-for-bit against a CPU reference.
ForgeRuntime is the other half: once a kernel is certified, other modules
need to run it on their own real data, with no oracle, no comparison, and
no test-vector generation — just “feed my numbers in, run the auto-tuned
schedule, give me the answer back”. Each typed method wires its GPU buffers
identically to the matching evaluate_* in oracle
(same bindings, BindingUsages, *Params uniform blocks, dispatch
element_count, and output sizing) so the runtime path is the certified path —
the only difference is the source of the input bytes and the absence of the
CPU check.
The dispatch schedule comes from ForgeRuntime::tuned_schedule: when a
ManifestCache is attached and holds a tuning record for this hardware
topology, the cached winner is used; otherwise a documented per-kernel default
is used. Populate the cache for this machine with the CLI’s shader auto-tune-all (it tunes every built-in and writes a topology-keyed
[TuningManifest] per kernel).
Structs§
- Forge
Runtime - A ready-to-use handle for running certified forge kernels on real data.