Repository navigation
test(lab): Palette512 signed-magnitude9 / NaN sentinel and fused MAC oracle - #380
Conversation
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
Codex Review SummaryThis 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. |
… presence plane Follow-up to #380: NaN is a cleared presence bit, not the 'negative zero' codeword, so all of -255..=+255 are values and the writer stores +0 for zero and for missing rows. Masked dot splits lanes by sign_a ^ sign_b into two unsigned u8 x u8 accumulators, NULL excluded by the presence AND, n the popcount of the same mask. Decode applies nan_where_clear, so the float NaN/presence bijection holds on the decoded lane. tanh exactness vs i8 Sym (-127..=127), measured over 2,000,001 points: output quantization alone 2.01x lower max error, 1.94x lower RMS; a 256-entry table (sign-magnitude indexed by magnitude, sign passed through) 1.92-1.99x max, 1.97-2.02x RMS for input ranges 2..8; saturation onset 3.11 -> 3.46. This is the one extra bit. Scalar reference only; SIMD cost not measured. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XAqKMPh2Seh2WLccCksAdY
|
Design note from #381, plus a local run of this probe. Local run: NaN without a codeword. #381 ships the rule "a cleared presence bit is NaN (NULL)" for float lanes, as a bijection with the NaN payload. On an integer lane the presence plane is the only carrier, and the payload under a clear bit is never read, the same contract as Quack's validity plane. Applied to this encoding:
Measured in #381 (
Generated by Claude Code |
rustfmt reflows three expressions (the red format/stable check). The note said the five tests were not run; they pass on rustc 1.99.0. It also said x86 has no unsigned x unsigned dot product; AVX-VNNI-INT8 VPDPBUUD, NEON UDOT and wasm extmul do (from documentation, not measured). And it records the rule settled in #381: NaN is -0, a cleared presence bit over a stored 0. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XAqKMPh2Seh2WLccCksAdY
Why
This PR probes the proposed Palette512 / sign-magnitude9 encoding: an 8-bit unsigned magnitude per lane plus a sign mask. Sign polarity is applied inside
mul_add, not by decoding the whole buffer to signed values first.Do not conflate this with a generic 512-centroid Palette256 expansion. Existing BGZ Palette256 is an arbitrary
u8archetype index; this experiment is a structured numeric code space.NaN
NaN is
-0, a cleared presence bit over a stored 0. This rule was settled in #381.Artifact boundary
examples/palette512_probe.rs: a standalone scalar 64-lane prototype.u64sign mask (72 bytes)..claude/knowledge/palette512-signed-magnitude9-experiment-20261027.md: semantics, physical costs, a map of which owner holds what, the falsifiers, and the separate next gate.Verification
cargo test --example palette512_probeAll 5 tests pass on rustc 1.99.0. They cover:
mul_add;No benchmark or target-ISA codegen has been run; this is a scalar reference.
Falsifiers
VPDPBUUD, NEONUDOTand wasmextmul_*_u8x16; that list is from documentation, not measured.Follow-up, gated separately
Build an independent SIMD lowering, then compare its performance and quality fairly against
Codec8<Sym,NaNAtMin>. The comparison must count sign-mask load and extraction, correction costs, and saturation/NaN behavior. Folded pair LUTs and source-bound integration come only after that.Existing ownership / context
🤖 Generated with Claude Code
https://claude.ai/code/session_01XAqKMPh2Seh2WLccCksAdY