Skip to content

docs(onnx) S3d: Tensor × DR × Hybrid crossover + compiled Palette quality arm - #1748

Merged
AdaWorldAPI merged 6 commits into
mainfrom
research/d-onnx-relalg-s3d-physical-20261023
Oct 23, 2026
Merged

AdaWorldAPI merged 6 commits into
mainfrom
research/d-onnx-relalg-s3d-physical-20261023

Conversation

@AdaWorldAPI

@AdaWorldAPI AdaWorldAPI commented Oct 23, 2026 •

Copy link
Copy Markdown
Owner

S3d: Tensor × DR × Hybrid, with existing compiled Palette as a separately admitted candidate

Status: draft differential benchmark specification. No new kernel, optimizer, JIT or speedup claimed.

Existing hardware-aware execution is real, but not generic ONNX equivalence

  • #1685: 12.4µs direct register; 14µs support+POPCNT; 57.5µs dense INT8 packed tile; 147–151µs coordinate baseline. This is relational SQL Bag/Distinct, not a numeric ONNX MatMul win.
  • ndarray #42: existing registered 256² CompiledAttention table lookup with conventional MatMul fallback.
  • ndarray #100: existing 256-centroid CompiledLinear path with VNNI/scalar tiers.
  • Burn SIMD float_tanh and ndarray NEON/parity infrastructure already exist.

Eligibility and fourth evaluation candidate

The original T/D/H (Tensor, DR typed fold, Hybrid per-tile) comparison retains one exact ONNX mathematical contract and an independent oracle. Add an explicit P: existing compiled Palette/BGZ/Helix lane as a separate model-specific approximate quality frontier, unless a restricted exact parity domain is established.

Current Burn compiled caches key on d_head or matrix shapes and do not verify weight/model/layer/codebook identity. Compiled attention ignores runtime lhs/rhs and returns scaled distance; centroid linear omits full zero-point bias correction. P is not an eligible transparent ONNX MatMul arm by default. Reuse requires admitted identity and explicit error contract (see #1749).

Falsifiable benchmark matrix

Per-tile sparse/dense crossover; prepacked Tensor baseline; H switching overhead; cold/warm/repeated N and incremental updates; model/layer/codebook cache validation, stale rebinding and output materialization; x86 AVX/AMX and already-existing ARM NEON measured only on actual hardware. Track calibration+packing+transfer+cache invalidation costs independently. Quality metrics (max/tail error and held-out task quality) separate from exact semantic oracle. Include collision, zero-point, NaN/Inf, codebook saturation and multi-hop failures (#1726/#1731).

Gate: T/D/H independent numeric parity for an actual admitted ONNX operator, plus optional P-frontier only with quality/identity admission and honest cost. A fast wrong result is refused.

Dependencies #1744 / #1745 / #1750 S0 owner ruling; #1746 semantic intake; #1747 focus; #1749 compiled numerical identity; EXO-50. No executable work authorized.


Benchmark input and approximation gate: #1751

#1751 will research offline Optimum export, reference validation and a non-destructive BGZ/Palette sidecar. Reuse its eventual pinned BERT-layer numerical fixtures rather than writing another model-exporter. T/D/H remain comparable exact-or-declared-tolerance arms. Existing compiled Palette is a separate quality-bound candidate P, not exact ONNX MatMul by default. Include model/layer/weight/codebook witness, calibration/packing/amortization, and held-out quality as distinct from exact parity. No unguarded Burn d_head/shape cache, no new tensor executor.

⊘ Supersession — D-NFC (2026-10-23, operator-approved architecture correction)

Canonical dependency diagram and root assumptions: #1753 (d-native-first-dependency-correction-v1.md); shipped / lab / missing seams: d-native-repr-contract-v1.md there.

P0 invariants. (1) ONNX is an external mathematical compatibility specification; the existing R2IL polyfill is the native starting point; no ONNX graph, Tract runtime or Optimum dependency in the internal execution path. (2) Quack binding + DR64³ + Palette256³ is the intended native representation; existing R2IL, mask-risc, BGZ, Helix and ndarray primitives are reused; implemented components and unimplemented integration contracts are kept apart.

[1] R2IL router (once per ClassId; strategies SHIPPED, #1752) → [2] Quack binding (SHIPPED; store MISSING)
→ [3] DR64³ geometry (LAB; 3rd axis PROPOSED) → [4] Palette256³ (SHIPPED; DR binding MISSING)
→ [5] native execution: mask-risc + ndarray::simd (SHIPPED) → [6] egglog laws (LAB, Boolean only)
→ [7] ONNX conformance adapters (PROPOSED) → [8] Tract/ORT oracles, Optimum (OPTIONAL)

⊘ Layer [1] correction (2026-10-23, #1753 commit ace69d64c, #1752 plan §10). Layer [1] is the R2IL router, which resolves a route once per ClassId: DIRECT or COMPOSE onto ndarray::simd, LOWER to r2sleigh only for machine semantics, or REFUSE. lance-graph-r2il procedures + FoldDialect are one strategy beneath it, not the layer. No operation in this plan needs R2Sleigh.

For this PR:

  1. Native methods first. Benchmarks compare physical implementations (tensor / DR / hybrid / palette) of one native mathematical contract with an independent oracle. The lab(mpf): D-MPF-1 — the Stage 1 math polyfill already exists; one expression, oracle, refusals, cost split #1752 layer benchmark is the baseline shape: ndarray → mask-risc → R2IL, with a fair scalar loop alongside (A3).
  2. ONNX conformance is a separate test dimension on the same operations, not the definition of the benchmarked operation (A3).
  3. The prerequisite on docs(onnx) S1–S2: semantic intake and minimal RelAlg polyfill plan #1746 typed ONNX intake is removed (A2). The prerequisite is a native contract with an oracle.
  4. The architectural target is not the benchmark winner. DR64³ + Palette256³ is the intended representation; a benchmark decides only its physical realization (A5).
  5. Exact versus approximate. A compiled palette candidate competes only on a declared approximate frontier with a named error contract; its fallback is the exact native method.

Where this description or the plan says otherwise, it is superseded at the marked ⊘ points (plan commit 841f38b7e). Nothing is merged, no ABI or execution contract changes, and the #1744 / #1745 / #1750 S0 dispute is unchanged.

@coderabbitai

coderabbitai Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 95cb3d01-7fc5-4e9b-9f23-db9f21462818
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Warning

Billing warning: we have not been able to collect payment for this subscription for more than 72 hours. Please update the payment method or pay any pending invoices in Billing to avoid service interruption.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@AdaWorldAPI AdaWorldAPI changed the title docs(onnx) S3d: three-arm Tensor × DR × Hybrid physical shootout docs(onnx) S3d: Tensor × DR × Hybrid crossover + compiled Palette quality arm Oct 23, 2026
AdaWorldAPI and others added 2 commits October 23, 2026 22:24
Architecture correction approved by the operator on 2026-10-23. Adds one
marked supersession block under the title and inline markers on the
sentences that state a root assumption (A1-A7). Canonical text and the
representation seams are in #1753
(d-native-first-dependency-correction-v1.md, d-native-repr-contract-v1.md).
No other text in this plan changes; the #1744/#1745/#1750 S0 dispute is
unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01G22yT6htkcdyXsihxxXdrg
@AdaWorldAPI
AdaWorldAPI marked this pull request as ready for review October 23, 2026 22:13
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-23T22:13:45.281204Z 841f38b Draft marked ready
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

…1754)

Marked supersession: 'R2IL polyfill' reads as the R2IL router
(D-MPF-4), and [7] is the lance-graph-onnx leaf facade.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01G22yT6htkcdyXsihxxXdrg
@AdaWorldAPI
AdaWorldAPI merged commit 6a02664 into main Oct 23, 2026
4 checks passed
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