node:test context
used in the diagnostic label
WebGPU device instance
number of random inputs to generate (typically 100)
maximum allowed value from computeUlp
param specs from loadParam, or a pre-built fc arbitrary
async function that calls the GPU routine
function that calls the CPU reference
error metric: (gpuResult, refResult, args) => number
optional extra arbitraries for routine-specific params (e.g. srotm's param)
promise that resolves when all runs pass, or rejects on the first failing run
Runs
numRunsproperty-based random tests comparing the GPU routine against a CPU reference. Passes ifcomputeUlp(gpuResult, refResult, args) <= thresholdfor every run. Emits a diagnostic with the maximum observed value.