interplane.Get Omega
Read in your language

aien-architecture-mv

Canonical architecture for the AIEN ecosystem: flows, boundaries, ADRs, and the map from design to implementation repositories.

Brought by drakestapleton

branch main Branches Tags History

aien-architecture-mv / docs / adr / 0046-omega-ng-one-seeded-compiler-cpu-gpu.md

110 lines · 8980 bytes Raw Blame History Source

ADR 0046: Omega NG: one seeded compiler for CPU and GPU (Omega and CUDA++ unified)

Status: Accepted, Drake's directive 2026-11-07 ~07:35Z to 07:46Z (relayed by Manager(Aien)); recorded by omp-queen-ng, queen of Hive NG. This text follows the later of the two relayed instructions, ~/handoffs/hive-ng/DIRECTIVE-20261107-consult.md (about 08:00Z), which replaced the supersession asked for in DIRECTIVE-20261107-adr.md (about 07:46Z) with consumption by pin and no ownership move. Supersedes: nothing. It works inside ADR 0042, ADR 0043 and ADR 0044: no ownership moves. Every code generator NG uses for a native GPU ISA (NVIDIA today), including the lowering of ΩIR kernels to BlackwellIR, is CUDApp-owned and consumed by omega-mv at a pinned commit. Related: ADR 0024 (Omega is the destination language), ADR 0042 Decision 4 (dependency by pin), ADR 0043 Decision 0 (proof gate) and its ownership seam (new .om GPU code generators land in CUDApp).


Context

Drake's words on 2026-11-07, verbatim:

Ground truth (omega-mv main 943d955531b9d4d9f70deb41756c0b46441dd5e0, CUDApp main b774723f537cec16a359fe082b8100317a5b5490, checked 2026-11-07):

Manager(Aien) relayed two architecture reviews (2026-11-07). The directive lists the reuse of CUDApp's seeded pieces through sha-pinned source under the reviewers' disagreements, attributing the view that it respects ADR 0042 with no ownership move to one reviewer (consult-claude). Manager directed that this ADR say exactly that CUDApp keeps the pieces and NG consumes them by pin. This ADR applies that direction; it is a decision, not a joint finding.

Decision

  1. ΩIR is the single semantic IR for every Omega NG target: one typed SSA IR with block parameters, explicit check ops carrying exact trap codes, one ordering token through every check and effect, memory, floats, vectors and a kernel form shared by CPU and GPU. Its binary encoding is a new version of the OSC wire family (spec/one-layer-format.md) with one written specification and an independent validator.
  2. omega-mv seed/ng/** holds Omega NG's compiler: the front end, ΩIR (spec, reader, writer, validator), the optimizer, and the AArch64 back end. All of it is seeded Omega built by the seed chain: seed/out/omc compiles NG, then NG compiles itself to a fixpoint before it is proposed as a compiler pin. SPIR-V and WebAssembly come from the existing omega-mv emitters retargeted to ΩIR; they are existing omega-mv code and stay there (ADR 0042 Decision 7; ADR 0043 section 9). x86-64 and EFI stay with omc.
  3. CUDApp owns every code generator NG uses for a native GPU ISA (NVIDIA today) (ADR 0042 Decision 2; ADR 0043 seam: "any new .om code generator, including the .om successor of the sm_121 lowering", in CUDApp backend/gb10/; ADR 0044). That covers the lowering of ΩIR kernels to BlackwellIR, the GPU register allocator om/components/bw_alloc.om, the encoder om/encoder/bw_enc_sm121.om and the cubin writer om/cubin/cubin_elf.om, and, with them, the driver client and the runtime (ADR 0042 Decision 2). The ΩIR-to-BlackwellIR lowering is written for CUDApp backend/gb10/ and lands through CUDApp's own review queue (a pull request or Radicle patch under the desk's protocol) and owners. It reads ΩIR as specified by omega-mv at a pin (CUDApp consumes omega-mv at a pin, ADR 0042 Decision 4). Code under ADR 0043 keeps that ADR's Decision 0 gate: until P0's head-to-head is published and C2 to C5 are QUALIFIED on the GB10, the lowering stays a host-only experiment that touches no shared file, and nothing merges into CUDApp under it.
  4. Consumption by pin, defined. seed/ng/cudapp.lock in omega-mv holds, on its first non-comment line, one CUDApp commit, then one line per consumed file: its sha256 and its path in CUDApp. The NG build (ngbuild) must check out that commit as the sibling ../CUDApp, hash each listed file and refuse to build when any sha256 differs or a file is missing; the NG GPU gate (seed/ng/gpu/gate.cases) must run CUDApp's units at that pin and fail on any encoding difference. The lock moves only by an omega-mv change (a pull request or Radicle patch) from the NG GPU lane, after the new CUDApp commit is merged on CUDApp's main and the gate passes at it, with the reviewer checking the hashes against that commit. If a consumed file must change shape (signature, table layout, name), the change is made in CUDApp first through its review queue; omega-mv then moves the lock. omega-mv never edits or copies a consumed file. While a needed CUDApp change is not yet merged (an open pull request, an open Radicle patch, or a committed change waiting as a READY bundle for its patch), the lock may name that change's head as a provisional pin, marked so in the lock's comment with the pull request, patch or READY bundle it belongs to. A READY bundle named this way must contain the pinned commit and pass git bundle verify, so a reviewer can rebuild the pinned files and check their sha256 rows from a fresh clone. A provisional pin is for building and review only: an omega-mv change carrying one does not merge until the CUDApp change has merged and the lock names the merged commit with the gate passing at it.
  5. No C is re-ported. NG does not translate CUDApp's C kernel builder; GPU code generation for NG starts from ΩIR and the seeded CUDApp pieces above.
  6. omega-bridge keeps compatibility, unchanged (ADR 0042 Decision 3).
  7. Existing code stays. omc and its back ends keep working and remain the compiler pin until NG is qualified and proposed as the next pin; nothing is deleted before its NG successor is merged and its consumers have migrated.

Consequences

Source