Repository navigation
DR G2L × ISA stream lab: one lane binding feeding a cube fold and an AMX BF16 GEMM - #1983
Conversation
One DT64 lane binding consumed by two computation geometries over the same source-owned bf16 lanes: ARM A folds 16 WHERE masks over a 256x256 identity cube, ARM B computes the same 16x16 SUM(lane) WHERE mask answer as a BF16 tile GEMM (AMX TDPBF16PS on this host), with A read in place from the slab when 16 demanded lanes are consecutive rows at a padded pitch, and staged otherwise. B is the selection, staged from the mask words once per mask set. Tests: both arms exact against a fixture oracle at n = 256, 513, 4096 and 65536; refusals for a lane in another row order, a stale frame, masks in another space, scattered lanes, permuted rows, an unpadded pitch and a partial row tile; bf16 exactness. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XAqKMMWgnUU9g7Ldyn6sbk
The workflow runs fmt, clippy, the tests and the stage-cost probe on the runner's own tier and prints which tier ran. The entry records the contract map, the result matrix, the measured costs and the handoff for report-rs #33. 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: d15115a9d5
ℹ️ 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".
`i32::MAX as f32` rounds to 2^31, whose low 16 bits are zero, and casting it back to i32 saturates to i32::MAX, so the check passed a value bf16 cannot hold. f64 holds every i32 and every f32 exactly. The boundary test covers i32::MAX, i32::MAX - 1 and i32::MIN + 1 (refused) and i32::MIN, +-2^30 and 3*2^28 (exact, decoded in f64). It failed on i32::MAX before the fix. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XAqKMMWgnUU9g7Ldyn6sbk
|
The runner has no AMX, so The fix is AdaWorldAPI/ndarray#415. With it, and the fallback forced on an AMX host, all lab tests pass. Once #415 merges I'll re-run this job. The lab code itself needs no change for this. The bf16 exactness fix in b7922b8 is unrelated, for the Codex thread. Generated by Claude Code |
Question
Can one source-witnessed DT64 lane binding feed two different computations, without a second value layout?
TDPBF16PSon this host.Shape
C[p][m] = Σᵢ lane_p[i] · mask_m(i)gives everySUM(lane p) WHERE mask min one GEMM:The cube arm computes the same 16×16 answer by folding positionally. Both arms consume the same
LaneBinding, and both must match an oracle built from the fixture alone.Result
Source data streams directly. The selection needs one bounded staging step.
LaneSource::Lanetype (SlabLane { slab, row, pitch, n }). DR still describes only identity and row order.Measured on a Granite Rapids VM (AMX), n = 65,536, 16 lanes × 16 masks. Every timed run is checked against the oracle.
AMX costs about 43 ns per 16×16×32 block, plus about 105 ns fixed per call. Issuing one call per 32-identity block therefore costs 2.2 ms. A consumer must make one call per row tile with K = the population. The two slow paths are kept in the bench as labelled references, not gates.
Falsifiers
Positive. Both arms are exact against the oracle at n = 256, 513, 4096 and 65,536. Each arm resolves 16 lanes whatever n is. Direct mode copies zero A bytes.
Refusals (each correct path also runs staged):
Disable runs. Removing each of the six lab guards fails exactly the test that names it.
Not done
Files
crates/dr-isa-stream-lab: excluded crate with its own workspace root..github/workflows/dr-isa-stream-lab.yml.claude/board/entries/2026-11-08-dr-isa-stream-lab.md: contract map, result matrix, costs, and the handoff for report-rs feat(bgz17): RaBitQ encoding, PCDVQ weighted distance, sigma-band palette D1: rabitq_compat.rs — RaBitQEncoding struct with: - OrthogonalMatrix (Hadamard rotation) - encode(): normalize → rotate → sign-quantize → binary + corrections - distance_rabitq(): unbiased L2² estimate with correction factors - distance_palette(): O(1) matrix lookup - distance_corrected(): generative decompression with LFD correction D6: Base17::l1_weighted() — PCDVQ direction-weighted L1 distance. dim 0 (sign) weighted 20×, dims 1-6 (exponent) 3×, dims 7-16 (mantissa) 1×. DistanceMatrix::build_pcdvq_weighted() uses weighted distances. D7: Palette::from_sigma_bands() — training-free codebook from empirical distribution. Equal-percentile bands = GQ-style guaranteed uniform utilization. No empty clusters by construction. 114 tests pass (was 108), 6 new tests for the added features. https://claude.ai/code/session_01CdqyUTUfjKZuk8YGJzv6LB #33.Generated by Claude Code