Documentation
¶
Overview ¶
Command compute is a WASI container that computes on the GPU through wasi:webgpu and checks every result against the CPU: a vector add of 1M floats and a 256x256 matrix product.
GOOS=wasip1 GOARCH=wasm go build -o compute.wasm ./examples/compute wctr run --gpu IMAGE
It exits 0 when the GPU matched the CPU, 1 on a mismatch or an error, and 2 (printing "no GPU adapter") when the engine gives it no GPU: no --gpu, or no WebGPU where it runs.
Click to show internal directories.
Click to hide internal directories.