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 / 0042-omega-cudapp-bridge-ownership.md

99 lines · 7698 bytes Raw Blame History Rendered
1# ADR 0042: Omega owns computation. CUDApp owns GPU execution. Omega Bridge owns compatibility.
2
3**Status:** Accepted (Drake, 2026-10-30; merged as #342). Proposed 2026-10-26.
4Records the boundary rule in an outside assessment of aien-dev/omega-bridge that Drake Stapleton
5forwarded on 2026-10-27, endorsing it by forwarding. Recorded by BridgeBoundary.
6**Related:** ADR 0024 (Omega is the destination language), ADR 0018 (substrate-neutral realization),
7ADR 0039 (typed construction), ADR 0040 (identities). Does not change FORGE (ADR 0014).
8
9---
10
11## Context
12
13Three repositories touch the path from an Omega program to a running GPU kernel, and before this ADR
14no accepted decision said which one owns what:
15
16- **aien-dev/omega-mv**: the Omega language, the seeded compiler `seed/out/omc`, semantics, IR.
17- **aien-dev/CUDApp** (CUDA++): the GPU toolchain and runtime, split out of omega-mv on 2026-10-21.
18- **aien-dev/omega-bridge**: `src/toc.om` emits C and Python from a checked, bounded `.om` subset;
19 `src/native.om` generates bindings so C, C++, Python, Rust, Zig and Go call compiled Omega units;
20 `src/gpu_adapter.om` negotiates and admits GPU artifacts and does not execute kernels.
21
22The assessment Drake forwarded states the rule in three sentences: "Omega owns computation. CUDApp owns
23GPU execution. Omega Bridge owns compatibility." It also says the bridge is an adoption mechanism: it
24should make existing ecosystems optional, not constrain Omega to them. Its named next priority is a real
25PyTorch or llama.cpp attachment with independently verified execution on the DGX Spark.
26
27An audit of the three default branches on 2026-10-26 (omega-mv `e5b32567`, CUDApp `780a0af1`,
28omega-bridge `358c5051`) found the rule already broken in places; see Consequences.
29
30## Decision
31
321. **Omega owns computation** (omega-mv). The language, its semantics and identities, the seeded
33 compiler and its seed chain, the compiler pin that every other repository consumes, the IR, the
34 CPU code generators, and the declared contract of what a kernel computes (shapes, dtypes, the
35 independent oracle it is judged against).
362. **CUDApp owns GPU execution.** Everything from GPU instruction words to a completed launch: the
37 instruction encoders and their ISA tables, GPU code generators and kernel libraries, the register
38 allocator and scheduling bits, the cubin/artifact writer and exporter, artifact admission (parsing
39 and checking a cubin), the disassembler, the driver client (`nvrm`), command lists, submission,
40 sessions and the GPU runtime, and GPU device qualification.
413. **Omega Bridge owns compatibility.** Every attachment between Omega and something that is not
42 Omega: emitting C/Python from the bridge subset, native-call bindings for foreign callers, framework
43 attachments (a PyTorch backend, a llama.cpp/GGML backend, MAX interop), foreign-format intake when
44 it is built (PTX, fatbin, framework graphs), and GPU artifact negotiation through
45 `gpu_adapter.om`. The bridge never encodes instructions, never launches a kernel and never ships a
46 compiler; it consumes omega-mv's compiler and CUDApp's execution at pinned commits.
474. **Direction of dependency.** CUDApp and omega-bridge consume omega-mv at a pin. omega-mv consumes
48 CUDApp at a pin for GPU execution. omega-bridge consumes CUDApp at a pin when an attachment must run
49 on a GPU. No repository gains a new copy of another's owned code; a copy kept for a bootstrap or an
50 oracle is declared as such, pinned and checked against the owner.
515. **Ecosystems are optional.** An attachment exists so an existing program can adopt Omega without
52 rewriting, never as a requirement on Omega's own design. A bridge limit (an unsupported dtype, a
53 framework's ABI) is not a reason to narrow the language or the GPU path.
546. **Out of scope.** physics-mv (FORGE) keeps realization policy and its historical receipts. Where it
55 carries a GPU driver client, that copy is a duplication of a CUDApp responsibility (Consequences).
567. **Existing code stays; new components get connected repos** (Drake, 2026-10-27: "embrace the Unix
57 philosophy and keep everything in their own repos. We can keep the repos we've got, but then we
58 make new repos that are connected to the bigger repos."). The copies listed under Consequences are
59 not moved, split or rewritten by this ADR; consolidating any of them needs a separate decision by
60 Drake. Ownership governs where **new** work goes. A new standalone component (a server, kit, bench,
61 library or app) goes in its own aien-dev repository that pins its parent (omega-mv, CUDApp or
62 omega-bridge) by tag or sha, names the parent in its `.crumb`/`.goals.json`, and is linked from the
63 parent README's "Connected repos" line. Each tool does one job: stdin or files in, plain text or
64 JSONL on stdout, diagnostics on stderr, meaningful exit codes.
65
66## Consequences
67
68Under Decision 7 these copies stay where they are; the table fixes who owns new work on each, and
69each issue is where any later consolidation decision would be recorded.
70
71Duplicated responsibilities found by the 2026-10-26 audit, each with its single owner and an issue in
72the owning repository:
73
74| Responsibility | Copies | Owner | Issue |
75|---|---|---|---|
76| sm_121 encoder, codegen, QMD, submission, GPU session/runtime, kernel APIs (C) | omega-mv `src/omega_blackwell_*`, `src/omega_gpu_*`, `src/runtime/rx_resident_gpu.c`; CUDApp `src/` (58 identical, 39 diverged, 27 only in omega-mv; new work lands in omega-mv) | CUDApp | [CUDApp#106](https://github.com/aien-dev/CUDApp/issues/106) |
77| GPU driver client (`nvrm/`, `m16/`) | CUDApp `nvrm/nvrm.c`; physics-mv `nvrm/nvrm.c` at omega-mv's `physics.lock` (newer: extra channels) | CUDApp | [CUDApp#107](https://github.com/aien-dev/CUDApp/issues/107) |
78| Cubin writer | CUDApp `src/omega_cubin.c`; omega-mv `seed/sm80/cubin.om` (draft omega-mv#864) | CUDApp | [CUDApp#108](https://github.com/aien-dev/CUDApp/issues/108) |
79| sm_121 disassembler | omega-mv `src/omega_sm121_disasm.c`, `tools/sm121dis/`; CUDApp D13 not built | CUDApp | [CUDApp#10](https://github.com/aien-dev/CUDApp/issues/10) (comment) |
80| Seed bootstrap and compiler pin | omega-mv `seed/omega-from-seed.sh`; omega-bridge `tools/bootstrap.sh` (own recipe, older compiler); CUDApp takes its compiler from omega-bridge | omega-mv | [omega-mv#870](https://github.com/aien-dev/omega-mv/issues/870) |
81| Omega front end (lexer, type tables) | omega-mv `seed/omc/omc.om`; omega-bridge `src/toc.om` | omega-mv | [omega-mv#871](https://github.com/aien-dev/omega-mv/issues/871) |
82
83Checked and not duplicated: omega-bridge `gpu_adapter.om` admits by manifest fields and does not parse
84cubins (CUDApp does); omega-bridge `tools/run-device-window.sh` runs CUDApp's `cubin_probe` rather than
85a loader of its own.
86
87- Repository READMEs state their own role and the other two (linked PRs).
88- A proposal that would put a compiler, a launch path or an encoder in omega-bridge, or a language
89 front end in CUDApp, needs an amendment to this ADR first. CUDApp#74 (an unmodified-CUDA path: PTX
90 reader, fatbin reader, `cu*` entry points) is PROPOSED and splits along this rule: intake of foreign
91 formats is compatibility, translation into instruction words uses CUDApp's code generator, and the
92 launch is CUDApp's.
93- Nothing here is implementation or qualification evidence. The issues above are open; the GPU tiers
94 of each stay NOT_RUN until an authorized window.
95
96## Source
97
98- The forwarded assessment of aien-dev/omega-bridge (Drake Stapleton, 2026-10-27), held by the operator.
99- Audit commands and per-file comparison: the issues linked above record their inputs and pins.