math-webgpu-sandbox
MATLAB-syntax scripts compiled to fused WebGPU compute kernels — time them with
tic/toc, then paste the same script into MATLAB and compare.
source
script.m — valid MATLAB
output
compiled GPU plan & kernels
The GPU computes in f32 (WebGPU has no f64) — for the closest MATLAB comparison,
use single arrays there. rand is deterministic here:
statistics match MATLAB's, individual draws don't. Unsupported constructs fail
with a compile error rather than a wrong answer.