You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs(pr-x12): address Codex + CodeRabbit review on #242
- tests/knowledge/test_pr_x12_knowledge_docs.py: the four assertions
pinning the audit-flagged wording (tropical_spmv free function,
'Actual kernel home (current)' inversion) now assert the corrected
canon instead — blasgraph canonical (kernel unwritten), shipped
min-plus = the method bgz17::ScalarCsr::spmv_min_plus. Suite green
(117 tests). [Codex P2]
- Leaf-count arithmetic corrected everywhere: 129,600 exact 8x8 leaves
at 4K (padded 130,560; the old 132,710 was ungrounded), ~129 ns/leaf
budget, RDO paragraphs re-based on ~2,040 CTUs/frame, R-11 matrix row
re-unitized to <=210 ns/leaf. [CodeRabbit]
- Determinism claims qualified: standardized NN-in-loop decode can be
bit-exact (fixed-point conformance), so the moat is stated as
reproducibility-by-construction + governance, not 'NN =
nondeterministic'; un-standardized AI-upscaler drift claim retained.
[CodeRabbit]
- H.267 described as prospective standardization effort; VVC metric
split (up to ~50% subjective / ~31-40% objective BD-rate); GEMM-lens
'all four already exist' leftover removed; tropical-GEMM speedup made
conditional on the A6 bench; MD028 blockquote fix in the two
quarantine headers; residual affirmative stale symbols corrected in
pr-x12-cam-pq-sigker-dn-tree-substrate-bindings.md. [CodeRabbit]
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01K3RyLEbuNSHxxB3NTTrGki
Copy file name to clipboardExpand all lines: .claude/knowledge/pr-x12-bgz-jc-substrate-synergies.md
+1-2Lines changed: 1 addition & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,8 +12,7 @@
12
12
> **siblings**, never substitutes for blasgraph. **Do not cite §0 / §2.5 /
13
13
> §2.7 / §4 / §7-§8 as evidence.** Pending rewrite per audit Tier-1
14
14
> recommendation.
15
-
16
-
15
+
>
17
16
> Date: 2026-05-22
18
17
> Status: **substrate grounding doc** — connects PR-X12's abstract substrate claims to the **already-implemented** crates in `lance-graph/crates/`. Companion to the five perspective lenses written 2026-05-22.
Copy file name to clipboardExpand all lines: .claude/knowledge/pr-x12-cam-pq-sigker-dn-tree-substrate-bindings.md
+12-5Lines changed: 12 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -284,7 +284,7 @@ Updating the inventory from `pr-x12-bgz-jc-substrate-synergies.md` §7 with the
284
284
| 4096-entry basin codebook |`bgz-tensor::Codebook4096` (literal 4096-entry type), trained by **`cam_pq`**. `bgz-hhtl-d` is a *different* basin-codebook strategy (4-basin × 16-HIP × 256-TWIG = 16,384-cell address space over a shared 256-entry palette) — not the canonical 4096 |
| Tropical-GEMM (R-7) |canonical home `lance-graph::blasgraph` (kernel unwritten); shipped min-plus is the method `bgz17::ScalarCsr::spmv_min_plus`[lossy sibling, prototype only — corrected 2026-07-16 per audit]|
| Formal correctness — codec quantization |`jc`**Pillar 10 (Pflug-Pichler)** — nested-distance Lipschitz on Sigma DN-trees, certifies CAM-PQ tree quantization preserves FreeEnergy within Lε |
290
290
| Formal correctness — path-signature lane |`jc`**Pillar 11 (Hambly-Lyons)** via **`sigker`** — certifies Index-regime classification (sigker only, not bgz) |
@@ -335,15 +335,22 @@ Recommended edits to `pr-x12-canon-resolutions-delta.md`:
335
335
> -**Quantization correctness (Pillar 10, Pflug-Pichler):** nested-distance Lipschitz on Sigma DN-trees — proves CAM-PQ tree quantization preserves FreeEnergy within Lε. This is the proof PR-X12 cites for "wire-format quantization is faithful."
336
336
> -**Path-signature correctness (Pillar 11, Hambly-Lyons):** signature uniqueness on tree-quotient — proves any path is uniquely determined by its truncated signature up to tree-like equivalence. Active under `--features hambly-lyons` (since 2026-05-07, PR #348). This is the proof PR-X12 cites for the `SignatureBasis<DEPTH>` lane (R-15).
337
337
>
338
-
> Both pillars exist; the codec cites them and does not reprove. **Status: Pillar 10 active; Pillar 11 active under feature gate. Production-scale benchmarking + PR #350(signature_kernel_pde math correction) — see Gap G-4.**
338
+
> Both pillars exist; the codec cites them and does not reprove. **Status: Pillar 10 active; Pillar 11 active under feature gate. Production-scale benchmarking — see Gap G-4.***(Corrected 2026-07-16, audit #9: the "PR #350 signature_kernel_pde math correction" claim is withdrawn — the PDE form's convergence tests to `I₀(2·√⟨u,v⟩)` pass; there is no known bug.)*
339
339
340
-
**R-7 path correction** — the kernel home:
340
+
**R-7 kernel home***(corrected 2026-07-16, audit #1-#4 — the earlier "path
341
+
correction" here had the canon/adapter relationship inverted)*:
341
342
342
-
> R-7 (corrected): tropical-GEMM lives at `lance-graph::bgz17::scalar_sparse::tropical_spmv` (not the abstract `blasgraph` namespace). The codec's tropical-GEMM RDO call is `bgz17::scalar_sparse::tropical_spmv(edge_weights, dag)`.
343
+
> R-7 (corrected): the canonical, bit-exact home for the tropical-GEMM
344
+
> partition kernel is `lance-graph::blasgraph`; that f32 min-plus kernel is
345
+
> UNWRITTEN today. The only shipped min-plus is the method
> a lossy-sibling prototype, never a substitute for the blasgraph canon.
348
+
> The free function `tropical_spmv(edge_weights, dag)` cited previously
349
+
> does not exist.
343
350
344
351
**R-15 (new candidate)** — signature-basis as Basis<T> impl:
345
352
346
-
> R-15 (candidate): the substrate supports path-structured signals via `sigker::SignatureBasis<DEPTH>: Basis<f32>`, alongside `DctIIBasis<N>: Basis<i16>` (video) and `EwaSplatBasis: Basis<f16>` (3DGS). Implementation: ~1 week wrapper around `sigker::signature_kernel_pde`. **Plan G** gets a fifth lane (path-structured: audio waveform, time-series, gesture/handwriting).
353
+
> R-15 (candidate): the substrate supports path-structured signals via `sigker::SignatureBasis<DEPTH>: Basis<f32>`, alongside `DctIIBasis<N>: Basis<i16>` (video) and `EwaSplatBasis: Basis<f16>` (3DGS). Implementation: ~1 week wrapper around `sigker::signature_truncated` (the form Pillar 11 cites; the PDE form is equally sound — audit #9 — but the truncated path is what R-15 commits). **Plan G** gets a fifth lane (path-structured: audio waveform, time-series, gesture/handwriting).
Scalar misses 60 fps by 7.6×; SIMD-batched misses by 1.7× (same OoM). **Pins B:D-CODEC-8 / A:T-7 from P2 → P1** — A4-impl and A6 must ship SIMD-batched, not scalar-then-vectorize.
181
+
Scalar misses 60 fps by ~7.5×; SIMD-batched misses by ~1.6× (same OoM). **Pins B:D-CODEC-8 / A:T-7 from P2 → P1** — A4-impl and A6 must ship SIMD-batched, not scalar-then-vectorize.
**Complexity:**`O(d² × |nodes|)`. For d=4, |nodes|=85: 1360 ops/CTU vs 21,760 naive. **~16× speedup.**
220
221
221
-
At 4K 132K CTUs/frame: ~4 ms vs ~64 ms just for partition RDO. At 60 fps, the difference between fitting and missing budget.
222
+
At 4K (~2,040 CTUs/frame; corrected 2026-07-16 — "132K" was the leaf count, not CTUs): ~2.8 ms vs ~44 ms just for partition RDO at ~1 op/ns. At 60 fps, the difference between fitting and missing budget.
222
223
223
224
**Dep direction:**`ndarray-codec → lance-graph::blasgraph` (tropical-GEMM kernels nominally live in blasgraph). Allowed post-Plan-H because ndarray-codec is a sibling crate, not the bottom.
224
225
@@ -386,7 +387,7 @@ Highlights of falsifiers — the canary tests:
386
387
| R-1 | A7 has to subclass `LinearReduce` to make rANS work | Trait factoring wrong; A7 wastes 1.5 wks |
387
388
| R-3 | Cumulative generic LoC > 1500 after A4-A8 | M:H-NEW-2 falsified; the abstraction grew domain-specific code |
388
389
| R-9 | `grep -E 'North|East|West|South' src/hpc/codec/*.rs` returns production paths | Topology-free contract broken; consumer semantics leaked into codec |
389
-
| R-11 | SIMD-batched encode > 210 ns/CTU on SPR | Plan G video threshold can't pass; 4K real-time falsified |
390
+
| R-11 | SIMD-batched encode > 210 ns/leaf on SPR | Plan G video threshold can't pass; 4K real-time falsified |
Copy file name to clipboardExpand all lines: .claude/knowledge/pr-x12-codec-cognitive-substrate-mapping.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -522,7 +522,7 @@ Per-block butterfly wins for single 32×32. Per-frame batched `C = A_batch @ DCT
522
522
523
523
> [Pinned as **R-7**: the tropical-GEMM kernel's canonical home is `lance-graph::blasgraph` — but the symbol `blasgraph::tropical_gemm`**does not exist** (audit #3, corrected 2026-07-16; blasgraph's 7 HDR semirings are binary-Hamming over 16384-bit BitVec, no numerical min-plus). The kernel is unwritten; the only shipped min-plus is `bgz17::ScalarCsr::spmv_min_plus` (lossy sibling, prototype only). The `ndarray-codec → lance-graph` dep direction was confirmed *allowed* post-merge (both are sibling crates above `ndarray::hpc` and below `woa-rs`). See the corrected R-7 in the delta doc.]
524
524
525
-
x265 spends ~30% CPU on recursive partition RDO. Reformulate: each partition is a node in an 85-node DAG, edges = split/merge transitions, weights = ΔRDO. Optimal partition = shortest path. blasgraph's tropical-semiring GEMM (`D ← min(D, D + W)`) solves all partitions in **one batched matrix-relax**. `O(4^d)` → `O(d²)`per CTU.
525
+
x265 spends ~30% CPU on recursive partition RDO. Reformulate: each partition is a node in an 85-node DAG, edges = split/merge transitions, weights = ΔRDO. Optimal partition = shortest path. A **planned**tropical-semiring GEMM in blasgraph (`D ← min(D, D + W)`; unwritten today, per the R-7 correction above) would solve all partitions in one batched matrix-relax — the `O(4^d)` → `O(d²)`reduction holds algebraically but the speedup is **conditional on the future A6 partition bench** confirming it on real edge weights.
60 fps by ~1.6×; needs further work but in the same order of magnitude.**
824
826
825
827
**To hit 60 fps 4K real-time** requires the SIMD-batched-encode path
826
828
to land. **This pins B:D-CODEC-8 / A:T-7 from P2 to P1.** Plan A4-impl
@@ -1261,7 +1263,7 @@ that decides whether each holy-grail claim is demonstrated.
1261
1263
| R-8 (Plan G is confidence gate) | this doc | Phase order | Plan G ships before A7 | A7 PR doesn't merge until Plan G binary green |
1262
1264
| R-9 (topology-free) | this doc | grep audit | Codec body has no spatial-semantic refs |`grep -rE 'North\|East\|West\|South' src/hpc/codec/*.rs` returns only test/doc |
1263
1265
| R-10 (4 bit/Gaussian floor) | this doc | Plan E bench | bits/Gaussian on Mip-NeRF 360 | ≤4 bits/Gaussian without offline codebook |
1264
-
| R-11 (4K 60fps SIMD-batched) | this doc | Plan G video latency assert | Per-CTU encode time | ≤210 ns/CTU on Sapphire Rapids |
1266
+
| R-11 (4K 60fps SIMD-batched) | this doc | Plan G video latency assert | Per-leaf encode time | ≤210 ns/leaf on Sapphire Rapids (≡ ≤13.4 µs per fully-split 64×64 CTU = 64 leaves; corrected 2026-07-16 — the earlier "≤210 ns/CTU" mislabeled the per-leaf breakdown total)|
1265
1267
| R-12 (per-CTU flush) | this doc | A8 frame-header parse + decode | First-CTU latency | First CTU decodable before frame complete |
1266
1268
| R-13 (Option A per-shard) | this doc | Plan F on BERT-glue | 8× compression + accuracy | Holds; else escalate to Option B |
1267
1269
| R-14 (Pillar 10 active) | this doc |`cargo test -p jc` (default features) | Pflug-Pichler Lipschitz bound | Pillar 10 probe green |
@@ -1414,7 +1416,7 @@ When this doc is summarised across context windows, preserve at minimum:
1414
1416
- R-8: Plan G is confidence gate
1415
1417
- R-9: topology-FREE codec layer
1416
1418
- R-10: ~4 bits/Gaussian near target, ~1 bit stretch
1417
-
- R-11: 210 ns/CTU SIMD-batched encode
1419
+
- R-11: 210 ns/leaf SIMD-batched encode (per-leaf, not per-CTU)
1418
1420
- R-12: per-CTU flush default; per-bucket Plan F
1419
1421
- R-13: Option A (per-shard codebook) for Plan F v1; primitives are
Copy file name to clipboardExpand all lines: .claude/knowledge/pr-x12-woa-multiarch-orchestration.md
+1-2Lines changed: 1 addition & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,8 +10,7 @@
10
10
> doc as evidence for anything.** Pending rewrite per audit Tier-1
11
11
> recommendation; the W1a consumer contract at
12
12
> `vertical-simd-consumer-contract.md` is the authoritative source.
13
-
14
-
13
+
>
15
14
> Date: 2026-05-22
16
15
> Status: **perspective doc** — examines how the orchestration crates (`woa-rs`, `woa`, `q2`, `surrealdb`, `MedCare-rs`, `smb-office-rs`) consume the PR-X12 substrate, and how PR-X12's per-arch polyfill decisions (R-4, R-5, R-11) generalise to the entire HPC stack.
For 4K @ 60 fps with 132K CTUs/frame, this is the difference between **4 ms and 64 ms per frame just for partition RDO**. At 60 fps's 16.67 ms budget, naive RDO doesn't fit.
107
+
For 4K @ 60 fps with ~2,040 CTUs/frame (corrected 2026-07-16 — the earlier "132K CTUs" was the 8×8 leaf count), this is the difference between **~2.8 ms and ~44 ms per frame just for partition RDO** at ~1 op/ns. At 60 fps's 16.67 ms budget, naive RDO doesn't fit.
108
108
109
109
**Dep direction:** the tropical-GEMM kernel's canonical home is `lance-graph::blasgraph` (the bit-exact cognitive-side substrate). *(Corrected 2026-07-16, audit #3: blasgraph's shipped semirings are binary-Hamming over 16384-bit BitVec — the numerical f32 min-plus kernel is UNWRITTEN and lands there when A6 wires it; the only shipped min-plus today is `bgz17::ScalarCsr::spmv_min_plus`, a lossy-sibling prototype.)* Post-Plan-H, `ndarray-codec → lance-graph::blasgraph` is allowed because both are sibling crates above `ndarray` hardware.
**Codec layer:**~30-50 LoC per stage to wrap the BLAS call into the predict/A6/A4 flow. **BLAS layer:**zero new lines — all four already exist or land via existing infrastructure (`bf16_tile_gemm`, `cam_pq`, `simd_int_ops`).
221
+
**Codec layer:**~30-50 LoC per stage to wrap the BLAS call into the predict/A6/A4 flow. **BLAS layer:**the four wrapper APIs above still require implementation — what exists today is the underlying infrastructure they compose (`bf16_tile_gemm`, `cam_pq::kmeans` + `CamCodebook::distance_batch`, `simd_int_ops`); the wrappers are thin but not written (corrected 2026-07-16 — the earlier "zero new lines, all four already exist" overstated).
222
222
223
223
This is what makes R-3's ≤1500 generic-codec-LoC ceiling reachable. Most of the heavy lifting is already in `blas_level2`; the codec adds wrappers and orchestration, not new BLAS code.
0 commit comments