Repository navigation
Construct linear-work owner staging for all selected P104 scalars - #6527
Merged
Merged
Conversation
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.
All 19,288 selected P104 scalar events now have a four-tape owner-to-local-circuit construction. Whole fields move to two clean staging tapes, execute PR6513's physical circuits, then return to their exact owner slots. Every transfer, unit head move, control read, write and cleanup is charged.
At W=64, the complete scalar cost is 1,236,161,936 D − 5,196,390 physical operations for every positive payload dimension D. The exact all-D certificate proves the minimum over the stated acquisition/return orders. Its 41,232 states satisfy symbolic affine edge inequalities on the whole ray D>=1; numerical interpolation is not treated as proof.
The initial coordinate-at-a-time design is retained as a matched baseline. Whole-field staging saves 822,169,424 moves at D=1 and 463,823,251,912 at D=17. The memory tradeoff is explicit: 256D clean staging bits instead of 128. Both use one carry, two finite-control bits, four tapes and the same 102,272D-bit field-major owner backing. Whole-field batching removes the quadratic scalar acquisition travel at fixed width.
All source lifetimes, four exact dimension comparisons and 86 literal physical fixtures pass. The fixtures cover all 43 templates at D=1,2, check 8,289,870 metered operations and every untouched owner bit, and restore all staging/carry/head state. Five semantic controls reject bad potentials, a wrong total, aliased source roles, dirty destinations and aliased tapes. This is not a literal whole-word native execution.
Reproduce:
python3.12 -B scripts/research_package.py --package research/p104-owner-scalar-staging.Native calls, actual reset, initial layout construction, uniform encoded-dimension control, complete supplier funding and outer admission remain open. The owner returns at every external boundary; that external operation must preserve the field layout and return clean workspace and heads. The 7,936D reset requests are explicit and unimplemented. No new kappa or selected-frontier change.
Advance claim and workspace scope update. Canonical main, revision 8 and live overlap were refreshed before submission. Credit Sagar Thakrar / PR3241, Nick Petalas's scalar circuits, PR6511/6513, DreamingOfClouds / PR6030, David Sanders's distinct QQ16 sweep-scheduling precedent, Nick Petalas / PR2722 and the retained native/compiler lineage. Ali Romman with substantial OpenAI Codex assistance; no subagents. Apache-2.0.
Verification at
c32444cf6534e16dbde00f5ae0fd6009be989b44: CPython3.12.14 registered normal/optimized checks, committed bytes/modes, official source export and read-only Git-free/empty-PATH replay in both modes pass. The cold archive SHA256 is28aff27e7b8f3671a22621e991c321bc2ecd8a76f69b04db678e43b378add82a. Hosted CI is pending. The optional full-history preflight was not run in this shallow checkout. Exact predecessor bytes and origins are committed; no side-branch object is needed for replay. Arithmetic alignment and signed-range contracts remain inherited. Independent human and proof-kernel acceptance are not claimed.