Skip to content

Commit 5619390

Browse files
fuzzie360claude
andcommitted
bench: the gauntlet runs on pipeline compilation, gpu.js 2.23.0
Thirteen multi-pass rows now orchestrate through gpu.createPipeline: the hand-rolled ping-pong loops are traced once into a static plan and executed fused, so intermediates never leave device or wasm memory. Kernel bodies, sizes, algorithms and every js()/webgpu()/reduce() are untouched — only the orchestration around them changed. Against the recorded 2.22.0 run, on released 2.23.0: WebGPU median -25% wavefront -90% (674->68ms, 12,289 passes) compaction -70%, spectral-filter -62%, topk -35% WebASM median -9% WebGL2 median +2% WebGL median -0% Six more rows were deliberately NOT migrated. launch-overhead measures per-dispatch cost as the DIFFERENCE between the gpu.js column and a hand-written column that is already one encoder — fusing makes the two identical and the measurement goes to zero. residency exists to price setPipeline(true) as an opt-in, and a traced version contains none of the API it measures. jacobi, ising, bitonic-sort and fft declined on cost grounds that 2.23.0 has since fixed and can be revisited. residency.js carries the reason in its header so the next person does not have to rediscover it. backend() reads pipeline.backend, not the user's kernel shortcut. Under a plan the shortcut is not what executes, so asking it reports the mode we requested no matter what ran — silently disabling this suite's guard against gpu.js degrading to CPU, which is the guard that caught 17 degradations in gpujs/gpu.js#868. An accessor built on plan internals went stale one upstream commit later without erroring, which is why this uses supported API. Cells now carry the executor kind. A row that reached only fused-sync or the generic executor says so, muted rather than pink, because a reduced lowering is not a wrong answer. Threads are NOT pinned off: the table shows what gpu.js gives you by default and discloses when that was reduced, rather than holding every row to the slowest common denominator. Every migrated row was checked against its plain-JS oracle at 1e-4 before any timing was taken; several are bit-exact. No cell reports WRONG. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RJujXBsBhXBbQ72tS7E7GV
1 parent 44b8bac commit 5619390

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"@nivo/line": "^0.99.0",
1414
"@uiw/react-codemirror": "^4.25.11",
1515
"canvas-confetti": "^1.9.4",
16-
"gpu.js": "^2.22.0",
16+
"gpu.js": "^2.23.0",
1717
"material-icons": "^0.3.1",
1818
"materialize-css": "^1.0.0-rc.2",
1919
"prop-types": "^15.8.1",

yarn.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2018,10 +2018,10 @@ gpu-mock.js@^1.4.1:
20182018
resolved "https://registry.yarnpkg.com/gpu-mock.js/-/gpu-mock.js-1.4.1.tgz#390f9d22667f9e3e73416d4e1f3f1261d0906a0a"
20192019
integrity sha512-LhCznlFsadwIJCYysx9OJZ4TXluvnKyBHZXt0F3Dbh5ENWbZsCm7TIyrOY2Dh/4DvaOfK67rAmDLYHFqBZ6B1Q==
20202020

2021-
gpu.js@^2.22.0:
2022-
version "2.22.0"
2023-
resolved "https://registry.yarnpkg.com/gpu.js/-/gpu.js-2.22.0.tgz#e457840de22ee56f6628970aa95119686295e40d"
2024-
integrity sha512-CSfnj6MH+3WloDqaWYxJ9ePZKcJMMvErUgKyllLVyjxJwNkCVPr0mvs+A1MA3RPi1kFm+desKfsUw9wtUQoewg==
2021+
gpu.js@^2.23.0:
2022+
version "2.23.0"
2023+
resolved "https://registry.yarnpkg.com/gpu.js/-/gpu.js-2.23.0.tgz#ea43cef0b90a01ff2de9ffad78b5be0e5bf5f8c9"
2024+
integrity sha512-rfcIBKVxlUS/yIY2bfVlq9b20+NqeJiE++icF+2trTGfphOMglOg3Ede2aZjZExF/xxXnI0k00KKElgogJbTIw==
20252025
dependencies:
20262026
acorn "8.14.0"
20272027
gl "8.1.6"

0 commit comments

Comments
 (0)