Skip to content

spikes/webgpu: compare candle and vectoron on the CPU - #61

Merged
setoelkahfi merged 3 commits into
developmentfrom
spike/webgpu-engine-bench
Nov 28, 2026
Merged

setoelkahfi merged 3 commits into
developmentfrom
spike/webgpu-engine-bench

Conversation

@setoelkahfi

@setoelkahfi setoelkahfi commented Nov 25, 2026 •

Copy link
Copy Markdown
Collaborator

Adds a CPU harness for vectoron next to cpu-baseline, so candle and vectoron can be compared on the same runner in the same job. The spike only ever measured candle. The results are recorded in findings.md.

vectoron-cpu runs the same prompt, prefill chunk, greedy decode loop, result schema and release profile as cpu-baseline, in the browser and natively, and depends on vectoron 0.3. engine-bench.yml builds both, runs them back to back on macos-26 (Chrome, WebKit) and ubuntu-latest (Chrome), and report.mjs puts the rows in one table. Hosted runners only.

Run 45602570325, bench.json, wasm simd128, no yields, with vectoron at d15c228 (0.3.0 apart from a test helper and the manifest):

wasm candle prefill / decode vectoron 0.2 vectoron 0.3
macos-26 Chrome 31.0 s / 4.5 tok/s 10.8 s / 2.4 7.7 s / 10.3
macos-26 WebKit 35.0 s / 4.6 9.9 s / 3.2 6.9 s / 12.2
ubuntu Chrome 44.6 s / 3.6 11.0 s / 1.7 10.2 s / 7.4

Peak Chrome memory is 1.0 to 1.3 GB for vectoron and 2.0 to 2.3 GB for candle. Natively on macos-26, candle still decodes faster (20.3 against 18.5 tok/s), which does not apply to the single-threaded web engine.

The first generated token differs between the engines. That is a near-tie, not a bug: the top two logits are within 0.07 of each other in both, with the same top five. The report's "first 20 tokens vs native CPU" column is therefore not a useful cross-engine check.

Notes for review:

@setoelkahfi
setoelkahfi added this pull request to stack #53 November 25, 2026 10:53
@setoelkahfi setoelkahfi self-assigned this Nov 25, 2026
@setoelkahfi
setoelkahfi force-pushed the spike/webgpu-engine-bench branch from ec470e2 to 2fcd6bd Compare November 25, 2026 10:54

@sigit-code-review sigit-code-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change introduces a new CPU benchmarking harness for the vectoron engine, alongside the existing candle-based cpu-baseline, enabling direct performance comparisons in both browser (wasm) and native environments. The new workflow (engine-bench.yml) builds and runs both engines on macOS and Ubuntu runners, collecting results in a unified format for reporting. The vectoron-cpu harness mirrors the cpu-baseline's prompt, decode loop, and result schema, ensuring comparability. The report script and workflow triggers are updated to handle the new engine and avoid unnecessary reruns. The implementation appears robust, with careful error handling and matching measurement logic. No critical or warning-level issues are present in the new or modified code.


Automated review by siGit Code Review · commit ec470e2 · see the review dashboard

@setoelkahfi
setoelkahfi force-pushed the spike/webgpu-engine-bench branch from 2fcd6bd to e39a8df Compare November 28, 2026 12:32
@setoelkahfi
setoelkahfi removed this pull request from stack #53 November 28, 2026 13:14
@setoelkahfi
setoelkahfi changed the base branch from fix/webgpu-spike-shellcheck to spike/webgpu November 28, 2026 13:14
@setoelkahfi
setoelkahfi force-pushed the spike/webgpu-engine-bench branch from e39a8df to 84e6b2d Compare November 28, 2026 13:14
@setoelkahfi
setoelkahfi added this pull request to stack #66 November 28, 2026 13:15

@sigit-code-review sigit-code-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change adds a CPU benchmarking harness for the vectoron engine alongside the existing candle-based cpu-baseline, enabling direct comparison of both engines in the same CI job and with the same prompt/config. The new vectoron-cpu crate is structured to match cpu-baseline, with a native bench binary and a wasm harness for browser runs. The workflow engine-bench.yml builds and runs both engines on macOS and Ubuntu runners, in Chrome and WebKit, and collects results for reporting. The findings.md and report.mjs are updated to include and explain the new results. No critical or correctness issues are apparent in the new code or workflow. The implementation matches the described intent and is careful to keep the two engines' runs comparable.


Automated review by siGit Code Review · commit 84e6b2d · see the review dashboard

Base automatically changed from spike/webgpu to development November 28, 2026 13:31
setoelkahfi and others added 3 commits November 28, 2026 14:31
vectoron-cpu is cpu-baseline with vectoron 0.2 in place of candle: same
prompt, prefill chunk, greedy decode loop, result schema and release
profile.

engine-bench.yml runs both engines back to back in one job per runner and
browser, plus native on macos-26 and ubuntu, so each pair of numbers
comes from the same machine. It has its own workflow so that engine work
doesn't rerun the GPU matrix, and webgpu-spike.yml now ignores these
files.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: siGit Code v1.7.10 <noreply@sigit.si>
Co-Authored-By: OndeCode v1.1.2 <noreply@ondeinference.com>
The push trigger named only spike/webgpu, so a branch stacked on it
could not run its own benchmark before merging.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: siGit Code v1.7.10 <noreply@sigit.si>
Co-Authored-By: OndeCode v1.1.2 <noreply@ondeinference.com>
…sults

vectoron 0.3.0 is on crates.io, so vectoron-cpu depends on it instead of
the 0.2 baseline. findings.md gets the candle and vectoron numbers from
run 45602570325, including the near-tie that makes the first token differ
between the engines.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: siGit Code v1.7.10 <noreply@sigit.si>
Co-Authored-By: OndeCode v1.1.3 <noreply@ondeinference.com>
@setoelkahfi
setoelkahfi force-pushed the spike/webgpu-engine-bench branch from 84e6b2d to 02b6f29 Compare November 28, 2026 13:32
@setoelkahfi
setoelkahfi merged commit 6821d93 into development Nov 28, 2026
27 checks passed
@setoelkahfi
setoelkahfi deleted the spike/webgpu-engine-bench branch November 28, 2026 13:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants