mask-risc: absolute execution extent — execute_extent over [lo, hi) without rebasing - #1269
Merged
Merged
Conversation
…ithout rebasing execute_into is now execute_extent over 0..n_rows. A partial extent is an outer restriction in the same absolute row coordinates as Planes: only the words it touches are visited (extent_tiles), a cut word is restricted in a register at the terminal, lanes and masks are never copied or rebased, and the #1268 fused fold intersects the program's range with the extent. Partial extents accept Count/Any/All/MaskedSum/Min/Max (shipped merge laws) and Keep (writes only in-extent bits of its absolute Out::Mask); anything else is ExtentUnsupported. Foreign planes are key-addressed and never sliced. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GXUahz73MZxtxWcfpHp9dG
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GXUahz73MZxtxWcfpHp9dG
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GXUahz73MZxtxWcfpHp9dG
…ution extent Adds the N=1M dispatch-locality probe (fused / tiled / lane shapes over 1 row .. whole extents, oracle-checked), the D-WFL-EXTENT status row, and an append-only correction of #1267's 'rebasing every mask and lane' wording: the required property is correct absolute execution over an unaligned extent, met with word bounds and register edge masks. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GXUahz73MZxtxWcfpHp9dG
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: serverGenReqId_9507e83a-da1e-4826-abe2-87827191010e) |
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 67.74% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 31 functions across 6 files. (3 skipped: 3 unsupported.)
Comment |
AdaWorldAPI
marked this pull request as ready for review
September 23, 2026 14:33
…-only extent_tiles/ExtentTiles are executor detail (tile width, edge representation), so they drop out of the public API; the structural tile-plan test moves in-crate (exec::extent_tile_tests) and the probe reports touched words from the semantic span. execute_extent's doc and the board entry now state that partial Keep sinks compose in any SEQUENTIAL order only: an unaligned split shares a physical u64 and the edge merge is read-modify-write, so concurrent writers need word-disjoint ownership, separate partial sinks plus merge, or explicit synchronization. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GXUahz73MZxtxWcfpHp9dG
AdaWorldAPI
pushed a commit
that referenced
this pull request
Sep 23, 2026
Nine STATUS_BOARD rows still read "In PR" or "Queued" for work that has merged. Each flip was checked against origin/main before editing: - D-WFL-FUSE Shipped: single-op #1270, multi-op chains ≤3 planes #1272 - D-WFL-W2b‴ Shipped W2b-A #1268; W2b-B reuse burden stays OPEN - D-WFL-EXTENT Shipped #1269 (`execute_extent`) - D-WFL-T1-FUSED, T1-FUSED′ Shipped (ndarray #322 + #1270) - D-WFL-L0 Shipped #1251 - D-WFL-W2a Shipped #1268: un-gated Pred::Range, Count = hi−lo, Any = lo<hi, zero scratch (`run_fused`) - D-WFL-W2a′ Shipped #1268: `requires_scratch()` derived from the fused lowerings, never a caller flag - D-WFL-2 Partially shipped: range Count/Any landed as a lowering, the `BoundedMask` window is not built Status cells only; every row's description is unchanged, and the old status is kept after "was:" where it carried detail. The row count stays at 2203 lines. Also corrects one exec.rs comment that still described the Boolean fold as "a single 2/3-input op"; since #1272 it collapses whole chains. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GXUahz73MZxtxWcfpHp9dG
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.
Adds
execute_extent, which runs a mask-risc program over a slice of rows[lo, hi)in the same absolute row coordinates asPlanes. Nothing is copied or renumbered. This is the unit a future scheduler could split work on; no scheduler, threads, queues or rayon are added, and OQ-5 is not touched.API shape
execute_extent(program, planes, foreign, scratch, out, lo..hi).execute_intois nowexecute_extent(.., 0..n_rows), and the whole-population extent still accepts every terminal.extent_tilesis executor detail (tile width, edge representation), not API. The in-crate testexec::extent_tile_testspins that it covers exactlytouched_words(lo, hi)with edge masks only on cut words.Keepextents compose sequentially, not concurrently: partialKeepsinks compose in any sequential order. Concurrent execution requires word-disjoint sink ownership (boundaries on multiples of 64), separate partial sinks plus a merge, or another explicitly synchronized strategy — an unaligned split shares one physicalu64and the edge merge is a read-modify-write.lo > hiorhi > n_rowsreturnsExtentOutOfRange, and a terminal with no merge law returnsExtentUnsupported.Absolute-coordinate rule
The extent narrows which rows run; it never shifts row numbers. For example, program
Range [1000, 2000)over extent[1500, 1700)means[1000, 2000) ∩ [1500, 1700), which is 200 rows. Lane elementris rowr, and tile wordwis wordwof every stored mask, whatever the extent.How it is done:
Allsets the outside bits instead, since set bits are neutral for it.The fused
Range ∩ plane → Count/Anypath from #1268 intersects the program's range with the extent inside the same code. There is no second evaluator.What execution now skips / what still writes a bitmap
Keepwrites only the in-extent bits of its population-sizedOut::Mask. Every other bit stays as the caller left it, so disjoint extents can fill one buffer in any order.BlendI32, the two scatter terminals,CountKeyRunsU32,GroupSumI32/GroupSumViaI32,GroupReduce. The_symmerge law stays recorded only; nothing is built for it.Gatherlooks rows up by key, and a test pins that.Tests (
tests/extent.rs, 8 tests)Keeppartial results written into one buffer equal the whole-populationKeep.Range[1000,2000)over[1500,1700): Count is 200, andKeepsets exactly bits 1500..1700.Disable runs (committed first, then each file restored) — each breaks one mechanism and turns tests red:
Keepoverwrites the whole edge wordBenchmarks (
examples/extent_probe.rs, N = 1,048,576, results checked against an oracle)Cost follows the extent's width, not the population size. The word counts come from the extent's semantic span (
touched_words), which the in-crate tile-plan test pins the executor to cover exactly; not from instrumentation.What remains before scheduling
_symSUM are not built; those terminals are refused on partial extents.plane ∩ plane → Count, lane predicate → Count, ternlog → Count. With those, what gets split across workers becomes small algebraic programs rather than tile-writing bitmap machines.Board
entries/2026-09-23-absolute-execution-extent.md.D-WFL-EXTENT.main(135 on both).Verification
cargo test -p lance-graph-mask-risc: all suites green.cargo test -p lance-graph-quack: green, including the DuckDB differential.cargo clippy -p lance-graph-mask-risc -p lance-graph-quack --all-targets -D warnings: clean.cargo fmt: clean.🤖 Generated with Claude Code
https://claude.ai/code/session_01GXUahz73MZxtxWcfpHp9dG
Generated by Claude Code
Summary by CodeRabbit