Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/aien-architecture-mv/patches/fc457950fc1d9ed5 # aien-architecture-mv Canonical architecture for the AIEN ecosystem: flows, boundaries, ADRs, and the map from design to implementation repositories. Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers ## GitHub aien-dev/aien-architecture-mv#342 (code only) closed derived `fc457950fc1d9ed5` #342 Imported from GitHub aien-dev/aien-architecture-mv#342 (code only) GitHub's metadata for this pull request is unavailable: its state is DERIVED from the commits (merged: the head is reachable from this project's main; open: GitHub kept a merge ref; else closed). Base `3439f00ce54547273188e0db1124fc9ed08f832a` · Head `93d813ef5545727550484fe4f5936e266c25f5aa` ### Fetch it A git bundle of the pull request's head, 10277 bytes. ``` curl -fsSL https://interplane.io/drakestapleton/aien-architecture-mv/patches/fc457950fc1d9ed5.bundle -o fc457950fc1d9ed5.bundle git fetch fc457950fc1d9ed5.bundle refs/pull/342/head ``` Raw bundle · Diff ### Provenance This proposal is imported from GitHub; it is not signed by its author. Its import statement and source record: ``` github-import 1 aien-dev/aien-architecture-mv 342 93d813ef5545727550484fe4f5936e266c25f5aa ``` ``` {"kind":"github-import","owner":"aien-dev","repo":"aien-architecture-mv","number":342,"url":"https://github.com/aien-dev/aien-architecture-mv/pull/342","export_sha256":"967c79e26a893657b5cdaa45efd442be5dbd2ecfe68e25f9a8c1b5da4d60d452","imported_utc":"2026-11-18T16:38:02Z","metadata":"unavailable","state_derived":true} ``` ### Changes ``` diff --git a/docs/adr/0042-omega-cudapp-bridge-ownership.md b/docs/adr/0042-omega-cudapp-bridge-ownership.md new file mode 100644 index 0000000..f64223f --- /dev/null +++ b/docs/adr/0042-omega-cudapp-bridge-ownership.md @@ -0,0 +1,99 @@ +# ADR 0042: Omega owns computation. CUDApp owns GPU execution. Omega Bridge owns compatibility. + +**Status:** Accepted (Main, delegated by Drake, 2026-10-30; merged as #342). Proposed 2026-10-26. +Records the boundary rule in an outside assessment of aien-dev/omega-bridge that Drake Stapleton +forwarded on 2026-10-27, endorsing it by forwarding. Recorded by BridgeBoundary. +**Related:** ADR 0024 (Omega is the destination language), ADR 0018 (substrate-neutral realization), +ADR 0039 (typed construction), ADR 0040 (identities). Does not change FORGE (ADR 0014). + +--- + +## Context + +Three repositories touch the path from an Omega program to a running GPU kernel, and before this ADR +no accepted decision said which one owns what: + +- **aien-dev/omega-mv**: the Omega language, the seeded compiler `seed/out/omc`, semantics, IR. +- **aien-dev/CUDApp** (CUDA++): the GPU toolchain and runtime, split out of omega-mv on 2026-10-21. +- **aien-dev/omega-bridge**: `src/toc.om` emits C and Python from a checked, bounded `.om` subset; + `src/native.om` generates bindings so C, C++, Python, Rust, Zig and Go call compiled Omega units; + `src/gpu_adapter.om` negotiates and admits GPU artifacts and does not execute kernels. + +The assessment Drake forwarded states the rule in three sentences: "Omega owns computation. CUDApp owns +GPU execution. Omega Bridge owns compatibility." It also says the bridge is an adoption mechanism: it +should make existing ecosystems optional, not constrain Omega to them. Its named next priority is a real +PyTorch or llama.cpp attachment with independently verified execution on the DGX Spark. + +An audit of the three default branches on 2026-10-26 (omega-mv `e5b32567`, CUDApp `780a0af1`, +omega-bridge `358c5051`) found the rule already broken in places; see Consequences. + +## Decision + +1. **Omega owns computation** (omega-mv). The language, its semantics and identities, the seeded + compiler and its seed chain, the compiler pin that every other repository consumes, the IR, the + CPU code generators, and the declared contract of what a kernel computes (shapes, dtypes, the + independent oracle it is judged against). +2. **CUDApp owns GPU execution.** Everything from GPU instruction words to a completed launch: the + instruction encoders and their ISA tables, GPU code generators and kernel libraries, the register + allocator and scheduling bits, the cubin/artifact writer and exporter, artifact admission (parsing + and checking a cubin), the disassembler, the driver client (`nvrm`), command lists, submission, + sessions and the GPU runtime, and GPU device qualification. +3. **Omega Bridge owns compatibility.** Every attachment between Omega and something that is not + Omega: emitting C/Python from the bridge subset, native-call bindings for foreign callers, framework + attachments (a PyTorch backend, a llama.cpp/GGML backend, MAX interop), foreign-format intake when + it is built (PTX, fatbin, framework graphs), and GPU artifact negotiation through + `gpu_adapter.om`. The bridge never encodes instructions, never launches a kernel and never ships a + compiler; it consumes omega-mv's compiler and CUDApp's execution at pinned commits. +4. **Direction of dependency.** CUDApp and omega-bridge consume omega-mv at a pin. omega-mv consumes + CUDApp at a pin for GPU execution. omega-bridge consumes CUDApp at a pin when an attachment must run + on a GPU. No repository gains a new copy of another's owned code; a copy kept for a bootstrap or an + oracle is declared as such, pinned and checked against the owner. +5. **Ecosystems are optional.** An attachment exists so an existing program can adopt Omega without + rewriting, never as a requirement on Omega's own design. A bridge limit (an unsupported dtype, a + framework's ABI) is not a reason to narrow the language or the GPU path. +6. **Out of scope.** physics-mv (FORGE) keeps realization policy and its historical receipts. Where it + carries a GPU driver client, that copy is a duplication of a CUDApp responsibility (Consequences). +7. **Existing code stays; new components get connected repos** (Drake, 2026-10-27: "embrace the Unix + philosophy and keep everything in their own repos. We can keep the repos we've got, but then we + make new repos that are connected to the bigger repos."). The copies listed under Consequences are + not moved, split or rewritten by this ADR; consolidating any of them needs a separate decision by + Drake. Ownership governs where **new** work goes. A new standalone component (a server, kit, bench, + library or app) goes in its own aien-dev repository that pins its parent (omega-mv, CUDApp or + omega-bridge) by tag or sha, names the parent in its `.crumb`/`.goals.json`, and is linked from the + parent README's "Connected repos" line. Each tool does one job: stdin or files in, plain text or + JSONL on stdout, diagnostics on stderr, meaningful exit codes. + +## Consequences + +Under Decision 7 these copies stay where they are; the table fixes who owns new work on each, and +each issue is where any later consolidation decision would be recorded. + +Duplicated responsibilities found by the 2026-10-26 audit, each with its single owner and an issue in +the owning repository: + +| Responsibility | Copies | Owner | Issue | +|---|---|---|---| +| 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) | +| 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) | +| 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) | +| 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) | +| 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) | +| 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) | + +Checked and not duplicated: omega-bridge `gpu_adapter.om` admits by manifest fields and does not parse +cubins (CUDApp does); omega-bridge `tools/run-device-window.sh` runs CUDApp's `cubin_probe` rather than +a loader of its own. + +- Repository READMEs state their own role and the other two (linked PRs). +- A proposal that would put a compiler, a launch path or an encoder in omega-bridge, or a language + front end in CUDApp, needs an amendment to this ADR first. CUDApp#74 (an unmodified-CUDA path: PTX + reader, fatbin reader, `cu*` entry points) is PROPOSED and splits along this rule: intake of foreign + formats is compatibility, translation into instruction words uses CUDApp's code generator, and the + launch is CUDApp's. +- Nothing here is implementation or qualification evidence. The issues above are open; the GPU tiers + of each stay NOT_RUN until an authorized window. + +## Source + +- The forwarded assessment of aien-dev/omega-bridge (Drake Stapleton, 2026-10-27), held by the operator. +- Audit commands and per-file comparison: the issues linked above record their inputs and pins. diff --git a/docs/adr/README.md b/docs/adr/README.md index b3e9442..6e511d4 100644 --- a/docs/adr/README.md +++ b/docs/adr/README.md @@ -54,3 +54,4 @@ Current ADRs: - [0039 - The typed-construction interface is Omega's primary agent programming interface: inspect / legal_actions / apply / obligations / realize / verify / explain_refusal; INVALID / INCOMPLETE / VALID-UNPROVEN / UNKNOWN](0039-typed-construction-agent-interface.md) - ACCEPTED 2026-10-26 (Main, delegated by Drake) - [0040 - Five identities; "same meaning, same identity" holds only under a named normalization system that fails toward CHANGED](0040-identity-layers-normalization.md) - ACCEPTED 2026-10-26 (Main, delegated by Drake); narrows the reading of 0015, 0018, 0019 - [0041 - Aienux is written in Omega; the legacy C kernel is sunset](0041-aienux-written-in-omega-c-kernel-sunset.md) - ACCEPTED 2026-10-24 (Drake): Omega is the only kernel language; C kernel frozen to bug fixes, retired at parity; transition plan PROPOSED (L802). Rebased onto main after ARCH-0039 and ARCH-0040 landed (PR #322 was CONFLICTING). +- [0042 - Omega owns computation, CUDApp owns GPU execution, Omega Bridge owns compatibility](0042-omega-cudapp-bridge-ownership.md) - ACCEPTED 2026-10-30 (Main, delegated by Drake) (Drake's forwarded omega-bridge assessment, 2026-10-27); duplication issues CUDApp#106-108, CUDApp#10, omega-mv#870-871 ```