Skip to content

D-RMAP-2 probe: BF16 16×16 tile GEMM vs bit tile, first measured cell - #1623

Merged
AdaWorldAPI merged 6 commits into
mainfrom
ccr-08f48cec-lbv9l4-tile-gemm
Oct 20, 2026
Merged

AdaWorldAPI merged 6 commits into
mainfrom
ccr-08f48cec-lbv9l4-tile-gemm

Conversation

@AdaWorldAPI

Copy link
Copy Markdown
Owner

This PR was split out of #1622, which now carries only the D-RST plan. It is probe code only, in crates/mork-pathmap-probe; nothing is adopted.

What it measures

On one 256×256 focus map it computes Boolean composition, walk counts and directed triangle counts two ways:

  • through ndarray::simd::bf16_tile_gemm_16x16_packed, via the facade (no new kernel);
  • through a bit matrix.

Both are checked against a triple-loop oracle. Fixtures: density 1%, 10% and 50%, plus a skewed one with 4 dense hub rows and columns.

  • src/tile_gemm.rs, tests/tile_gemm.rs: 4 tests. Five guards were each disabled once and each made a test fail (transpose in compose, threshold, triangle transpose, B-block column offset, count transpose).
  • examples/tile_gemm_cost.rs: release build, medians of 7, every timed answer asserted first, inputs passed through black_box.
    • black_box mattered. An earlier run without it reported a 0.2 µs triangle count, which was the compiler hoisting the pure call out of the timing loop.

Results, with two conclusions kept apart

  1. Measured on this host's F32x16 polyfill tier.
    • BF16 walk counts equal the oracle exactly, and count > 0 equals Boolean composition.
    • The bit arm wins every cell:
      • composition: 2.6–25 µs;
      • walk counts by popcount: 165–192 µs;
      • triangles: 1.9–72 µs.
    • BF16 A·A takes about 19 ms, and staging bits to BF16 alone costs 150–400 µs.
  2. Not measured: anything about AMX or VDPBF16PS hardware.
    • This host lacks both. Checked directly per ndarray's AMX Gotcha 4: CPUID AMX and AVX512-BF16 bits are 0, XCR0 = 0xe7, and arch_prctl(ARCH_REQ_XCOMP_PERM) on syscall 158 returns -95.
    • The polyfill allocates on every output element (ISS-BF16-POLYFILL-PER-ELEMENT-ALLOC). Its cost is therefore not even a lower bound on tile-hardware cost.

Board

  • D-RMAP-2 §5a.
  • STATUS_BOARD D-RMAP-2 row: PARTIAL.
  • ISS-BF16-POLYFILL-PER-ELEMENT-ALLOC in ISSUES.md.
  • Board entry 2026-10-20-d-rmap-2-tile-gemm-cell.md.
  • Entries index regenerated.

The three commits are cherry-picks of #1622's original commits, so their provenance survives. The cherry-pick dropped one two-line hunk that touched the D-RST plan, which this branch does not carry.

Checks run locally

  • Probe cargo test --release, cargo clippy --all-targets -D warnings and cargo fmt --check are clean.
  • Append-only gate passes; no new citation-decay findings.

Generated by Claude Code

Boolean composition, walk counts and triangle counts on one 256 x 256
focus, through ndarray::simd::bf16_tile_gemm_16x16_packed (the facade,
not a new kernel) and through a bit matrix, both against a triple-loop
oracle. 4 tests; 5 guards disable-verified.

D-RMAP-2 §3's exactness claim holds: BF16 walk counts equal the oracle
exactly and count > 0 equals Boolean composition at 1 %, 10 %, 50 % and
with skewed hubs. On this host only the F32x16 polyfill tier runs (no
AMX, no avx512_bf16): A*A takes about 19 ms, while the bit arm composes
in 2.6-25 us and gives the same walk counts by popcount in 165-192 us.
The polyfill allocates per output element, recorded as
ISS-BF16-POLYFILL-PER-ELEMENT-ALLOC; tile-tier hosts are unmeasured.

Recorded in D-RMAP-2 §5a, the D-RST plan §5a, STATUS_BOARD, ISSUES and a
board entry.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VyWZYKycy6MoYDxHRVnV5K
CPUID, XCR0 and arch_prctl(ARCH_REQ_XCOMP_PERM) on syscall 158 checked
directly, per ndarray AMX_GOTCHAS Gotcha 4: no AMX, no AVX512-BF16; the
permission request returns EOPNOTSUPP. The polyfill tier is the host's,
not a detection bug.

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

The measured polyfill-tier result is not evidence about AMX or
VDPBF16PS performance, not even a lower bound, since the polyfill's
cost is dominated by allocation.

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

coderabbitai Bot commented Oct 20, 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: b64674a8-61f2-4a27-ab89-43ae71873d1d
  • 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 pushed a commit that referenced this pull request Oct 20, 2026
Reverts b5672a5 and 3329eeb on this branch. Their content now lives in
#1623 as cherry-picks, so its measurements, disable-verified guards and
provenance are kept there. This PR returns to D-RST-0, the plan, and
gains one pointer to #1623 in §5a. No protected history is rewritten:
the append-only gate compares against the merge-base with main, and the
reverted ISSUES.md and board-entry additions were never on main.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VyWZYKycy6MoYDxHRVnV5K
States the operator clarification: preparation, execution and maintenance
are measured apart; break-even comes from measured values; §5a's cell is
read in those terms (execution on prepared operands only, with BF16
staging as part of preparation); Boolean existence vs BF16 multiplicity
and the BF16 exactness bound. No kernel change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VyWZYKycy6MoYDxHRVnV5K
@AdaWorldAPI
AdaWorldAPI marked this pull request as ready for review October 20, 2026 08:20
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 20, 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-20T08:23:17.874818Z 23f0998 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.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 23f0998902

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread crates/mork-pathmap-probe/src/tile_gemm.rs
Conflict only in the generated .claude/board/entries/README.md;
regenerated with entries_index.py --write (378 rows, --check passes).
STATUS_BOARD auto-merged to this branch's measured D-RMAP-2 row.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VyWZYKycy6MoYDxHRVnV5K
@AdaWorldAPI
AdaWorldAPI merged commit 8b570ed into main Oct 20, 2026
13 checks passed
AdaWorldAPI pushed a commit that referenced this pull request Oct 20, 2026
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