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

[OM-ECOSYSTEM P0] Implement Omega-native tensor, operator, dtype and device semantics

Open · #663 · open 2026-10-23 22:02 UTC

Imported from GitHub aien-dev/omega-mv#663, by drakestapleton

drakestapleton wrote on 2026-10-23 22:02 UTC

Outcome

The shared tensor substrate replaces framework tensor/storage/operator duties across training and inference. Grounding: src/tensor/omega_tensor.{c,h}, omega_tensor_cpu.c, omega_tensor_gb10.c, omega_tensor_store.c and src/omega_numeric* are existing migration inputs. Reuse #625/#628/#638 and CUDApp #35/#16; inspect active .om equivalents first.

  • Freeze storage ownership, bounded allocation, shapes/strides/views/broadcasting, indexing, mutation/version counters, aliasing, device transfers, stream/event lifetime, errors and deterministic RNG state.
  • Specify integer/boolean/FP/BF16/FP16/FP8 modes, casts, reductions, accumulation, overflow, nonfinite/subnormal and complex behavior. Unsupported dtypes/layouts explicitly refuse.
  • Implement .om baseline operators for a complete transformer plus gradient consumers, then tracked coverage for linalg, FFT, sparse/ragged/quantized and remaining catalogue operators; no silent scope deletion.
  • Compare against independent mathematical/third-party oracles outside the delivery closure. Check empty/zero-dimension tensors, noncontiguous views, overlap, shape overflow, OOM, stale buffers, reduction order and cross-device copies.
  • Freeze one versioned operation registry shared by CPU/GPU/gradient/compiler; adding an op requires schema, implementation, differential fixture, refusal tests and numeric contract.
  • Native .om CPU correctness first, then real GB10 through existing backend and second-vendor gate CUDApp #62. Delete replaced project-owned legacy implementations only after consumers pass.

Delivery rules

User-authorized plan, 2026-10-23, continuing Omega #599. All new first-party implementation, tests and automation use handwritten seeded .om. Qualify replacements, cut consumers over, and delete retired first-party implementations/dependencies from active trees; keep immutable history/evidence. External hardware/OS/firmware/API dependencies and independently sourced test oracles must be explicitly inventoried. No hidden C/.osc/Rust/Python production fallback. Missing language facilities are requests to the existing compiler owner, not permission to create a second compiler. Reconcile current branches, PRs, issue comments, ledger and worktree ownership before editing. Existing owners remain authoritative; one writer per shared compiler/runtime file. Preserve live serving, model residency, driver state, visibility and existing release coordination. This task does not authorize deployment, driver swaps or new hardware purchases. Use isolated candidates and coordinated hardware windows. Independent final-source review, exact commits/compiler/binary/config hashes, raw commands/exits and negative controls are required. Host, simulator and hardware results are separate. NOT_RUN/BLOCKED is not PASS. Do not auto-close from a source-only PR.

Expanded scope and parity policy

This belongs to Drake's explicit 2026-10-23 expansion: replace PyTorch and the surrounding AI software ecosystem in Omega. The two-vendor inference demonstration is an early milestone, not full ecosystem completion. Build independently implemented Omega facilities, not Python wrappers. Compatibility with external formats/protocols is allowed; a framework import shim is not replacement. Version the supported surface, map remaining capabilities to owned issues, and do not advertise universal parity from a small passing subset. Current branch/owner reconciliation precedes changes; source filenames below are migration evidence, not instructions to keep legacy code.


2026-10-28 quantization semantic interface to GPU realization

Consume CUDApp #156 as the target-specific quant repacking and native GPU layout owner, and CUDApp #35 as checked device realization. This Omega issue remains authoritative for dtype/value/scale/zero-point semantics, shape/stride, rounding, nonfinite, exact/approx numerical profiles and lossless/quality distinctions shared by CPU/GPU/gradient consumers. Prefer one versioned descriptor/operation identity with multiple verified device layouts, never a compulsory packed representation or second GPU generator. Coordinate compiler pin #660 and canonical consumer cutover CUDApp #106.

drakestapleton wrote on 2026-10-23 22:04 UTC

Parent delivery plan: https://github.com/aien-dev/aien-architecture-mv/issues/303

The parent contains the dependency graph, phased gates and parallel-agent ownership. Drake expanded scope to the entire AI ecosystem, including PyTorch capabilities and surrounding tooling. This issue is one bounded milestone; full ecosystem completion is tracked by architecture #301/#302/#303. Reuse existing owners and implement/qualify/cut over/delete through Omega #599. Cross-vendor inference remains an early milestone, not overall parity.

drakestapleton wrote on 2026-10-23 22:34 UTC

Native M20 metadata/lifetime admission is independently reviewed and pushed, functional source3a995ba8dace538c1532c747d829ca6e4a73582d. ED24/ES8 contract is frozen; native tests cover shape/stride/bounds, immutable views, generation and retirement.14457 author checks plus48380 independent checks pass; offset/generation/retirement compiled mutants fail as intended. Full review/raw evidence is under evidence/ECOSYSTEM663.

Actual native downstream consumers reuse the exact module SHA256 f60b6d62c1bf90de42455effae977de66adeca1268669f6144809a3327aec7a4: train distributed7 admission and the new ecosystem6 numerical step. No duplicate validator or shared compiler edit. Draft publication requested through L773.

This is metadata admission, not a tensor allocator or full operator replacement. The numeric consumer uses existing L720 real IEEE binary32 add/mul, currently in independent review. Full dense/sparse/ragged operators, dtype/AMP, device parity, production consumer cutover and obsolete-source deletion remain open; #663/#664 are not closed.

drakestapleton wrote on 2026-10-24 17:50 UTC

Concrete copy-elision experiments under the existing tensor owner

Pinned main: 046cc9d2369951f484930be7a28f35fa9ab3b20b; source audit only, hardware NOT_RUN.

The larger exact semantic matmul experiment is now #702. Two smaller opportunities belong here and #665, not another backend:

  1. elementwise_n and gather_broadcast allocate and gather operands even when dense/contiguous. Arity a, n FP32 output elements implies 4an gather-destination bytes before backend staging. A checked internal dense borrow and descriptor-aware stride-zero broadcast can remove specific copies. Do not make public contiguous() silently alias: owner release currently invalidates views. Preserve ownership, generation, alias, bounds and noncontiguous semantics; compare exact results and allocation/copy counters before and after.
  2. value_id / value_equal gather whole tensors before hashing/comparison. Bounded logical-order iteration could remove n*element_size temporary bytes for identity and twice that for equality, with safe early mismatch where allowed. Preserve exact domain bytes, dtype/shape, logical order, canonical NaNs and +/-0 distinction. Tensor-store replay/digests must remain byte-identical. Test empty/ragged/noncontiguous/broadcast inputs, early/late mismatches and stale generations.

For both: source copy lengths are logical counts, not measured DRAM; report bounded peak scratch, required cache/ownership transitions, and end-to-end cost including validation. Deliver through this issue's existing handwritten .om substrate and qualify consumers before retiring the replaced implementation. No relaxation of numerical or security checks to improve a benchmark.

Sign in to comment