interplane.Get Omega
Read in your language

omega-bridge

Omega-first language interoperability: checked conversion backends and native language bindings

Brought by drakestapleton

[LLAMA-OMEGA P0] Attach a native GGML backend with strict whole-graph placement

Open · #10 · open 2026-10-24 23:32 UTC

Imported from GitHub aien-dev/omega-bridge#10, by drakestapleton

drakestapleton wrote on 2026-10-24 23:32 UTC

Outcome

Implement one opt-in llama.cpp → native Omega backend and strict execution contract, under existing Bridge #3, Omega attachment #637 and ecosystem #666. This is the first adoption lane in the user's 2026-10-24 independent replacement plan. CUDApp #74 separately owns CUDA/PTX compatibility. AMD coverage is not a prerequisite for this first GB10 lane.

Source-grounded seam

Inspected llama.cpp master d327bf1f0780f87b8c01b367b61853b0c291d7c4:

Explicit ownership and retained dependencies

Bridge owns external attachment, marshaling and policy integration, not another compiler, encoder, driver or model engine. Existing Omega #636/#637 native ABI owners must provide qualified loadable-object and host-callback support. Existing function-mode bytes, executable ELF or outward generated C/Python are not automatically a shared-library ABI. Keep Omega's semantics/internal ABI unchanged; adapt foreign byte layouts and callbacks. New first-party computation/policy/tests remain seeded .om. Any strictly necessary upstream forwarding/build glue must be explicitly segregated, reviewed under existing policy and contain no duplicated computation; do not silently introduce a C++ implementation. Initially retain llama.cpp's external GGUF loading, tokenization, graph construction and sampling. This is a deliberate adoption bridge, not completed all-.om frontend replacement or Linux retirement. Linux/NVIDIA RM/UVM/GSP dependencies are disclosed until separately replaced.

Dependency-ordered tasks

  1. Freeze one exact upstream revision/build, model/checkpoint/tokenizer/config, converted GGUF type map, numerical profile and real graph/operator manifest. A small dense F16 Llama model is proposed; the existing model owner selects/freezes it. Do not substitute the live 35B service or claim an uncreated GGUF hash.
  2. Consume the qualified native attachment: register/device/buffer-type/buffer/backend callbacks, C ABI layout and function-pointer convention, context lifetime, traps/errors and load/unload identity. Verify repeated calls, malformed descriptors, callback failure and cleanup.
  3. Implement one synchronous GB10 context/queue first: enumeration, exact device identity, allocation/alignment, checked transfer, supports_op/supports_buft, graph execution, synchronization and teardown. Do not advertise async, events, pinned-host import, zero-copy or multi-device until qualified.
  4. Carry existing #644 descriptors: dtype, shape, byte strides, root allocation/view offset, span, generation, ownership, mutability and completion. Reject overflow/OOB/stale contexts. Views retain roots; release exactly once after completion.
  5. Consume the complete native operator profile from the linked Omega child, not new bridge kernels.
  6. Enforce whole-graph placement before any launch, including reuse/shape changes. The plugin sees only its partition; supports_op=false, -ngl all, successful loading or cb_eval alone do not prevent upstream CPU fallback.
  7. Provide opt-in reversible packaging, exact dependencies, clean-checkout commands and a support/refusal matrix; coordinate publications through existing desk.

Strict first profile

Proposed bridge-strict-v1: deliberate CPU work is file/GGUF loading, tokenizer/template, host input/mask/index preparation, token-embedding gather, metadata, output transfer and sampling. All transformer layers, internal row gathers, KV updates, final normalization and vocabulary projection execute through Omega. Identify allowlisted nodes by structural role and immutable profile, not broad op-name/string matching. Record declared CPU work in end-to-end timing. Any other CPU/accelerator fallback is a named prelaunch refusal. Whole-graph enforcement may require an external frontend hook; route it through the existing attachment owner rather than pretending a plugin-only proof exists.

Acceptance

  • Exact ABI and load/unload/failure lifecycle tests pass; unsupported ABI versions refuse.
  • Wrong device/absent plugin/unsupported dtype, layout or op refuses before model execution, with node-specific diagnostics.
  • Missing Omega placement, stale reused graph, changed layout, removed synchronization and false-support mutants are caught.
  • Real selected model passes prefill + repeated KV decode and complete-model qualification from the linked benchmark issue.
  • Required-case manifest is nonempty and every required test executes; skipped/absent backend cannot produce PASS.
  • Explicit dependency/process/import traces show no CUDA userspace, PyTorch, ZLUDA/HIP or foreign accelerator runner on the claimed computation path; retained host services are named.
  • Independent final-source review and exact source/compiler/backend/model/device evidence; disable restores normal upstream behavior.

No auto-fork, upstream submission, install, driver swap, reboot, live model restart, release or merge is authorized by this filing. Hardware tests require existing coordinated windows. Source/host/simulator/physical claims stay separate; NOT_RUN is not PASS. Preserve current owners and do not auto-close broader #637/#666/#74 from this bounded result.

Execution index and dependency order

  1. Existing native ABI/attachment: Omega #636/#637, in parallel with an offline required-graph/profile census.
  2. Native operation closure: CUDApp #75, consuming existing #35 kernels.
  3. This issue: external backend and whole-graph strict placement integration; buffers reuse Omega #644.
  4. Independent real-model correctness and matched measurement: benchmarks #42.
  5. Separate compatibility lane: CUDApp #74 owns from-scratch CUDA Driver/PTX/fatbin/runtime-facing work; CUDApp #76 owns finite math-library ABI profiles.
  6. Independent hardware expansion: CUDApp #40 and #62. AMD work is not a dependency of steps 1–4 on GB10. Boot-native architecture #314 remains a separate later dependency-retirement milestone.

No duplicate architecture epic is needed. This issue is the navigation entry for the requested llama.cpp adoption work; existing #74 remains the CUDA compatibility owner.

No comments.

Sign in to comment