Conversation
…de detach, bit-exact f32::MAX literals Claude-Session: https://claude.ai/code/session_01AUTdnWQ8FGUP5FKR7dJsKs
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Five commits on top of
e42d26a89, split out of the backprop branch so they can be read on their own. The base branchbackprop-baseis pinned at that commit; nothing here changesbackpropor PR #430.The preview page never finished loading
https://floneum.github.io/kalosm/pr-preview/pr-430rendered and then froze within a few seconds. The tab was not crashing, it was deadlocked: the first replay-hit resolve arms the tuning clock, Chrome reportsTIMESTAMP_QUERY, andread_timestampsthen blocks the main thread on amap_asynccallback that only the event loop can deliver. wasm now never requests the feature, the same shape as the existing subgroup and cooperative-matrix gates, so every consumer takes its "not timed" path.Two more faults surfaced once the page ran:
detach()did a host round trip, which is unavailable on wasm. It is now a device-side copy through a newTarget::copy(pool allocation plus a queued buffer copy on GPU, anAlignedBufmemcpy on CPU).detach_asyncis an alias.3.4028235e38f, which is how naga printsf32::MAX, so any module containing that literal was invalid and the kernel silently never ran. Sampling read zeros. The emitter now spells the value asbitcast<f32>(bits)and refuses to const-fold to it.The full conformance suite passes in Chrome, on the deployed preview as well as locally.
The benchmark page was reporting fabricated wins
It claimed roughly 10x over burn on nearly everything. Three separate inflations:
Then two accuracy problems that survived those fixes:
Device::isolatedgives each case its own session and graph over the same backend, and the registry and the sweep both use it.performance.now()to 100 microseconds, so cheap cases sat on a handful of ticks and moved up to 3.1x between runs. The iteration count is now calibrated from an unrecorded probe round to land near 20 ms, capped at 256 so a round does not pin hundreds of live outputs.Measured over three consecutive full-page runs, the median run-to-run spread is 1.03x, and the widest is burn's own variance rather than the harness.
The resulting picture is mixed, which is the point. fusor is ahead on quantized paired SiLU (7.9x), Q4K gemv (6.8x), RMS norm (5.1x), rope (3.2x), Q8 gemv (2.9x) and layer norm (3.1x); behind on conv1d (15x), elementwise (1.7 to 2.7x), dense matmul (2.0x) and attention (1.7x). conv1d and dense matmul are the real gaps.
cargo run -p fusor-conformance --features burn-bench --example bench_compareand--example bench_sweep <case>run the same comparison natively. Note that native numbers do not predict the page: burn's readback carries a fixed ~35 ms cost natively that it does not have in a browser.Every route but the root 404'd
https://floneum.github.io/kalosm/benchmarks/dense_batched_matmulreturned GitHub's 404 page, and so did/benchmarks, on the live site and the preview alike. GitHub Pages has no single-page fallback: it answers any path the build did not write a file for with a 404, so the benchmark tabs were reachable by clicking through from the root and by nothing else. Not a link, not a reload, not the back button after a reload.The build and publish steps are both reusable workflows this repo only calls into, so the fix is in the app: the router now keeps the route in the URL fragment. Every URL asks the host for the one page that exists. Verified against a plain static file server, which is the same thing Pages does:
/#/benchmarks/dense_batched_matmulloads the detail page directly and runs its sweep, and/#/testsreloads into a passing suite.Links change shape, from
/benchmarks/<case>to/#/benchmarks/<case>.Conformance ran for 17 minutes
The binary force-set
FUSOR_VERIFY_MEMBERS=1, which races every e-class member of every launch to value-check it, on every fuzz run of every case. One small sampling case executed about 470 candidates, and sampling alone was 72% of the suite.The sweep is now a runtime flag rather than an environment read, and
fuzz_caseturns it on for one run per case, chosen per case so the swept shape varies across the suite. 17m39s to 1m43s, same 746 results, 737 passed, 9 skipped, 0 failed. The trade is per case: kernel variants are swept at one shape instead of three.Verification
cargo fmt --check, and the fusor unit tests are clean.cb89fd95f.https://claude.ai/code/session_01AUTdnWQ8FGUP5FKR7dJsKs