diff --git a/docs/adr/0044-one-cubin-writer-per-nvidia-target-family.md b/docs/adr/0044-one-cubin-writer-per-nvidia-target-family.md new file mode 100644 index 0000000..800c73b --- /dev/null +++ b/docs/adr/0044-one-cubin-writer-per-nvidia-target-family.md @@ -0,0 +1,66 @@ +# ADR 0044: One cubin writer per NVIDIA target family, owned by CUDApp + +**Status:** Accepted (Primate, 2026-10-30). +This ADR moves no code. +**Related:** ADR 0042 (ARCH-0042) Decision 7, ADR 0043 call 15 (merged #343; CUDApp pin `780a0af1`). +[CUDApp#108](https://github.com/aien-dev/CUDApp/issues/108) tracks consolidation. +[CUDApp#170](https://github.com/aien-dev/CUDApp/issues/170) rebases onto this layout. +[CUDApp#190](https://github.com/aien-dev/CUDApp/pull/190) is the inventory note. +[omega-mv#864](https://github.com/aien-dev/omega-mv/pull/864) holds `seed/sm80/cubin.om`. + +--- + +## Context + +On CUDApp main `d79519e0` the sm_121 ABI 8 writer is one writer with two bodies +([CUDApp#190](https://github.com/aien-dev/CUDApp/pull/190)). `src/omega_cubin.c` writes the +container only: it opens no device and performs no launch. The hosted build packs through +`om/cubin/cubin_elf.om`. The C body is slated for deletion. ADR 0043 call 15 cites the older +CUDApp pin `780a0af1`, where the GB10 column of `ob_code_load` names `omega_cubin.c` for cubins. + +omega-mv `seed/sm80/cubin.om` exists only on closed draft omega-mv#864. It accepts SM 80, 86, +87, 89, 90, 100, 103, and 120, and it refuses 121. The body of +[omega-mv#864](https://github.com/aien-dev/omega-mv/pull/864#issue-6050605672) reports libcuda +load PASS lines: vecadd/ctl PASS on an RTX 4090 (sm_80/86/89), a B200 (sm_100), and an RTX 5090 +(sm_120). Those lines are reported by that PR and were not independently re-run for this ADR. + +ADR 0042 (ARCH-0042) makes CUDApp the owner. Decision 7 requires a separate consolidation +decision by Primate (Drake). This ADR records that decision (option B, 2026-10-30). ADR 0043 +does not cover the sm_80 family. + +## Options + +The count is the one in CUDApp#190: two bodies of the sm_121 writer, plus `cubin.om`. + +- **A.** Keep both bodies and keep `cubin.om`. +- **B.** `cubin_elf.om` is canonical. +- **C.** `omega_cubin.c` is canonical. + +## Decision + +Option B. One cubin writer per NVIDIA target family, owned by CUDApp. + +CUDApp owns all cubin writing, the sm_80 family included, under `backend//`. The +NVIDIA `backend//` directory does not exist on CUDApp yet. It is created when the +work moves. New writer work goes only into `.om`. `omega_cubin.c` is frozen, and it is +retired only after the `.om` writer produces byte-identical sm_121 cubins and loads on GB10. +That removal is a later, separate PR. + +omega-mv#864's ABI 8 and register-reserve findings are ported into CUDApp as new work. No +writer stays in omega-mv except a declared, pinned oracle (ADR 0042 Decision 4). CUDApp#170 +rebases onto this layout. + +## Consequences + +CUDApp#108 tracks consolidation, and CUDApp#190's note becomes the inventory. tkinfo on +sm_121 ABI 8 and the stored register count are tracked in CUDApp#190. The alu.s2 race issue +is still to be filed in CUDApp. Hardware tiers stay NOT_RUN until an authorized window. +This ADR moves no code. + +## Source + +- ADR 0042, merged as #342. Decision 7 requires the separate consolidation decision recorded here. +- ADR 0043, merged as #343 (`a0a7146`). Call 15 (`ob_code_load`) cites CUDApp `780a0af1`. +- CUDApp main `d79519e0`: `src/omega_cubin.c` and `om/cubin/cubin_elf.om`. +- CUDApp#108, CUDApp#170, CUDApp#190. +- omega-mv#864, `seed/sm80/cubin.om` on `ck/cubin-om` (`76639738`). diff --git a/docs/adr/README.md b/docs/adr/README.md index 6417f71..6af5318 100644 --- a/docs/adr/README.md +++ b/docs/adr/README.md @@ -56,3 +56,4 @@ Current ADRs: - [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 - [0043 - GPU stack: portable Omega top, thin per-target backend behind one 30-call ABI; one kernel source (Omegese → IR → checker2); unified memory; AMD second, Vulkan fallback; ggml/vLLM/ORT attachments; human review rule](0043-gpu-stack-portable-top-thin-backend.md) - ACCEPTED 2026-10-30 (Primate; lane SplitDesign; design only, code gated on P0 + C2–C5 QUALIFIED) +- [0044 - One cubin writer per NVIDIA target family, owned by CUDApp](0044-one-cubin-writer-per-nvidia-target-family.md) - ACCEPTED 2026-10-30 (Primate); one `.om` writer per NVIDIA target family under CUDApp `backend//` (the NVIDIA directory is created when the work moves); `omega_cubin.c` frozen; CUDApp#108, CUDApp#170, CUDApp#190, omega-mv#864