Repository navigation
lab: DT64-shaped 64×64 and 256×256 BF16 objects over source-owned lanes (D-DT64-GEMM-SHAPE-1/2) - #1987
Conversation
…SHAPE-1/2) A WHERE-selected population is routed through one DT64 lane binding into a virtual object (fields x columns, reduction over selected identities) and consumed as 16 or 256 output tiles by four arms: direct strided AMX, staged dense A tiles, ndarray CBLAS BF16, and a scalar f64 oracle. The object holds addresses and the selection only. B is prepared once as VNNI column panels, keyed to the selection, the frame issue, the B revision and the width, and refused when any of them changes. Direct reads refuse scattered masks, non-slab or permuted lanes, short pitches, and any K padding that would read live neighbouring identities (a NaN there poisons the tile even though B's padding row is zero). 256 demanded fields bind directly under Extent::DR256_SQ_X64 (MAX_FIELDS is 256); no production lane budget changes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XAqKMMWgnUU9g7Ldyn6sbk
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XAqKMMWgnUU9g7Ldyn6sbk
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 719d057974
ℹ️ 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".
Lanes now carry the frame issue and per-row lane addresses of the object that resolved them. direct, staged and cblas refuse lanes from another source or frame, with another field count, or under another mapping (ShapeRefusal::ForeignLanes), before any arithmetic. Before this, lanes from a foreign source passed whenever the geometry fit, and 64-field lanes on a 256-field object silently computed 64 rows. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XAqKMMWgnUU9g7Ldyn6sbk
|
@codex review The lane-provenance finding is fixed in fe3491a. The direct, staged and CBLAS arms now refuse lanes that another object resolved, and there is a new test with a disable run for each of its checks. Generated by Claude Code |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: fe3491a82d
ℹ️ 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".
A region past the source's logical length that still fit the padded pitch passed every guard: direct read the slab's zero padding as selected values and returned Ok, while staged and cblas panicked. admit_lanes, which all three arms call, now refuses any selected identity at or past the shortest lane's length (ShapeRefusal::OutOfRange). Padding stays allowed as K padding only. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XAqKMMWgnUU9g7Ldyn6sbk
|
@codex review The bounds finding is fixed in afe8d15: every arm now refuses selections past the end of the lanes. Generated by Claude Code |
|
Codex Review: Didn't find any major issues. Hooray! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
Lab-only follow-up to #1983 and #1984, in
crates/dr-isa-stream-lab. It does not change DT64, DR, the canonical SoA, or any production API.What this tests
The 256 fields bind directly under
Extent::DR256_SQ_X64(DT64MAX_FIELDS= 256). No composed bindings and no lane-budget change were needed. "256×256" here means fields × columns over 256 selected identities. It is not an adjacency matrix.Four arms, each checked against the oracle before and after timing:
cblas_gemm_bf16bf16f32;B is prepared once as VNNI panels and reused. The reuse key is the selection, the frame issue, the B revision and the width.
Results
Host: Xeon VM with AMX-BF16, 4 vCPU, L2 2 MiB. Tier
AMX TDPBF16PS, single-threaded. Timings moved by up to 35% between runs. Full table and three raw runs:crates/dr-isa-stream-lab/BENCH-SHAPE.mdandresults/.Decision: MIXED.
Scaling 16 → 256 tiles:
Sparse demand. A mask of 40 scattered identities compacts K to 64 (padded), so the arithmetic stays dense. Only the 20 KiB of selected values is copied, but the gather makes it slower (392–557 µs) than the dense 256-identity region.
Falsifiers (14 tests, all green)
Each refusal is tested two-sided where a bypass is constructible.
OverRead.2·K·2^-24·Σ|ab|between arms, plus2^-8·Σ|ab|against the unrounded answer.Disable runs (each turns tests red; the tree was restored from the committed state):
tails_*andwithout_the_over_read_refusal_*fail.prepared_b_is_reused_and_invalidatedfails.frame_scope_mapping_and_basis_refusalsfails.#1984 ancestry
#1984 merged into #1983's branch 13 s after #1983 itself merged, so
1f47c03e9,edbf2fa44andd563af107are not on main. They survive onccr-8062bcc7-l7lkz9-vcsr. This PR does not cherry-pick them; their BENCH.md is preserved there. Re-landing them is a separate decision.#1984's reference numbers (different workloads; no speed-up is claimed across them):
The graph conclusions stay separate from these matrix-shaping conclusions.
Recommendation on promotion
Do not promote the GEMM into Quack / mask-RISC. It is an optional arithmetic consumer, and mask-RISC terminals are untouched. Two pieces are worth their own PRs:
LaneBinding::borrow_all(one check, N borrows) inlance-graph-dt64.LaneBinding::laneper field is quadratic: 155 µs against 14 µs at 256 fields.Gaps
Gates:
cargo fmt --check,cargo clippy --all-targets -- -D warnings, andcargo test --release(32 tests) are green. CI now also runs--bin shape.Generated by Claude Code