interplane.Get Omega
Read in your language

omega-mv

Omega: a language for verified programs, semantic identity and machine realization. Seed-born work and existing implementations have distinct provenance.

Brought by drakestapleton

branch main Branches Tags History

omega-mv / docs / tensor / M20_OMEGA_TENSOR.md

197 lines · 28360 bytes Raw Blame History Rendered
1# M20 OMEGA_TENSOR: semantic layer and CPU realization
2
3Status 2026-10-01: **M20 NOT QUALIFIED.** The semantic layer and the CPU
4realization exist and pass their CPU tests. E1 (numeric closure) PASSED on
5main 4863803 (receipt merged in omega#177). M20 qualification was blocked on
6GB10 parity, crash-safe storage and a receipt. Correction 2026-10-27: GB10
7parity ran after this status was written and passed once on the GB10 at merged
8main f633e343 on 2026-10-02 (row "GB10 parity"). Crash-safe storage is PASS
9(CPU) in the table below. No M20 receipt from `tools/m20_receipt.sh` exists
10yet, so M20 stays NOT QUALIFIED; one run on one host is EXERCISED on GB10.
11
12Plan source: `aien-architecture/CURRENT_EXECUTION_PLAN.md`, section
13"E2. M20 OMEGA_TENSOR". "M20" here means OMEGA_TENSOR only; the runtime
14composition program is COMPOSITION-1/2, not M20.
15
16## Files
17
18| File | Role |
19|---|---|
20| `src/tensor/omega_tensor.h` | The meaning: dtypes, shapes, strides, views, identity, storage lifetime, every op's definition, the realization table |
21| `src/tensor/omega_tensor.c` | Semantic layer: checks, descriptor arithmetic, data movement. No floating-point arithmetic |
22| `src/tensor/omega_tensor_cpu.c` | CPU realization table (E1 CPU tier) |
23| `src/tensor/omega_tensor_reduce_seam.{h,c}` | The single seam to the E1 reduction contract (PR #134) |
24| `tests/test_omega_tensor.c` | CPU tests against an independent naive reference |
25| `tools/tensor_mutations.sh` | Source mutation sweep |
26| `mk/tensor.mk` | `make test-tensor`, `make test-tensor-mutations`, `make test-tensor-e1-reduce` |
27
28## Definitions
29
30- **Tensor**: immutable. dtype, rank 0..8, every dimension >= 1, at most
31 2^30 elements. No API writes into an existing tensor: creation copies the
32 caller's data, every op returns a new tensor, views share storage
33 read-only.
34- **Dtypes**: FP32 is the arithmetic dtype. F16 and BF16 are storage dtypes;
35 arithmetic on them is refused. `omega_tensor_cast` converts with the E1 ops
36 (F32_TO_F16 / F32_TO_BF16 RNE, F16_TO_F32 / BF16_TO_F32 exact).
37 F16 <-> BF16 directly is refused.
38- **Strides**: in elements, >= 0. Zero only in broadcast views. Negative
39 strides are not defined.
40- **Value identity** (`omega_tensor_value_id`): SHA-256 over
41 `OMEGA_TENSOR_VALUE_ID_V1`, dtype, rank, shape and the elements in logical
42 row-major order, every NaN canonicalized (NaN payload is not semantic),
43 -0 and +0 distinct. Strides, offset and storage are not part of it: a
44 transposed view and its dense copy have the same value id.
45- **Storage identity**: storage slot + 64-bit generation.
46- **View identity** (`omega_tensor_view_id`): storage identity + parent
47 tensor + dtype + offset + shape + strides.
48- **Storage lifetime**: releasing bumps the slot generation; any access
49 through an older handle, including every view of released storage, returns
50 `OMEGA_TENSOR_ERR_STALE` and computes nothing. A reused slot always has a
51 new generation (no ABA). A slot whose generation reaches UINT64_MAX is
52 retired forever instead of wrapping. Releasing a view releases only the
53 view descriptor; releasing the owning tensor releases its storage too.
54- **Broadcasting** (numpy rules): align at the trailing axis, missing leading
55 axes count as 1, per axis sizes must be equal or one of them 1; result is
56 the larger. Otherwise `OMEGA_TENSOR_ERR_SHAPE`.
57- **Views**: permute / transpose (last two axes), slice (start < stop <= dim,
58 step >= 1), reshape (view only if row-major contiguous, else
59 `OMEGA_TENSOR_ERR_NOT_CONTIGUOUS`; `omega_tensor_contiguous` makes the copy
60 explicit), broadcast_to (zero strides). Every view is bounds checked
61 against its storage when made.
62- **Elementwise**: SQRT; EXP2, LOG2, SIGMOID, TANH (E1 bounded contract, not
63 correctly rounded: bit-exact with the E1 CPU sequences per element, max ulp
64 EXP2 2, LOG2 2, SIGMOID 3, TANH 3); ADD, SUB, MUL, DIV (omega_math_div), MIN, MAX, the
65 14 compare-select predicates (out = P(a, b) ? a : b); FMA (a*b+c rounded
66 once). All E1 scalar ops, all operands broadcast together.
67- **Reductions** along one axis, SUM / MAX / MIN / MEAN, keepdims optional,
68 order `RECURSIVE_TILE32_PAIRWISE_TREE_LANE_DELTA_16_8_4_2_1_PAD_IDENTITY_MIN_ONE_LEVEL`
69 (identical string to E1 WP-D, PR #134).
70- **Matmul**: `[M,K] x [K,N]`, any M, N, K >= 1, and batched
71 `[...,M,K] x [...,K,N]` with broadcast batch axes. Declared order
72 `OMEGA_TENSOR_MATMUL_DECLARED_ORDER`: each product rounded once (FMUL RNE,
73 no fusion), then the E1 SUM tree above over k. A Tensor Core / FFMA-chain
74 realization computes different bits and must declare its own bounded
75 contract.
76- **Meaning vs realization**: `OmegaTensorRealization` is a function table
77 (elementwise E1 op over dense buffers, reduce over a dense row, declared
78 order string). The semantic layer refuses a table whose order string is not
79 the declared one. CPU fills it; a GB10 SIMT table
80 (`src/tensor/omega_tensor_gb10.c`, M20 cut gb10) is written, and its parity
81 ran once on the GB10 at f633e343 (row "GB10 parity"); a Tensor Core table
82 would come later. No GB10 code is referenced
83 by the semantic layer.
84
85### What "beyond the old narrow kernel" means
86
87The old M18 tensor matmul (`src/omega_blackwell_matmul.*`) takes raw
88contiguous buffers, caps M, K, N at 1024, supports INT32 / FP16 / BF16 inputs
89with no declared FP32 accumulation order, and has no strides, views,
90broadcast or batch. `src/omega_matvec.*` is a uint64 matrix-vector with fixed
91maximum shapes. M20 here: any shape up to 2^30 elements, FP32 with a named
92accumulation order, strided / transposed / sliced / broadcast operands,
93broadcast batches. The GB10 realization of this general matmul (FMUL_RNE
94products + the E1 tree, `src/tensor/omega_tensor_gb10.c`) is written; its
95parity passed once on the GB10 at f633e343 (row "GB10 parity").
96
97## Multi-axis reduce and unbroadcast (CR-5)
98
99Answers LT-M21 CR-5 (autodiff needs broadcast backward). Both ops are
100compositions of the existing single-axis `omega_tensor_reduce`
101(`src/tensor/omega_tensor.h:327-329` at the rebased head ca133e9), so their bits are
102defined by the frozen E1 reduction order above and nothing else.
103
104- `omega_tensor_reduce_axes(ctx, op, t, naxes, axes[], keepdims, out)`.
105 **Declared order:** one single-axis `omega_tensor_reduce` per listed axis,
106 in DESCENDING axis index, each with the caller's keepdims. The caller may
107 list the axes in any order; they are sorted. Descending keeps the remaining
108 indices valid when keepdims is false. Duplicate axes, an axis >= rank, or
109 more axes than the rank: `OMEGA_TENSOR_ERR_AXIS`. `naxes == 0`: dense copy,
110 no arithmetic. **MEAN over more than one axis is refused**
111 (`OMEGA_TENSOR_ERR_BAD_ARGS`): a chain would be a mean of means, which
112 rounds differently from one mean over all elements. Sum, then divide.
113- `omega_tensor_sum_to_shape(ctx, t, rank, shape, out)`: the unbroadcast
114 used by broadcast backward, numpy rules. Shapes align at the trailing axis.
115 Leading axes of t are summed away; aligned axes where the target is 1 and t
116 is larger are summed with keepdims. Axes of size 1 in t are never reduced
117 (their bits are copied, `-0` included). **Declared order:** those SUM
118 reductions as single-axis calls in DESCENDING axis index of t, then a bit
119 copy into the target shape. Refused: target rank above t's rank, or an
120 aligned target size that is neither t's size nor 1
121 (`OMEGA_TENSOR_ERR_SHAPE`); zero dim (`OMEGA_TENSOR_ERR_SHAPE`); rank > 8
122 (`OMEGA_TENSOR_ERR_RANK`); non-F32 (`OMEGA_TENSOR_ERR_DTYPE`).
123- GB10: these ops add no kernel; they call the realization's single-axis
124 `reduce`. The GB10 table (row "GB10 parity" below) is written but its
125 parity is NOT_RUN, and the chip gate has no case for these two ops, so GB10
126 for these ops is NOT_RUN.
127
128## Reduction seam
129
130The seam calls `omega_reduce_cpu` from `src/omega_numeric_reduce.h` (E1 WP-D,
131omega #134, merged c54d492); a `_Static_assert` and a runtime check pin the
132order string. Before #134 merged, a local copy of the order was cross-checked
133bit-identical against #134 head 6da80bf (same KAT value id); that copy is now
134removed. Order and padding mutations are caught by the E1 WP-D suite.
135
136## Qualification checklist (plan E2)
137
138| Item | Status | Evidence |
139|---|---|---|
140| Shape / type checks | PASS (CPU) | `test-tensor`: rank, zero dim, size overflow, dtype, K mismatch, axis, perm, unknown op refusals |
141| Broadcasting | PASS (CPU) | 8 shape cases incl. 3 refusals; 5 value cases x 20 binary ops vs index-arithmetic reference; broadcast_to zero strides |
142| Views / strides | PASS (CPU) | permute, slice with steps, transpose of slice == slice of transpose, view of view of view, zero-stride transpose, reshape refusals, bounds |
143| Generation safety | PASS (CPU) | use after release, double release, stale view of released storage (read, info, op, matmul, view, id), no ABA on slot reuse, UINT64_MAX retirement |
144| Immutability / no in-place | PASS (CPU) | no write API exists; input value ids unchanged by every op; outputs never alias inputs |
145| CPU parity | PASS (CPU) | every op bit-exact vs independent reference (omega_ref_*, omega_ieee_div/sqrt, omega_ref_ffma_int, own tree copy), random + all special pairs |
146| Transcendental unary ops (EXP2, LOG2, SIGMOID, TANH) | PASS (CPU) | Host PASS, CPU tier: forge log `HIVE-M20-transc-175026` (`test-tensor` + `test-tensor-mutations`, 7/7 mutants caught). Bounded contract, NOT correctly rounded (max ulp EXP2 2, LOG2 2, SIGMOID 3, TANH 3; `docs/numeric/E1_TRANSCENDENTAL_CONTRACT.md`). `test-tensor` section 7b: raw-bit equality with direct `omega_math_*` calls on dense, transposed, strided-slice-with-offset, transpose-of-slice, broadcast row/scalar and rank-0 operands incl. specials; canonical qNaN; unknown op / F16 / stale / missing `transc` entry refused. Mutants `TRANSC_EXP2_LOG2_SWAP`, `UNARY_VIEW_STRIDE` in `test-tensor-mutations` |
147| Constants and NEG (`omega_tensor_full`/`zeros`/`ones`, `OMEGA_TU_NEG`; answers LT-M21 CR-2) | PASS (CPU) | Host: PASS, CPU tier: forge log `HIVE-M20-const-light-193345` at pre-stack head 049611c (488 pass, 0 fail plain and ASan/UBSan; 11/11 mutants caught); re-run at stacked head queued. GB10: NOT_RUN (no chip run covers these ops; the GB10 table is in row GB10 parity). Declared result, one per op: `full(v)` fills every element with the exact F32 bits of `v` (-0.0 and NaN payload kept, no canonicalization; value ids still treat all NaNs as one); `zeros` = bits `0x00000000`; `ones` = `0x3f800000`; shape rules as `from_f32` (rank <= 8, dims >= 1, elements <= 2^30, else typed error; the 2^30 boundary itself is not allocated in tests, only 2^30+1 and 2^31 are refused). `NEG` = flip bit 31 with no arithmetic and no E1 call, so neg(+0) = -0 and neg(-0) = +0 (`0 - x` would give +0, wrong); any NaN in gives the canonical quiet NaN `0x7fc00000`, matching the E1 convention "NaN results are the canonical quiet NaN" (`src/omega_numeric.h:137`); F16/BF16 refused; works with a realization that has no `transc` entry. Tests (`test-tensor` section 7c): bit-exact contents, rank 0 and 8, refusals, NEG on the 20-value special grid vs an independent bit rule, NEG through transpose, strided slice and broadcast views. Mutants `ZEROS_NEG0`, `NEG_SUB`, `NEG_NAN`, `FULL_CANON` in `test-tensor-mutations` |
148| GB10 transcendental tensor ops | PASS (GB10 chip, 2026-10-27, omega `0919efc3c`) | The GB10 table's `transc` entry (`src/tensor/omega_tensor_gb10.c`, `gb10_transc`) sends each of the eleven bounded-contract unary ops (EXP2 LOG2 SIGMOID TANH SIN COS ERF GELU RSQRT EXP LOG) to its E1 row-10 whole-program kernel through `omega_ds_gb10_run`, chunked by `OMEGA_DS_MAX_BATCH`; SQRT, RELU, NEG and unknown ops are refused with `OMEGA_NUMERIC_ERR_NOT_ENCODED`, never served by the CPU tier. Host gate (`make test-tensor-gb10-host`, no device): every op names its own kernel (`omega_tensor_gb10_transc_kernel`), that kernel's host model equals the CPU table's `transc` bit for bit on the specials grid plus 512 random patterns, counterexample maps (EXP<->LOG, RELU mapped) fail the check, mutants `GB10_TRANSC_EXP_LOG_SWAP` and `GB10_TRANSC_NO_CPU_FALLBACK` (nm) caught. Chip parity: eleven `un_<OP>` cases in the chip gate, `TENSOR_GB10_PARITY: PASS (99 of 99 cases bit-exact value ids)`, `TENSOR_GB10_MUTANTS: PASS (3 of 3 caught on chip)`, physics `048e5f5`, receipt `evidence/M20-TENSOR-GB10/a00b4178fe331647296d85a02b87f419ef55e53a38254ed2e879debf85209e2d.json` |
149| Unary ops EXP, LOG, RELU (M20 cut ops, LT-M21 CR-1..CR-5) | PASS (CPU) | Host PASS, CPU tier: forge log `HIVE-M20-ops-light-185351` at pre-stack head 1e16a8d, re-run at stacked head queued (`test-tensor` 438 pass / 0 fail plain and ASan/UBSan; `test-tensor-mutations` 10/10 tensor mutants caught). EXP / LOG: `OMEGA_TU_EXP` / `OMEGA_TU_LOG` call the E1 Omega-defined polynomials `omega_math_exp` / `omega_math_log` (`src/omega_numeric.c:458`, `:501`) once per element through the CPU `transc` entry; the result must equal a direct E1 call bit for bit. NOT correctly rounded: E1 checks them only against binary128 within EXP 40 ulp, LOG 4 ulp (`tests/test_omega_numeric.c:376-384`; `docs/numeric/E1_GAP_TABLE.md` row 8 and the `CPU_TIER_INDEPENDENT_ORACLE` line). RELU: no E1 op; tensor-layer bit select with no float arithmetic (`src/tensor/omega_tensor.c` `relu_bits`): x > +0 (incl. +subnormals, +inf) -> x; +0, -0, negatives, -inf -> +0.0; any NaN -> canonical qNaN `OMEGA_QNAN_BITS` 0x7fc00000 (`src/omega_numeric.h:48`, as E1 returns, e.g. `src/omega_numeric.c:459`). Tests: section 7b runs EXP / LOG / RELU raw-bit vs direct E1 (RELU vs an independent field-classifying reference) on dense, transposed, strided-slice, transpose-of-slice, broadcast row/scalar and rank-0 views incl. specials (+-0, +-inf, NaN payloads, subnormals, +-2^31, exp cutoffs 88.7228 / -104); section 7c: RELU explicit bit table (-0 -> +0, NaN payloads -> 0x7fc00000), served without a `transc` entry, F16 / stale refused. Mutants `TRANSC_EXP_LOG_SWAP`, `RELU_NEG_ZERO`, `RELU_NAN_PAYLOAD` |
150| GB10 EXP / LOG tensor ops | PASS (GB10 chip, receipt `a00b4178`, row above) | Served by the `transc` entry above through the row-10 kernels `body_exp` / `body_log` (`src/omega_numeric_divsqrt_gb10.c`, `docs/numeric/E1_GAP_TABLE.md` row 10) |
151| GB10 RELU tensor op | NOT_RUN | RELU is a tensor-layer bit select with no realization call, so a GB10 context would run the same host code; no GB10 run in this work |
152| Unary ops RSQRT, ERF, GELU (LT-M21 CR-1 part) | PASS (CPU) | Host PASS, CPU tier: forge log `HIVE-M20-unary2-light-193221` at pre-stack head cc0c66d; re-run at stacked head queued (job `HIVE-M20-unary2`). `OMEGA_TU_RSQRT`, `OMEGA_TU_ERF`, `OMEGA_TU_GELU` appended after `OMEGA_TU_RELU` in the stack (no renumbering); the CPU `transc` entry calls `omega_math_rsqrt` / `omega_math_erf` / `omega_math_gelu` (`src/omega_numeric_transc.h:47,50,53`) once per element, no other arithmetic. Declared result: bit-identical to a direct E1 call on each logical element (raw bits, canonical qNaN `0x7fc00000` per `src/omega_numeric_transc.h:20`). Accuracy is E1's, not the tensor layer's: RSQRT correctly rounded (`OMEGA_TRANSC_MAX_ULP_RSQRT 0`, `src/omega_numeric_transc.h:34`; `docs/numeric/E1_TRANSCENDENTAL_CONTRACT.md:45,99`); ERF bounded contract, max 3 ulp (`transc.h:37`; contract `:48,102`); GELU (erf form, `x Phi(x)`) bounded contract, max 3 ulp (`transc.h:40`; contract `:50,105`). Tests: section 7b cases (dense, transpose, strided slice with offset, transpose of slice, broadcast row and scalar, rank 0, F16 / stale / missing-entry refusals) and section 7c (contract edge inputs on dense and step-2 strided slice vs direct E1, plus contract-stated values such as RSQRT(-0) = -inf, ERF(4) = 1, GELU(-inf) = -0). Mutants `TRANSC_RSQRT_ERF_SWAP`, `GELU_VIEW_STRIDE` (9 source mutants in the sweep with these two) |
153| GB10 unary ops RSQRT, ERF, GELU | PASS (GB10 chip, receipt `a00b4178`) | Served by the `transc` entry above through the row-10 kernels for RSQRT, ERF and GELU, whose standalone GB10 runs are exhaustive (E1 transc receipts); the tensor-layer chip cases `un_RSQRT`, `un_ERF`, `un_GELU` PASS in `evidence/M20-TENSOR-GB10/a00b4178…json` |
154| Trig unary ops (SIN, COS) | PASS (CPU) | Answers LT-M21 CR-1 (trig part); branch `hive/M20-trig`, forge job `HIVE-M20-trig`. `OMEGA_TU_SIN`, `OMEGA_TU_COS` appended after `OMEGA_TU_GELU` in the stack (no renumbering); the CPU `transc` entry calls `omega_math_sin` / `omega_math_cos` (`src/omega_numeric_transc.h:51-52`) once per element. Declared result: bit-identical to the direct E1 call on the logical element. Domain (E1 rule, `src/omega_numeric_transc.h:43` `OMEGA_TRANSC_TRIG_MAX_ABS`, `src/omega_numeric_transc.c:517` sincos_core): admitted `abs(x) <= 2^22` inclusive; outside it, +-inf and NaN give the canonical qNaN `0x7fc00000`; sin(+-0) = +-0, cos(+-0) = +1 (`docs/numeric/E1_TRANSCENDENTAL_CONTRACT.md:49`). Accuracy: bounded contract, NOT correctly rounded, max 2 ulp each inside the domain (`src/omega_numeric_transc.h:38-39`, observed 1; `docs/numeric/E1_TRANSCENDENTAL_CONTRACT.md:103-104`). Tests: SIN/COS join section 7b (dense, transpose, strided slice, transpose of slice, broadcast, rank 0, refusals) and new section 7c (grid incl. +-0, +-2^22, +-nextup(2^22), +-nextdown(2^22), inf, NaN, sNaN, through dense, broadcast and strided-slice views: bit-exact vs E1 plus an independent domain-rule check). Mutants `TRIG_SIN_COS_SWAP`, `TRIG_DOMAIN_NUMBER` (out-of-domain NaN replaced by a number). Host PASS, CPU tier: forge log `HIVE-M20-trig-light-193303` at pre-stack head 2a7da1a (425 pass, 0 fail, ASan/UBSan clean, sweep 9/9); re-run at stacked head queued |
155| GB10 trig tensor ops (SIN, COS) | PASS (GB10 chip, receipt `a00b4178`) | Served by the GB10 `transc` entry (row "GB10 transcendental tensor ops") through the row-10 SIN / COS kernels, whose standalone GB10 runs are exhaustive (E1 transc receipts); the tensor-layer chip cases `un_SIN`, `un_COS` PASS in `evidence/M20-TENSOR-GB10/a00b4178…json` |
156| Mask compare CMP_EQ/NE/LT/LE/GT/GE + `omega_tensor_where` (CR-3) | NOT_RUN | Host: NOT_RUN until the forge reports (job `HIVE-M20-mask`; no PASS receipt yet; run at stacked head queued). Declared bits: CMP_P(a, b) = +1.0 (0x3f800000) if the ordered E1 predicate of FSETP_EQ/NE/LT/LE/GT_SEL or FSETP_SEL (GE) holds, else +0.0 (0x00000000), never -0.0; predicate = `omega_ref_fsetp_pred` (`src/omega_numeric.c:322`, masks at :293-308): false if either operand is NaN (CMP_NE included, unlike IEEE !=), -0 == +0. CPU realization: optional `compare` entry, FCMP + FCSEL(+1.0, +0.0) on the same AArch64 conditions as the E1 CPU compare-select (`src/omega_numeric.c:1396-1418`); a table without it refuses CMP_* with `OMEGA_TENSOR_ERR_REALIZATION`. `where(cond, a, b)`: bit copy of a or b (no arithmetic), cond/a/b broadcast together; any cond element other than 0x3f800000 / 0x00000000 (incl. -0.0, NaN, 0.5) refused with new `OMEGA_TENSOR_ERR_MASK` (-12), nothing made. Tests: every predicate on the 20x20 special grid + random pairs vs independent loop (strict bits), where(CMP_P) == SEL_P, broadcast + transposed/sliced views, refusals. Mutants: CMP_FALSE_NEG_ZERO, CMP_EQ_NAN_TRUE, WHERE_ACCEPTS_HALF |
157| GB10 mask compare / where (CR-3) | NOT_RUN | No GB10 `compare` entry. E1 has GB10 encodings for the FSETP_<P>_SEL compare-select ops (`src/omega_numeric.c:915-934`) but no compare-to-mask kernel; where() is data movement only. The GB10 table of this PR leaves `compare` NULL on purpose. A host self check in `tests/test_omega_tensor_gb10.c` (no device) requires each of the six CMP_* ops to be refused with `OMEGA_TENSOR_ERR_REALIZATION` with no tensor or storage slot made and no numeric call, and rejects a counterexample table that has a compare entry set. The six CMP_* ops are not chip parity cases (chip case count 99 with the eleven transc cases). CPU tier only in this cut; NOT_RUN at this head |
158| General matmul | PASS (CPU) | 1x1x1, 7x13x5, 64x64x64, 129x3x257, 3x1025x2, 1x33x1, strided views, batched broadcast [2,1,3,4]x[5,4,6] |
159| Reductions | PASS (CPU) | lengths 1..32769 across tile/level edges, every axis of [3,37,5], keepdims, view vs copy, -0 sum |
160| Multi-axis reduce, sum_to_shape (CR-5) | NOT_RUN | `tests/tensor_reduce_multi_tests.inc` (run by `test-tensor`): every axis subset of a [3,5,4,6] tensor x SUM/MAX/MIN (MEAN single axis) x keepdims vs an independent descending-order reference and vs the explicit single-axis reduce chain; strided view == copy; sum_to_shape(broadcast_to(x, S), shape(x)) exact for 6 shape pairs; refusals (duplicate / out-of-range axes, MEAN over 2 axes, incompatible shape, rank, dtype, stale). Mutants REDUCE_AXES_DESCENDING, REDUCE_AXES_KEEPDIMS, SUM_TO_SHAPE_SIZE1 added (tensor sweep now 27 source mutants at this head, 33 with the 6 store mutants, counted from the MUTATIONS and STORE_MUTATIONS lists in tools/tensor_mutations.sh). Host receipt at a6618da: PASS (919 / 0, 30 of 30 mutants at that head, log LT-M20B-reduce-light-052347); rebased head receipt queued (NOT_RUN until the forge reports). GB10 NOT_RUN |
161| Mutation / refusal | PASS (CPU) | `test-tensor-mutations`: 10/10 tensor source mutations caught (forge log `HIVE-M20-ops-light-185351`); 2 in-process mutant realizations (sequential sum, FFMA chain) caught; wrong order string refused |
162| Determinism | PASS (CPU) | repeated run same value id; frozen KAT value id in the test |
163| Test-only hook not in library | PASS (CPU) | `omega_tensor_test_set_storage_generation` exists only under `-DOMEGA_TENSOR_TEST_HOOKS` (test builds in `mk/tensor.mk`); `test-tensor-no-hooks` (run by `test-tensor`) builds the default objects and fails if `nm` shows the symbol |
164| CI | WIRED | `host-suites-2.yml` job `tensor`: `test-tensor` + `test-tensor-mutations` on the AArch64 hosted runner (not the Spark, not a qualification) |
165| GB10 parity | PASS (GB10, one run) | Receipt `evidence/M20-TENSOR-GB10/dfea667b65a0a955a32b03f6e3ba8c7de3a96cd3777c770a6722a279feb55f8d.json`, at merged main f633e343, host spark-b87b, kernel 7.0.0-1019-nvidia, 2026-10-02T08:53:44Z to 08:58:16Z, trees clean before and after. Chip log blob `evidence/M20-TENSOR-GB10/blobs/9d8fced2f1943ff481a24750b93152956ee31fbe5d4b8b9cae1c9e99d06cd746.log`: `cases: 88`, `TENSOR_GB10_HOST: PASS (29 checks, 0 failed)`, `TENSOR_GB10_PARITY: PASS (88 of 88 cases bit-exact value ids)`, `TENSOR_GB10_MUTANTS: PASS (3 of 3 caught on chip)` (WRONG_REDUCE_ORDER, FFMA_MATMUL, SWAPPED_OPERAND), `M20 Tensor GB10 Verdict: PASS`. An earlier PASS receipt at the rebased branch head 1e41c53c (2026-10-02T07:34:50Z) is also committed. Gate: `tests/test_omega_tensor_gb10.c` + `tests/run_tensor_chip.sh`; GB10 table `src/tensor/omega_tensor_gb10.c` (E1 SIMT elementwise, `omega_reduce_gb10`, matmul = FMUL_RNE products + E1 tree, batched per block). The six CMP_* ops are excluded from the parity cases because the GB10 table refuses them (row "GB10 mask compare / where"), and the multi-axis reduce / sum_to_shape ops have no chip case. History: the pre-rebase head 898bd05 also passed (receipt `797c6972…`), and two receipts at earlier commits 77729522 and 77560d86 are FAIL. One run at one commit is not a qualification; it was not repeated at the current head. Correction 2026-10-27: this row said NOT_RUN after the receipt above existed. |
166| GB10 general matmul (Tensor Core beyond narrow K/tile) | MISSING_IMPLEMENTATION | not built on purpose: MMA accumulates with fused, differently ordered additions, so it cannot give the declared bits; it needs its own declared bounded contract first. The GB10 table uses SIMT FMUL + the E1 tree instead |
167| Crash-safe storage lifetime | PASS (CPU) | host PASS, forge log HIVE-M20-lifetime-light-182200 (`test-tensor-store` 314/0 plain + ASan/UBSan, 6/6 store mutants caught, hook absent from default build). `src/tensor/omega_tensor_store.{c,h}`: content-addressed payloads + checksummed journal, temp/fsync/rename/fsync-dir commit; recovery replays the journal, re-hashes every payload, refuses torn/short/corrupt records (typed errors), keeps generations monotonic; `test-tensor-store` (round trip, fork crash at all 8 commit phases, journal/payload truncated at every byte and bit-flipped, crafted journals) + 6 store mutants in `test-tensor-mutations` |
168| Reproducible receipt | PASS (CPU) | writer implemented and host-tested: `tools/m20_receipt.sh` writes `<evidence-dir>/<sha256>.json` (0444, exclusive, never overwritten), QUALIFIED only with GB10 parity GB10 PASS + matching chip evidence; `test-m20-receipt` + 11 receipt mutants in `test-tensor-mutations`, forge log HIVE-M20-receipt-175835. No real M20 receipt has been written yet. GB10 parity evidence now exists at f633e343 (row "GB10 parity"), but the writer has not been run against it. |
169| E1 numeric closure | PASS (on main) | E1 PASSED on main 4863803; receipt merged in omega#177 |
170| Placement: embed + concat (CR-4, answers LT-M21 CR-4) | PASS (CPU) | Host PASS, CPU tier: forge log `HIVE-M20-scatter-light-193431` at pre-stack head d99af69; re-run at stacked head queued (job HIVE-M20-scatter). `omega_tensor_embed(ctx, src, rank, out_shape, start, step, out)` is the exact inverse placement of `omega_tensor_slice` (`src/tensor/omega_tensor.h` slice: per axis start < stop <= dim, step >= 1, out dim = ceil((stop-start)/step)). Declared bits: a new dense tensor, all-zero bits (+0.0) everywhere except src element i copied bit for bit (NaN payload and -0 kept, any dtype) to start + i*step per axis; so slice(embed(x), start, start+(n-1)*step+1, step) == x. `omega_tensor_concat(ctx, n, tensors, axis, out)`: parts joined in array order along axis, bit for bit. Both are pure semantic-layer copies (gather + scatter in `src/tensor/omega_tensor.c`), no realization call, no arithmetic. Typed refusals, nothing created: rank mismatch / rank 0 `ERR_RANK`, step 0 `ERR_BAD_ARGS` (as slice), a placed position outside out_shape or start/step overflow `ERR_BOUNDS`, zero dim `ERR_SHAPE`, > MAX_ELEMS `ERR_CAPACITY`, concat dtype mismatch `ERR_DTYPE`, other-axis mismatch `ERR_SHAPE`, axis >= rank `ERR_AXIS`, n = 0 / NULL `ERR_BAD_ARGS`, stale handle `ERR_STALE`. `test-tensor` test_placement: 60 random embed trials vs an independent index-arithmetic reference, slice(embed(x)) == x, embed(slice(y)) zero off the sliced set, transposed / broadcast / F16 sources, 40 random concat trials vs reference and slice recovery, view parts, every refusal. Mutants `EMBED_START`, `EMBED_STEP`, `CONCAT_AXIS_OFFSET` in `test-tensor-mutations`. Gather is OUT OF SCOPE: M20 has no index tensor op, so gather / gather-backward is not provided |
171| GB10 placement (embed, concat) | NOT_RUN | Embed and concat call no E1 op, so the GB10 table (row "GB10 parity") has no kernel for them and no chip gate covers them. CPU tier only in this work |
172
173**M20 verdict: not qualified.** GB10 parity NOT_RUN; receipt writer host PASS,
174no M20 receipt written yet.
175
176Known minor risks of the crash-safe store (neither ever returns wrong data): a
177failed partial save can make a handle read as stale after reopen, and a
178hand-deleted journal restarts the generation numbers.
179
180## Open seams
181
1821. Reductions: DONE, the seam calls `omega_reduce_cpu` (#134 merged).
1832. Transcendentals (#127): CPU tier host PASS (CPU), forge log
184 `HIVE-M20-transc-175026`. `OmegaTensorUnaryOp` gained
185 `OMEGA_TU_EXP2`, `OMEGA_TU_LOG2`, `OMEGA_TU_SIGMOID`, `OMEGA_TU_TANH`
186 (appended after SQRT, no renumbering). They are bounded-contract ops, not
187 correctly rounded: the CPU realization's optional `transc` entry calls
188 `omega_math_exp2/log2/sigmoid/tanh` (`src/omega_numeric_transc.c`) once
189 per element, so tensor output is bit-identical to calling E1 directly;
190 error bounds are E1's (`docs/numeric/E1_TRANSCENDENTAL_CONTRACT.md`).
191 GB10: the GB10 table's `transc` entry runs all eleven on their E1 row-10
192 kernels; host PASS, chip PASS 99/99 (receipt `a00b4178`, row "GB10 transcendental tensor ops").
1933. GB10 realization table: written in M20 cut gb10 (elementwise through the
194 E1 SIMT ops, reduce through `omega_reduce_gb10`, matmul = FMUL_RNE products
195 + the E1 tree, bit-exact to this contract), chip parity PASS 99/99 at omega
196 `0919efc3c` (receipt `a00b4178`). Still open: a
197 Tensor Core path with its own declared bounded contract.