FastWan WebGPU Bench
fastwan-rs · WebGPU backend

FastWan WebGPU Bench

Runs the WGSL kernels of the fastwan-rs WebGPU backend on this machine's GPU, including video sparse attention (VSA), checks each one against an f32 JavaScript reference, measures throughput at Wan 2.1 1.3B shapes, and estimates how long a 3-step DMD clip would take here.

Device

detecting

Kernel conformance

waiting for the GPU
KernelCaseRel. errorResult

Pass means max |GPU − reference| / max |reference| ≤ 2·10⁻³. Weights go to the GPU as f16 pairs packed in u32, as the Rust backend stores them; the reference uses the unrounded f32 weights, so the f16 cases measure the real storage error.

Throughput

KernelShapems / callTFLOP/s
Not run yet. Takes 10–60 s on a desktop GPU; the tab may stutter while it runs. On a weak or software GPU, add #quick to the address for small shapes.

Clip estimate on this GPU

3 DMD steps · 30 layers · VSA 0.8
GeometryTokensLargest bufferFits bindingPer step, VSADenoise, VSADenoise, dense

FastWan runs video sparse attention: each 4×4×4 tile of tokens attends to the 20% of tiles its coarse scores rank highest, plus a gated coarse term. Per-step time is the FLOP count of one DiT forward split into GEMM work and attention work, each divided by the rate measured above (VSA's measured at the 480p grid). It leaves out the norms, the decoder and dispatch overhead, so treat it as a lower bound. On an RTX 4090 the native engine measured about 65 s per 480p VSA step through Vulkan.