Skip to content

feat(shader-driver): migrate FingerprintColumns.cycle to Vsa16kF32 carrier (PR B)#256

Merged
AdaWorldAPI merged 2 commits into
mainfrom
claude/teleport-session-setup-wMZfb
Apr 24, 2026
Merged

feat(shader-driver): migrate FingerprintColumns.cycle to Vsa16kF32 carrier (PR B)#256
AdaWorldAPI merged 2 commits into
mainfrom
claude/teleport-session-setup-wMZfb

Conversation

@AdaWorldAPI
Copy link
Copy Markdown
Owner

Summary

  • PR B from the SoAReview expansion list §6, item feat: bump arrow 57, datafusion 51, lance 2 #1 — migrates FingerprintColumns.cycle from Box<[u64]> (Binary16K, 256 × u64 per row) to Box<[f32]> (Vsa16kF32 carrier, 16,384 × f32 per row = 64 KB).
  • Builds on PR feat(contract): Vsa16kF32 switchboard carrier + 16K algebra #253 which shipped the CrystalFingerprint::Vsa16kF32 variant + 6 algebra primitives (vsa16k_zero, binary16k_to_vsa16k_bipolar, vsa16k_to_binary16k_threshold, vsa16k_bind, vsa16k_bundle, vsa16k_cosine).
  • Upstream API unchanged — write_cycle_fingerprint() still takes &[u64; 256]; the bipolar projection happens internally via binary16k_to_vsa16k_bipolar. Downstream readers get &[f32] for direct VSA algebra.

What changed

File Change
crates/cognitive-shader-driver/src/bindspace.rs cycle: Box<[u64]>Box<[f32]>; new FLOATS_PER_VSA = 16_384 const; set_cycle(&[f32]), set_cycle_from_bits(&[u64; 256]), cycle_row() -> &[f32]; byte_footprint() now 71,774 for 1 row
crates/cognitive-shader-driver/tests/end_to_end.rs Test adapted — verifies bipolar round-trip via vsa16k_to_binary16k_threshold
.claude/board/LATEST_STATE.md Cycle substrate migration noted

Why

Expansion-list item #1: the Vsa16kF32 carrier type exists (PR #253), but the BindSpace column it was designed for still used Binary16K. This PR closes that gap — FingerprintColumns.cycle now carries the 64 KB f32 carrier, enabling future operations (MarkovBundler, Trajectory, vsa_permute) to do VSA algebra directly on the cycle column instead of converting at every call site.

Test plan

  • cargo test -p cognitive-shader-driver --lib — 40 pass, 0 fail
  • cargo test -p lance-graph-contract --lib — no regressions
  • byte_footprint() for 1 row = 71,774 bytes (3 × 256 × u64 + 16,384 × f32 + qualia + meta + edge + temporal + expert)
  • Bipolar projection round-trip is lossless (strict ±1 → threshold inverse)

https://claude.ai/code/session_01SbYsmmbPf9YQuYbHZN52Zh


Generated by Claude Code

claude added 2 commits April 24, 2026 17:10
…rrier

- Change FingerprintColumns.cycle from Box<[u64]> (Binary16K, 256 words/row)
  to Box<[f32]> (Vsa16kF32, 16_384 floats/row = 64 KB per row)
- Add FLOATS_PER_VSA = 16_384 constant alongside WORDS_PER_FP/WIDTH_BITS
- Add set_cycle(&[f32]) for direct f32 writes
- Add set_cycle_from_bits(&[u64; 256]) adapter using binary16k_to_vsa16k_bipolar
- cycle_row() now returns &[f32]; write_cycle_fingerprint() API unchanged
- byte_footprint() updated: 3 u64 planes + 1 f32 plane = 71_774 bytes/row
- Update all bindspace tests; add set_cycle_direct_f32 test
- Update end_to_end.rs to check bipolar round-trip instead of raw u64 equality
- Board hygiene: note cycle migration in LATEST_STATE.md

https://claude.ai/code/session_01SbYsmmbPf9YQuYbHZN52Zh
@AdaWorldAPI AdaWorldAPI merged commit 177aee9 into main Apr 24, 2026
0 of 5 checks passed
Copy link
Copy Markdown

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

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: 72663523b3

ℹ️ 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 on lines +84 to +86
let vsa = binary16k_to_vsa16k_bipolar(bits);
self.cycle[row * FLOATS_PER_VSA..(row + 1) * FLOATS_PER_VSA]
.copy_from_slice(&*vsa);
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Avoid per-row heap allocation in cycle projection

set_cycle_from_bits currently calls binary16k_to_vsa16k_bipolar(bits), which allocates a new 16,384-f32 Box and then immediately copies it into the preallocated row buffer. Because write_cycle_fingerprint routes every persisted cycle through this path, this introduces allocator churn and an extra 64 KB copy per row in a hot path, which can materially degrade throughput/latency under sustained dispatch workloads.

Useful? React with 👍 / 👎.

AdaWorldAPI pushed a commit that referenced this pull request Apr 25, 2026
Confirmed LF-21/22/90 are not in my queue (no conflict). Answered:
- Settings governance is branch-only, not merged to main yet
- Vsa16kF32 carrier landed (PR #256); role catalogue still 10K-dim;
  VSA_DIMS resize needed; proposed split: SMB plans band layout,
  lance-graph session does the infrastructure
- LF-3 UNKNOWN-3/UNKNOWN-4 remain parked (need user direction)
- Next on-deck if session continues: TD-INT-5, TD-INT-8

https://claude.ai/code/session_01SbYsmmbPf9YQuYbHZN52Zh
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