Skip to content

D-RU-6 lab: block-sparse tile recursion (arm C) vs walk_mask and the dense tile path - #1648

Merged
AdaWorldAPI merged 5 commits into
mainfrom
ccr-0455e606-wmtsor-sparse
Oct 21, 2026
Merged

AdaWorldAPI merged 5 commits into
mainfrom
ccr-0455e606-wmtsor-sparse

Conversation

@AdaWorldAPI

@AdaWorldAPI AdaWorldAPI commented Oct 21, 2026 •

Copy link
Copy Markdown
Owner

Lab only. D-RU-6 stays Queued/Lab; nothing is admitted.

Follows #1647, which is merged. The base is main. Nothing was left behind on #1647's branch: git log origin/main..origin/ccr-0455e606-wmtsor is empty, and this branch merges cleanly into main.

What this adds

crates/crepe-plan-probe/examples/walk_sparse.rs, arm C. It compiles walk_tile.rs (arm B, #1647), which compiles walk_mask.rs (arm A, #1642). All three arms run on the same graphs and are checked against the same oracles.

C keeps B's binding, witness and projection. Its product differs from B's in five ways:

  • It skips tile triples with no edge tile or no delta tile. The delta holds only facts that are new this iteration.
  • It skips empty m × m blocks of the delta (m ∈ {16, 32, 64, 256}).
  • It skips rows of the edge tile that have no bits; these row maps are built once, before iterating.
  • It builds no broadcast or spread and runs no Ternlog per coordinate. mask-risc runs the per-tile update instead (AndNot, Or), and admit refuses Gather in both programs.
  • Every Rust index in the execution path is a loop coordinate. There is no bit scan, and an occupancy bit only decides whether work runs. The audit table is in the module docs.

walk_tile.rs changes only in visibility (pub(crate)) and a rustfmt pass. Its 24 tests are unchanged.

Results (release, medians of 5, ms)

fixture C/A count-only C/B count-only C/A end to end
sparse(512) 0.91× 0.21× 1.07×
clustered(512) 2.24× 0.23× 1.20×
dense(128) 2.12× 0.69× 1.47×
cyclic(300) 3.75× 0.18× 2.43×
chain(230) 0.69× 0.11× 0.82×
chain(700), UNCHECKED 0.30× 0.12× 0.59×
mixed(256) 10.1× 0.96× 1.58×
edges(512) 1.31× 0.46× 1.03×
edges(1024), UNCHECKED 2.10× 0.43× 1.07×
  • C against B: C is faster on every fixture.
  • C against A, end to end with preparation included: C wins only on deep, low-fan-out recursion. In that region only chain(230) is oracle-checked. C is near parity on sparse graphs and loses on dense, cyclic, clustered and mixed-length graphs.
  • Cost breakdown: binding and preparation are at most 3.1 ms on every fixture. Decoding dominates end to end everywhere except the chains.
  • Execution reads by value: A 98K–5.4M, B 0, C 0.
  • Memory, count-only: C matches B. Both are below A where A's dense planes are mostly empty and above A on small dense or cyclic graphs.

The full tables are in .claude/board/entries/2026-10-21-d-ru-6-sparse-compute.md: phases, work counts, microtile sweep, memory and reads by origin.

Tests

38 tests, including B's 24 and A's 8. They cover:

  • tuple-set equality with ascent, crepe, A and B at every microtile side;
  • alternative path lengths;
  • a zero-length ring with over-length edges;
  • a chain of 200 or more iterations across two foci;
  • completeness across foci at 255, 256, 257, 300 and 600 nodes;
  • edges at every 16, 32 and 64 block boundary;
  • a row-OR bound that only a semi-naive delta satisfies;
  • refusals: stale witness, escaping scope, focus cap, a gather in either update program.

CI gains cargo test --example walk_sparse.

Disable runs

All were committed first, then reverted.

Disable Red
block occupancy not refreshed 9 tests
block skip inverted 9 tests
inner coordinate off by one 9 tests
row occupancy from the wrong word 9 tests
length bound made exclusive 6 tests
witness check, admit, escape refusal removed one test each
delta keeps re-derived facts (naive evaluation) the bound test

On the naive-delta disable: the result stays correct, so only the bound test catches it. The bound test's first version used a chain and stayed green, because a chain has no alternative derivations.

What this does not show

  • ADMISSION B. The row ORs C executes are exactly those a bit scan would find. C differs from A in how a position is obtained, not in which work is done. Whether that meets the intent of ADMISSION B needs a ruling.
  • The size of the winning region. It is narrow. Before starting the codebook attestation contract, two things would help: a sweep over chain length and fan-out, and a check of whether an unchanged-frontier skip ported into walk_mask removes C's advantage there.

No merge on green alone. Coordination: EXO-50.

🤖 Generated with Claude Code

https://claude.ai/code/session_01G22yT6htkcdyXsihxxXdrg

…rojection

No behaviour change; the 24 walk_tile tests are unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01G22yT6htkcdyXsihxxXdrg
…rse)

Same binding and projection as walk_tile; the product skips empty tile
triples, unoccupied m x m delta blocks and absent rows, with no broadcast,
spread or per-coordinate Ternlog. Every index is a loop coordinate.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01G22yT6htkcdyXsihxxXdrg
…aive delta goes red)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01G22yT6htkcdyXsihxxXdrg
Count-only resident memory arms now skip decoding. Block-sparse C beats the
dense tile path everywhere and walk_mask end to end only on deep,
low-fan-out recursion. D-RU-6 stays Queued/Lab.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01G22yT6htkcdyXsihxxXdrg
@coderabbitai

coderabbitai Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: b1544f0f-dce6-4d38-8ac8-1eca52619bde
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Warning

Billing warning: we have not been able to collect payment for this subscription for more than 72 hours. Please update the payment method or pay any pending invoices in Billing to avoid service interruption.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@AdaWorldAPI
AdaWorldAPI changed the base branch from ccr-0455e606-wmtsor to main October 21, 2026 01:26
@AdaWorldAPI
AdaWorldAPI marked this pull request as ready for review October 21, 2026 01:34
@AdaWorldAPI
AdaWorldAPI merged commit da9fea2 into main Oct 21, 2026
14 checks passed
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-21T01:34:39.466916Z 2efa771 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

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.

2 participants