compute

command
v0.11.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 4, 2026 License: BSD-3-Clause Imports: 7 Imported by: 0

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL