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/omega-mv/issues/b91b0776c157c72d # omega-mv Omega: a language for verified programs, semantic identity and machine realization. Seed-born work and existing implementations have distinct provenance. Brought by drakestapleton Sign in to star 1 stars 0 watching About Files History Releases Proposed changes Issues For developers # [OMEGA×MAX P1] Verified native-kernel interoperability on GB10: staged matmul + attention proof of concept Open · #679 · open 2026-10-24 03:04 UTC Imported from GitHub aien-dev/omega-mv#679, by drakestapleton drakestapleton wrote on 2026-10-24 03:04 UTC ## Outcome Deliver an independently reproducible Omega/CUDA++ ↔ Modular MAX verification interoperability demonstration on GB10/sm_121: first two separately executed matmul + attention implementations governed by one frozen semantic contract; then an opt-in MAX graph-invoked native Omega kernel via a supported or safely characterized interoperability interface; missing published hooks trigger bounded source-guided reverse engineering, not an automatic NO-GO. This is an experimental collaboration proposal, not a claim that Modular has agreed or MAX accepts arbitrary SASS today. ## Grounded code and existing owners (do not fork) - Omega #599 mandates handwritten seeded `.om` for all final first-party software; no new `.osc` path or permanent C/Python wrapper. Seed branch and integration gate: #660 ; source/translation owners #621 , #623 . - GPU pipeline #632 , conformance #624 , graph compiler #665 , tensor lowering CUDApp #35 , device contract CUDApp `src/omega_gpu_platform.h` ; no second IR, checker, runtime, memory manager or driver. - Existing CUDApp API/codegen: `src/omega_blackwell_matmul.h` , `src/omega_gpu_matmul_api.h` , `src/omega_gpu_attention_api.h` ; parity/coverage limited to supported shape, precision, layout. - Existing `src/checker2/c2_receipt.h` has immutable signed 416-byte receipts; signatures attest provenance, not full translation equivalence. Reuse its exact format and trust policy; never reinterpret old evidence. - Omega Bridge design historically excluded GPU/driver work, but the user explicitly expanded Bridge to GPU interoperability in https://github.com/aien-dev/omega-bridge/issues/3 ; low-level native GPU code remains with Omega/CUDApp. - MAX 26.7 opened graph compiler/runtime/device hooks on 2026-10-22: https://www.modular.com/blog/26-7 ; official custom ops path: https://docs.modular.com/max/develop/custom-ops . Pin the exact MAX source/API/ABI/license revision before integration. Supported Mojo custom ops do not themselves prove external binary ingestion. ## Stages / completion gates - Feasibility and policy: pinned MAX 26.7 custom-op, GPU context and memory ownership API survey; license/telemetry/offline posture with an explicit supported/unknown/unsupported table. No assumed cross-context GPU pointer sharing. - Shared frozen contract: exactly one bounded BF16 matmul operation (BF16 operands, FP32 accumulation; named layout/stride/rounding/alias policy) and one attention operation (causal/GQA head_dim 128, mask, KV/softmax semantics) plus independently generated reference and negative cases. Use existing task (#53) and numerical (#16) owners. - Stage A independent execution: MAX and Omega independently execute on the same Spark under separate process contexts. Both results evaluated by a third-party-independent oracle; record exact input, output and executable identities, target, build and measurement receipts. No whole-stack CUDA-free claim; inspect native Omega process and MAX dependencies separately. - Stage B including ABI discovery: if safe documented API exists, integrate it. Otherwise execute https://github.com/aien-dev/omega-bridge/issues/7 to reverse-engineer the smallest lawful interoperability ABI from public MAX sources and safe probes; establish memory/context/stream and lifetime invariants, independent checking, and a tested opt-in native path. If unprovable/unsafe, keep in-graph execution BLOCKED with exact reproducible evidence and upstream RFC, preserving Stage A independent PASS. - Reproducibility and partner artifact: one-command local host replay and separately gated scheduled GB10 tests, five-run-or-more paired randomized benchmark, all failures kept, independent final-source review, documented limitations, public-safe integration brief for Modular. ## Safety, sovereignty, owners No unilateral modification to production/live18091, current model service, NVIDIA kernel modules, device reset, network telemetry, remote artifact storage, privileged driver state, release visibility or owner keys. No automatic upstream contact, public release or partnership claim. Ask existing ledger owners about worktrees before touching their files; parallelize only non-overlapping paths. Use one Spark GPU qualification at a time with controlled resource budget, using existing reservation/quietlock process. All public fixtures must exclude private data and secret receipts. Host tests never count as real GB10 evidence. STATUS: design/issue tracking, NOT IMPLEMENTED. ## Exit criteria Linked child/owner issues with measured test matrices, exact source/model/compiler/MAX versions, artifact hashes and independent check receipts; no made-up speedups, cross-vendor execution or binary compatibility. Close only after actual evidence on integrated revisions or explicit bounded NO-GO with proof of blocker; no auto-closing PR keywords. ## Binding amendment (2026-10-23): native interface reverse engineering User explicitly directed: if Modular does not expose native execution, reverse-engineer the interoperability interface rather than stop. https://github.com/aien-dev/omega-bridge/issues/4 assesses MAX's published API; https://github.com/aien-dev/omega-bridge/issues/7 owns source-guided ABI reconstruction and controlled differential probes; https://github.com/aien-dev/omega-bridge/issues/6 consumes the qualified result. MAX 26.7 has public GraphCompiler, MLRT, driver and GPU sources: https://github.com/modular/modular ; exact applicable source licenses must be pinned per file. MAX License §1.4(d) permits AI analysis for interoperating software but prohibits using MAX content to AI-produce a MAX substitute: https://github.com/modular/modular/blob/main/Licenses/MAX_LICENSE . No license breach, security-control bypass, unsupported ABI speculation or unscheduled Spark device probes. Public API missing ≠ stop; unsafe / unqualified device execution remains blocked until verified. drakestapleton wrote on 2026-10-24 03:05 UTC ## Scope decision update — GPU support in Omega Bridge (2026-10-23) User explicitly uplifted Omega Bridge's prior no-GPU scope restriction. GPU adapters and external graph/runtime integration are now first-class Bridge responsibilities, including MAX, and future GPU vendors via versioned capability contracts. The historical docs/DESIGN.md exclusion is superseded pending a reviewed documentation update. This does not transfer ownership of native GPU encoders, driver, loader, verifier or kernel runtime away from Omega/CUDApp; those stay with existing owners. No new legacy .osc or foreign first-party production runtime; keep .om replacement milestone. Created implementation tracks: - Omega Bridge #3 GPU scope and generic external accelerator adapter contract - Omega Bridge #4 MAX extension/API/license feasibility - Omega #680 frozen .om matmul/GQA contracts and independent reference - CUDApp #68 native sm_121 executable and launch artifact export - Omega #681 provenance/verification envelope - Omega Bridge #5 staged independent MAX/Omega conformance and measurements - Omega Bridge #6 conditional MAX-internal launch and partner proposal Execution DAG: #3 + #4 + Omega #680 + CUDApp #68 + Omega #681 can proceed in parallel under distinct file owners; Bridge #5 depends on stage-A prerequisites, #6 depends on #4 and #5 and safe graph/device hook. MAX claims, licensing and chip evidence remain scoped and conditional. drakestapleton wrote on 2026-10-24 03:11 UTC ## Source-backed upstream contribution update (2026-10-23) User explicitly wants code contributed to modular/modular, using CUDApp for Blackwell parity/performance. Coordination: https://github.com/aien-dev/CUDApp/issues/69 . MAX already has a native code bundle interface: `SDK/include/HAL/M_driver_bundle.h` (`M_driver_static_bundle`, `M_driver_bundle_load`), `Target/lib/CUDA/M_driver_function.cpp`, `Target/test/CUDAPluginTest.cpp`, `max/driver/src/max_license/_hal/context.mojo`. NeoDriver README explains its `StaticBundle` (CUBIN bytes) -> `RuntimeBundle` -> Function -> queue execution. DO NOT reverse-engineer a nonexistent interface without first exercising this one. Missing from our side: CUDApp `OmegaBlackwellKernel.code` contains raw SASS bytes, not automatically a valid CUBIN (ELF container, entry symbol, ABI/register/shared-memory metadata). First bridge contract is a valid loadable CUBIN + frozen argument ABI + verified code digest and target. MAX must own its context, buffer, stream and launch; Omega native QMD and GPU VAs cannot be handed across this boundary. Prove a minimal kernel and negatives before matmul/attention. Upstream rules: Modular's `max/kernels/CONTRIBUTING.md` / `max/docs/contributing/contribution-areas.md` currently accept bug fixes only. Their `AI_TOOL_POLICY.md` requires human review of AI-generated issues/PRs before they are submitted; do not auto-post to upstream. GPU support tracker `modular/modular#6570` may offer a first bounded issue. Their `#6961` RDMA VMM allocation bug is seemingly already guarded in current source; do not duplicate. CUDApp current first-party code AGPL-3.0-only, so audit/dual-license or use an eligible permissive source lineage before contributing code into Apache/LLVM paths. No benchmarked 'better than CUDA' result has been established yet; use same hardware and independent correctness oracle. Deliver upstream-ready branch/patch and reviewed reproduction results in AIEN-owned repo; only then human-reviewed fork/issue/PR to modular/modular. In-graph branch no longer needs speculative direct-driver ABI reverse engineering if the published HAL bundle API suffices. did:key:`z6MkhL6jkVBvyZTg9eMGkJWKQKjnKA1wbA7ym3PkTXt4M6Jd` wrote on 2026-11-18 17:18 UTC Recovered GitHub comment. Original comment `6535784227` ## Status 2026-10-30 23:40Z: maxinterop lane (Drake's 21:28Z objective) Pins: MAX `max/v26.7.0` = `527d069ee11a41ac5320af1f9402db0a66b2b868` (venv: max 26.7.0, mojo 1.2.0). Experimental reference: modular main `8ed65fc6ac15950ce62da1f8e8d50c2c7c528065` = nightly 26.8.0.dev2026102914. Omega compilers used by the CPU route: omc1 `55f9b0af`, omc2 `ec07d25d` (sha256 pinned in `max-cpu/run.sh`). Gate State Evidence 1. MAX pin + licence inventory DONE CUDApp#202 @ `54161d04` `evidence/MAX-INTEROP/G1/` (README, 2 scripts, 3 TSVs). Licence boundary: MAX licence §1.3(d) at the pin (§1.4(d) on main) allows interop only, so MAX-License sources are never input to a replacement runtime. 2. Smallest Omega kernel through MAX on GB10, plus a #68 reproduction NOT_RUN (no chip window) Host prep in CUDApp#202: `cubin_probe` now prints the cuModuleLoadData JIT log and has load-only and reject modes; `max_cubin_probe.mojo` loads through the released `DeviceExternalFunction` → `AsyncRT_DeviceContext_loadFunction`; a 12-image matrix (ptxas control A-ctl, Omega stale/main images, E1–E4 container variants, N1–N4 negatives). Order: load-check every image on both loaders, launch only where both accept. 2c. Same contract on a non-NVIDIA MAX backend (CPU, Grace aarch64) EXERCISED (host CPU), reproduced independently once omega-bridge#47 @ `9ae3cb58`: .om matmul called as a MAX graph custom op. 15/15 cases at 6 shapes, bit-identical to MAX `ops.matmul`. Red as expected: wrong symbol, plain `external_call`, 6 shape refusals, and the `ai = mul i n` mutant (5/15 rows). Rerun: comment . At 256³ the scalar Omega kernel's p50 is 49.66 ms against 0.626 ms for `ops.matmul` (79.4×). This is not QUALIFIED. 3. Matmul + attention under MAX-owned context/queues not started; waits on Gate 2 — 4. One model workload, then a non-NVIDIA backend not started Flint NVFP4 is excluded because MAX has no GGUF NVFP4 dtype at either revision 5. Omega-backed MAX device not started (separate workstream) Subject: the main-only HAL `M_driver_bundle_load` (MAX-License, "0.1.0, changes without notice") On the 2026-10-24 directive to exercise `M_driver_bundle_load` first: at the released pin, the CUDA module load is reached through `DeviceExternalFunction`, and Gate 2 uses that path. The HAL bundle exists only on main, so it belongs to Gate 5. The earlier GB10 failure (`cuModuleLoadData -> 200` on the Omega cubin, with and without program headers; the ptxas control loaded) appears only in a session transcript and has no receipt. Gate 2's matrix is built to reproduce it and to get the JIT log. ### PRs (merges are the desk's) - CUDApp#207 `sync/drift-omega-b5ab3fe` @ `2f372cb6`: ready, CI 18/18, clean. Fixes CUDApp main's red drift gate. Merge first. - aien-dev/omega-mv#976 @ `6a6939e9`, then CUDApp#208 @ `2c675d66`, back to back after #207. Both carry the same `tests/gpu_fp8_slots_test.c` blob `e7c35e04`, which fixes the flaky fp8 race test (19/19 under taskset with 10 CPU hogs). #208's drift check is red by design until #976 merges. - CUDApp#202 @ `54161d04` (draft, Gate 2 tooling + G1 evidence). Its drift failure comes from main and clears after #207. - omega-bridge#47 @ `9ae3cb58` (draft, Gate 2c), with skill PR omega-harness#149 @ `ddcbea36`. - CUDApp#200 / omega-harness#148 (own-driver docs; #200's only failure is the drift inherited from main). ### Blocker Gate 2 device rows need a ledger id at the head of `~/.local/state/aien-coordinator/CHIP-RESERVED`. That file has not changed since 2026-10-24 08:59 -0500. The `L679` already at the front of line 1 was prepended by an agent, not by Drake, so this lane does not treat it as a grant. Once a grant is in place: `spark-window open maxinterop-g2 --ledger --gb10 shared --quiet none --lease 10` → `spark-window run ~/handoffs/max-g2/run_matrix.sh` → close. Raw results go to CUDApp#202. did:key:`z6MkhL6jkVBvyZTg9eMGkJWKQKjnKA1wbA7ym3PkTXt4M6Jd` wrote on 2026-11-18 17:18 UTC Recovered GitHub comment. Original comment `6535893946` maxinterop Gate 2 — matrix sharpened (host only; device NOT_RUN) — 2026-10-30T23:45Z CUDApp#202 @ `a43cab19` (draft) now carries a 15-row load matrix (`evidence/MAX-INTEROP/G2/README.md`, generator `tools/cubin_variants.py`, deterministic). New rows: - E5-omega-allmeta (`6cb0c73d…`): E4 plus every remaining ptxas-only item except merc and `.debug_frame`: EXIT_INSTR_OFFSETS `[0x400]`, CRS_STACK_SIZE 0, the two reserved-smem symbols, `.nv.constant0` link 0 / align 4. - F-ctlcontainer-omega-sass (`83b133fd…`): the ptxas container without merc, carrying Omega's 0x480-byte text (72 instructions). - G-omegacontainer-ctl-sass (`25f16249…`): the current CUDApp container, carrying the ptxas 0x880-byte text (136 instructions); the old Omega bytes are zeroed. One window now separates a container defect (F loads, G fails) from a machine-code defect (F fails, G loads). Static checks (EXERCISED, host): `readelf`, `cuobjdump -elf` and `nvdisasm -c` 13.0 accept every Omega image (C, D, E1–E5, F, G). They reject only the negative N1. The stub runner handles all 15 rows. The cause of error 200 is therefore a check that only the driver makes. Still blocked: no ledger id on line 1 of `CHIP-RESERVED` (unchanged since 2026-10-24 08:59 -0500). did:key:`z6MkhL6jkVBvyZTg9eMGkJWKQKjnKA1wbA7ym3PkTXt4M6Jd` wrote on 2026-11-18 17:19 UTC Recovered GitHub comment. Original comment `6379594874` Status after the three branches (all pushed; PRs are desk-owned so none opened here): - `omega-mv` `feat/max-interop-contracts` @ `0dbc2067`: #680 frozen contracts + 26 checks; #681 envelope + C2 receipt, 22 checks. - `CUDApp` `feat/max-artifact-export` @ `fcd7d24`: #68 offline artifact/cubin export, 42 checks; #69 cubin container ready, loader blocked. - `omega-bridge` `feat/gpu-interop` @ `87aec91`: #3 adapter 49 checks; #4 report; #5 CPU conformance PASS; #6 RFC; #7 source map. All device tests are NOT_RUN: `spark-window open` refuses because the chip is reserved (`L332 L424 …`). Signed envelopes correctly carry `execution=NOT_RUN`; no speedup or device parity is claimed. Full suite: `omega` 26/26 + 22/22, `cudapp` 42/42 + smoke, `bridge` 49/49 + harness PASS. Consolidated report: `omega-bridge/MISSION-REPORT.md`. Sign in to comment