You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Publish the cross-API Acrobot artifact: implementations, equivalence gate, Colab runner
The paper's headline cross-API numbers (720x CUDA / 172x JAX / 27x Triton
vs per-step PyTorch on T4) had no published code. This adds it:
- benchmarks/colab/acrobot_impls.py — one canonical dynamics definition
(Gym "book" Acrobot, explicit Euler dt=0.05, matching the WebGPU shader
lineage) with five implementations: NumPy reference, per-step PyTorch
baseline, JAX lax.scan, hand-fused CUDA (CuPy RawKernel), Triton
- tests/acrobot_equivalence_test.py + CI job — NumPy/PyTorch/JAX must
produce IDENTICAL fitness for shared genomes in float64 (verified: 1.0000
match) before any timing means anything
- benchmarks/colab/acrobot_cross_api.ipynb — Colab notebook (GPU runtime)
that clones the repo, verifies GPU kernels against the same reference
(>=95% match required; chaotic-system caveat documented), then times all
implementations and saves a results JSON
- Label correction: the integrator is explicit Euler, not RK4 as earlier
table captions claimed; artifact note added to paper.tex including the
framework-versions-are-moving-targets caveat (cross-ref to the companion
transformer paper's v2 erratum)
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
* Add T4 re-measurement (Colab, 2026-07-28) with verified-equivalent kernels
Ran the notebook on a Colab Tesla T4 (python 3.12.13, torch 2.11.0+cu128,
jax 0.7.2, cupy 14.0.1). Equivalence vs the NumPy reference: torch 99.66%,
fused CUDA 99.63%, jax 99.63% (chaotic f32 flips; gate >=95%).
Timings (N=10 medians, POP=4096, 500 steps): per-step PyTorch 554.7ms
(1.8 gen/s), fused CUDA 3.15ms (317.3 gen/s, 176x), JAX lax.scan 16.5ms
(60.5 gen/s, 33.5x). v1's 720x/172x reflected a ~3x-slower torch —
qualitative result unchanged, ratios compressed. Also fixes the Triton
kernel for newer Triton (tl.math.tanh removed; manual tanh).
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
[](https://colab.research.google.com/github/abgnydn/webgpu-kernel-fusion/blob/main/benchmarks/colab/acrobot_cross_api.ipynb)
7
8
8
9
Fusing sequential fitness evaluations into single GPU compute shader dispatches eliminates per-step kernel launch overhead. We prove this across **4 GPU APIs on 2 hardware platforms** — the fusion advantage is **GPU-API-agnostic**.
9
10
10
11
## Key Results
11
12
12
-
**Same hardware: Tesla T4 (Acrobot-v1, 500 steps, RK4)**
13
+
**Same hardware: Tesla T4 (Acrobot-v1, 500 steps, explicit Euler dt=0.05 — earlier versions mislabeled this RK4)**
13
14
14
15
| System | gen/s | vs PyTorch |
15
16
|---|---|---|
@@ -52,6 +53,31 @@ The fusion advantage scales with dispatch overhead fraction. On compute-bound N-
0 commit comments