Published May 4, 2026 | Version v6
Preprint Open

Single-Kernel Fusion for Sequential Fitness Evaluation via WebGPU Compute Shaders

Authors/Creators

  • 1. Independent Researcher

Description

Fusing sequential fitness evaluations into single GPU compute shader dispatches eliminates the per-step kernel launch overhead that dominates framework-based GPU computation. On a 1,500-timestep financial simulation, a WebGPU compute shader achieves 46.2 gen/s — 7.2× over JAX GPU with lax.scan+vmap (6.43 gen/s on Tesla T4) and 94× over PyTorch CUDA. On Acrobot-v1 (500 timesteps, RK4), the gap narrows to 1.29× over JAX GPU, revealing that the fusion advantage scales with episode length L. JAX GPU dominates on embarrassingly parallel Rastrigin (1,164 vs 170 gen/s), confirming the advantage is specific to sequential workloads. A native Metal baseline via wgpu quantifies Chrome's browser overhead at 1.92×. We show torch.compile fails at L≥1,000 and that WebGPU dominates CMA-ES across all tested dimensionality regimes. The insight — hand-fused compute shaders outperform even XLA-compiled loop fusion on long sequential fitness functions — applies beyond WebGPU, and WebGPU makes such fusion accessible with zero installation.

vnext changes: v6: cite Maczan (arXiv:2604.02344); add §4.13 cross-vendor crowdsourced validation across 7 GPU vendors / 92 unique devices; replace Limitations 'Tesla T4 only' with multi-architecture distribution (Pascal/Turing/Ampere/Lovelace/Blackwell); arithmetic suite extended to 84 checks.

Files

paper.pdf

Files (458.5 kB)

Name Size Download all
md5:3bd2144a292af564b53302831d686149
458.5 kB Preview Download

Additional details

Software