| webgpu_available | 1 if a WebGPU adapter and device are available (initializes them). |
| webgpu_matmul | out [M, N] = a [M, K] . b [K, N], row-major. a and b share a dtype (fp32,
fp16 or bf16; products accumulate in fp32), out is any dtype. Queued. |
| webgpu_sgd_update | w[i] -= lr * g[i] for i < n, in place (any dtypes). Queued. |
| webgpu_sync | Waits for everything queued on the device (tensor work too). 1 on success. |
| webgpu_add_f32 | out[i] = a[i] op b[i] (or op a[i]) for i in [0, n): the inputs uploaded,
the op run, the result read back. 1 = done, 0 = no WebGPU (out untouched). |
| webgpu_sub_f32 | |
| webgpu_mul_f32 | |
| webgpu_div_f32 | |
| webgpu_pow_f32 | |
| webgpu_relu_f32 | |
| webgpu_log_f32 | |
| webgpu_exp_f32 | |
| webgpu_sqrt_f32 | |
| webgpu_scale_f32 | |
| webgpu_sum_f32 | out[0] = sum(a[0..n)): a reduction per workgroup, added atomically. |
| webgpu_matmul_f32 | out [M, N] = a [M, K] . b [K, N]. |