Warp is the TypeScript SDK for WebGPU. Run neural networks, physics simulations, and parallel compute directly on your users' GPUs. Zero servers. Near-zero latency. Ships to Chrome, Firefox, Edge, and Safari.
import { gpu } from '@warp/core'
// Define a compute kernel in WGSL
const vectorAdd = gpu.kernel`
@compute @workgroup_size(64)
fn main(@builtin(global_invocation_id) id: vec3u) {
out[id.x] = a[id.x] + b[id.x];
}
`
// Execute on the user's GPU
const result = await gpu.run(vectorAdd, {
a: new Float32Array([1, 2, 3, 4]),
b: new Float32Array([5, 6, 7, 8]),
})
// → Float32Array [6, 8, 10, 12]How it works
Warp abstracts the WebGPU boilerplate so you write compute logic, not pipeline setup.
Define your compute shader in WGSL using Warp's typed template tag. Full TypeScript autocompletion for bindings and inputs.
Pass typed arrays as inputs. Warp handles buffer allocation, bind group setup, and pipeline compilation automatically.
Your kernel runs on the end user's GPU in Chrome, Firefox, Edge, or Safari. No GPU servers. No cold starts.
Features
Full type safety across kernel inputs, outputs, and buffer bindings. Catch mismatches at compile time.
Kernels execute on the end user's GPU. No GPU cloud instances, no billing surprises, no cold-start latency.
Load ONNX models, run custom attention kernels, and chain inference pipelines entirely client-side.
Direct mapping to the WebGPU compute pipeline. No abstraction overhead, no magic — just clean ergonomics.
Real-time GPU timing, memory visualization, workgroup heat maps, and a shader debugger in the browser DevTools.
Automatic feature detection and graceful fallback to WebGL2 or WASM for browsers without WebGPU support.
Use cases
If it can run on a GPU, it can run in the browser with Warp.
Run quantized language models, embeddings, and image diffusion directly in the browser. No API keys, no rate limits, no privacy tradeoffs.
Scientific charts, geospatial heatmaps, and particle systems that would bring a CPU to its knees — rendered in real time.
Physics engines, fluid dynamics, molecular modeling, and numerical solvers — deployed to any device, offline-capable.
Real-time audio processing, procedural generation, image filters, and shader art — running instantly with no install.
Free to start. No GPU infrastructure required. Your users bring the hardware.