Repository navigation
Raise block_size default to 8192 - #229
Merged
Merged
Conversation
4 of 5 tasks
This was referenced Aug 15, 2026
Merged
6 tasks done
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.
Partially addresses #216: the default itself. Measured on the bundled 32-channel sample, this machine (Apple Silicon), 20 iterations, seed 42.
~6x on CPU float64. 8192 rather than the fastest value because peak block memory scales with it: at 256 channels 8192 costs ~240 MB per model against ~960 MB for a single block, and the default has to stay safe on large recordings. 16384 is 16% quicker for double the memory, which is not a good trade for a default.
Changed in all three array backends (PyTorch, MLX, NumPy — the last was still on 128) per
.rules/backend_parity.md.Parity
block_sizeshifts the multi-iteration trajectory ~1e-6 — well inside parity tolerance, and per-iteration sufficient statistics stay block-size-independent to 1e-8 (test_blocking_invariance). It is not free, though: a bit-for-bit comparison against the binary must set the same value on both sides. The parity harness already does (sample_params.jsonandinput.paramboth pin 512), and the docstring and AGENTS.md now say so.Not included
The rest of #216 — correcting the published MPS claims in
paper.md,AGENTS.mdanddocs/guides/backends.md— is deliberately left out. My MPS numbers disagree with the ones in the issue by ~14x (187 ms vs 13.5 at single block; MPS never beats CPU here), so the correct figures are not established, and rewriting performance claims in a paper under review on unreconciled measurements would be worse than leaving them. The CPU result above reproduces on both machines and stands on its own.Note
test_end_to_end_correlation_vs_fortran_from_sample_params_jsonfails in full-suite runs on this branch. It fails identically on unmodifiedmainand passes in isolation both with and without this change: the reference binary is not reproducible run-to-run. Tracked as #228, not caused here.