Skip to content

Commit 5c5974c

Browse files
abgnydnclaude
andcommitted
Add LICENSE, CI, CHANGELOG, README badges; bump v0.1.0
- LICENSE — MIT (was declared in package.json but file was missing). - .github/workflows/ci.yml — runs the paper-arithmetic test (54 derived numbers re-derived from the raw tables) on every push/PR. No GPU required, so CI is fast and reliable on default Ubuntu runners. - CHANGELOG.md — Keep-a-Changelog v0.1.0 entry with the headline Tesla T4 / M2 Pro / financial-sim / MountainCar tables and the cross-project links to zerotvm, webgpu-q, webgpudna, gpubench. - README badges (CI / MIT / live demo / paper-arithmetic test). - Bump package.json version 1.0.0 → 0.1.0 (matches the 'first release' framing of the v0.1.0 tag). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 619b6fd commit 5c5974c

5 files changed

Lines changed: 125 additions & 1 deletion

File tree

.github/workflows/ci.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
workflow_dispatch:
9+
10+
permissions:
11+
contents: read
12+
13+
concurrency:
14+
group: ${{ github.workflow }}-${{ github.ref }}
15+
cancel-in-progress: true
16+
17+
jobs:
18+
paper-arithmetic:
19+
name: paper arithmetic
20+
runs-on: ubuntu-latest
21+
steps:
22+
- uses: actions/checkout@v4
23+
- uses: actions/setup-node@v4
24+
with:
25+
node-version: 22
26+
# Validates every derived number (ratio, percentage, comparison) in
27+
# PAPER.md / README.md against the raw benchmark tables — catches
28+
# copy-paste errors and stale numbers without needing GPU access.
29+
- name: Verify paper arithmetic
30+
run: node tests/paper_arithmetic.test.js

CHANGELOG.md

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
# Changelog
2+
3+
All notable changes to this project will be documented in this file. The
4+
format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
5+
and the project follows [Semantic Versioning](https://semver.org/) starting
6+
from `0.1.0`.
7+
8+
## [0.1.0] — 2026-05-04
9+
10+
First public release of the kernel-fusion benchmark suite + paper companion.
11+
12+
### Headline results
13+
14+
**Same hardware: Tesla T4** (Acrobot-v1, 500 steps, RK4)
15+
16+
| System | gen/s | vs PyTorch |
17+
| ---------------------------- | ------: | ---------: |
18+
| PyTorch CUDA per-step | 0.61 ||
19+
| Triton fused | 16.4 | 27× |
20+
| JAX `lax.scan + vmap` | 105.1 | 172× |
21+
| **Hand-fused CUDA kernel** | **439** | **720×** |
22+
23+
**Same hardware: Apple M2 Pro** (Acrobot-v1, 500 steps, RK4)
24+
25+
| System | gen/s | vs PyTorch |
26+
| ----------------------------- | -------: | ---------: |
27+
| PyTorch MPS per-step | 2.52 ||
28+
| wgpu-native fused (Metal) | 30.5 | 12× |
29+
| WebGPU unfused (Chrome) | 62.3 | 25× |
30+
| **WebGPU fused (Chrome)** | **135.9** | **54×** |
31+
32+
**Financial sim** (M2 Pro, 1500 steps): WebGPU fused **46.2 gen/s** vs
33+
PyTorch MPS 0.29 — **159× speedup**.
34+
35+
**MountainCar-v0** (M2 Pro, 200 steps, sequential): WebGPU fused 1,258.8
36+
vs PyTorch MPS 18.7 — **67× speedup**.
37+
38+
### Added
39+
40+
- **Benchmark harness** (`benchmarks/`) — Rastrigin parallel optimization,
41+
Acrobot-v1 + MountainCar-v0 sequential RL environments, financial sim,
42+
N-Body sequential, Monte Carlo Pi, dim-scaling sweep, comprehensive
43+
multi-platform run, thermal monitoring.
44+
- **Cross-platform reference baselines** — PyTorch (MPS, CUDA), JAX
45+
(`lax.scan+vmap`), Triton, NumPy variance, wgpu-native (Rust), all using
46+
the same workload definitions for apples-to-apples comparison.
47+
- **Paper companion** (`paper.tex` + `PAPER.md`) — full LaTeX source +
48+
markdown reading copy. Conclusion: fusion advantage is GPU-API-agnostic
49+
(4 APIs × 2 hardware platforms verified).
50+
- **Paper arithmetic tests** (`tests/paper_arithmetic.test.js`, 54 checks)
51+
— every derived number (ratio, percentage, comparison) in the paper is
52+
re-derived from the raw tables to catch copy-paste errors and stale
53+
numbers. Wired into CI.
54+
- **Live demo** at https://kernelfusion.dev — the research umbrella for
55+
this and the companion projects.
56+
57+
### Companion projects in the same research line
58+
59+
- [zerotvm.com](https://zerotvm.com) — Phi-3-mini decoding via 10
60+
hand-written WGSL kernels (228 dispatches/token, ~40 tok/s on M2 Pro)
61+
- [webgpu-q](https://webgpu-q.vercel.app) — quantum many-body simulation
62+
with kernel fusion (4.18× brick-wall fusion, ITensor-validated)
63+
- [webgpudna.com](https://webgpudna.com) — Geant4-DNA Monte Carlo +
64+
Karamitros IRT chemistry in the browser
65+
- [gpubench.dev](https://gpubench.dev) — public WebGPU benchmark harness
66+
67+
[0.1.0]: https://github.com/abgnydn/webgpu-kernel-fusion/releases/tag/v0.1.0

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2026 Ahmet Baris Gunaydin
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# Single-Kernel Fusion for Sequential Fitness Evaluation via WebGPU Compute Shaders
22

3+
[![CI](https://github.com/abgnydn/webgpu-kernel-fusion/actions/workflows/ci.yml/badge.svg)](https://github.com/abgnydn/webgpu-kernel-fusion/actions/workflows/ci.yml)
4+
[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](./LICENSE)
5+
[![Live](https://img.shields.io/badge/live-kernelfusion.dev-6ea8ff)](https://kernelfusion.dev)
6+
[![Paper arithmetic](https://img.shields.io/badge/paper%20arithmetic-54%20%E2%9C%93-82c98b)](./tests/paper_arithmetic.test.js)
7+
38
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**.
49

510
## Key Results

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
{
22
"name": "webgpu-kernel-fusion-benchmarks",
3-
"version": "1.0.0",
3+
"version": "0.1.0",
44
"description": "Benchmarks for 'Single-Kernel Fusion for Sequential Fitness Evaluation via WebGPU Compute Shaders'",
55
"scripts": {
6+
"test": "node tests/paper_arithmetic.test.js",
67
"bench": "node benchmarks/bench.js",
78
"bench:rastrigin": "node benchmarks/bench.js --benchmark=rastrigin",
89
"bench:scaling": "node benchmarks/dim_scaling_benchmark.js",

0 commit comments

Comments
 (0)