interplane.Get Omega
Read in your language

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

branch main Branches Tags History

omega-mv / docs / numeric / OMEGA_GPU_NATIVE_BOUNDARY.md

284 lines · 20986 bytes Raw Blame History Source

Omega GPU native boundary: dependency map and freestanding link target

Native v1 P07 cut A, A.2 and the session part of cut C (omega#419 for A.2, omega#421 for cut C session part). Tracks aienos#286 and aien-architecture#190. Companion of docs/numeric/OMEGA_GPU_ENGINE.md (the engine contract) and src/omega_gpu_platform.h (the platform contract this cut adds).

Status words used here: DONE (host evidence in this repo's CI), NOT_RUN (no evidence; needs the physical Spark in an attended window), PLANNED (a later cut). NOT_RUN is never PASS.

1. What this cut claims, and what it does not

Claimed (host evidence, make test-gpu-engine-freestanding):

Not claimed:

2. Driver-provided responsibilities: who owns each today and later

Today every row is served by the Linux RM/UVM driver (nvidia-open 580.173.02) through physics/nvrm/nvrm.c and physics/m16/m16_native.c, called from the files in section 3.

ResponsibilityLinux path todayNative ownerCutStatus
Device discovery, bounded ownership (MMIO/DMA/IRQ capabilities)RM device open (nvrm_open, m16_native_open)Aienux PCI/SMMU layer + OmegaGpuPlatform MMIO/DMA servicesBNOT_RUN
Device and firmware initialization (GSP, falcons)RM boot inside the kernel moduleAienux GB10 firmware lifecycle (P08)B/P08NOT_RUN
Context / address space creationRM client + VA space objects (nvrm_mthd)native context object behind OmegaGpuDeviceHandleBNOT_RUN
Memory allocation with cache attributesnvrm_alloc, nvrm_alloc_gpu_uncachedOmegaGpuPlatform.dma_alloc with OmegaGpuBufferDesc (kind, rights, cache policy)Bcontract DONE, device NOT_RUN
GPU page tables / mappingUVM + RM mapAienux page tables, GPU VA through OmegaGpuVaBNOT_RUN
Bus addresses / SMMU translationkernel DMA API inside RMAienux SMMU, OmegaGpuBusAddr (no raw physical address type exists)BNOT_RUN
Channel / queue creation (GPFIFO, USERD)m16_native_create_channel, nvrm_channelnative queue behind OmegaGpuQueueHandle, ring is a BUF_QUEUE bufferB/CNOT_RUN
Submit token / doorbellm16_native_submit_methods, nvrm_enqueue, nvrm_ringOmegaGpuPlatform.mmio_write32 on the doorbell regionCNOT_RUN
Completion (marker words, semaphores)m16_native_wait_marker*, host pollingOmegaGpuPlatform.poll_word (polling, ABI 1.1) on a HOST_POLLED, GPU-uncached bufferCcontract and session DONE (cut C), device NOT_RUN
InterruptsRM interrupt handling (not used by Omega's launchers: they poll)OMEGA_GPU_SVC_IRQ only when a real interrupt wait exists; polling never claims itBNOT_RUN
Visibility / cache maintenanceL2 flush mem-op + uncached marker (C3 block)OmegaGpuPlatform.sync_* plus the same mem-op sequence in the encoderCNOT_RUN
Time, waiting, lockingclock_gettime, usleep, pthreadOmegaGpuPlatform.time_now_ms, wait_ms, lock/unlockA (contract)DONE
Reset / recovery of a hung deviceRM channel teardown, process exitnative quiesce path (P03 lifecycle), no ck_reset-style shortcutP08NOT_RUN
Resource numbering across incarnationsper-process RM handlesaienos#285 resource incarnations, before any domain-1 number is persistedP05/#285PLANNED

Rule carried over from the 2026-10-02 E1 stall: anything the CPU polls for a device write is OMEGA_GPU_RIGHT_HOST_POLLED and must be OMEGA_GPU_CACHE_GPU_UNCACHED. Source: nvidia-open 580.173.02 src/common/sdk/nvidia/inc/nvos.h, NVOS32_ATTR2_GPU_CACHEABLE_YES: "For system memory this will not be coherent with direct CPU mappings." The platform contract refuses a cached host-polled buffer (OMEGA_GPU_PLAT_REFUSED_CACHE_POLICY).

3. File inventory: Linux driver and libc dependencies, migrating cut

Counts are grep -c of nvrm_ and m16_ on 2026-10-12 at omega main 536870f1. "Linux headers" lists hosted headers the file includes. "Cut" is where the file stops depending on them. "Host tooling" means the file is development-host measurement or gating and is not part of the native product (the plan separates development hosts from the delivered runtime).

Filenvrm_m16_Linux headersCutNote
src/omega_gpu_engine.c00none (errno/time only on the host build)ADONE: OMEGA_GPU_NO_POSIX build, clock refusal
src/omega_gpu_platform.c00noneADONE: new, contract checks and handle table
src/omega_blackwell_encoder.c00none (stdio removed in A)ADONE
src/omega_blackwell_qmd.c00noneADONE
src/omega_blackwell_realize.c00noneADONE
src/omega_om_units_fs.c00none (generated, freestanding OM-2 binding)ADONE: replaces src/sha256.c; the hosted binding src/omega_om_units.c needs pthread TLS, mmap and abort and stays out of the link
src/omega_blackwell_codegen.c00none in the freestanding build (stdio, stdlib only in the hosted build)A.2DONE: caller-provided code buffer (omega_blackwell_kernel_encode_into); allocating generators, diagnostics and the printing variation self-test are hosted only
src/omega_blackwell_matmul.c00none in the freestanding build (stdlib only in the hosted build)A.2DONE: omega_blackwell_kernel_free and the dispatcher hosted only; integer bf16 rounding in the freestanding build
src/omega_gpu_wait.c00none in the freestanding build (time only in the hosted build)CDONE (session part): freestanding has no default clock and refuses without cfg->now_ns
src/omega_gpu_serving.c00noneCDONE (session part): in the freestanding closure
src/omega_gpu_matmul_api.c00none (string.h only for mem/str)CDONE (session part): host memory and clock from the session, code encoded in place into a CODE buffer, explicit sync calls
src/omega_gpu_attention_api.c00none (stdio only under OMEGA_ATTN_DEBUG)CDONE (session part): same as matmul API
src/omega_gpu_session.c00none in the freestanding build (pthread only for the hosted default install)CDONE (session part): every device call through OmegaGpuPlatform ABI 1.1; header names OmegaGpuMem, not NvrmMem
src/omega_gpu_fmt.c00none (stdarg)Cnew: bounded formatter for session and API text
src/omega_gpu_platform_linux.c1315pthread, stdio, stdlib, timereference onlynew: the Linux RM/UVM implementation of OmegaGpuPlatform, hosted only, never in the freestanding closure; its own test
src/omega_gpu_elementwise_api.c00stdio, stdlib, timeC (later part)uses OmegaGpuMem from the session; still hosted
src/omega_blackwell_engine.c1913errno, stdio, timestays Linux-privatethe Linux backend of OmegaGpuBackend; a sibling native backend over OmegaGpuPlatform arrives in B/C
src/omega_numeric_gb10.c212stdio, stdlib, errno, timeC/Dnumeric launchers follow the engine Phase B order
src/omega_numeric_divsqrt_gb10.c202stdio, stdlib, errno, timeC/Dsame
src/omega_numeric_reduce_gb10.c172stdio, stdlib, errno, timeC/Dsame
src/omega_numeric_ldst_gb10.c162stdio, stdlibC/Dsame
src/omega_blackwell_submit.c4134stdio, stdlib, time, unistdDvector executor; sha256-pinned by the M17/M18 gates, re-sealed on chip
src/runtime/rx_resident_gpu.c189pthread, stdio, stdlib, unistdDresident runtime seat
src/omega_world_gates.c602stdio, stdlib, time, unistdhost toolinggates and measurement, stays on Linux
src/omega_accelerator_world.c389stdio, stdlib, time, unistd, sys/mmanhost toolingstays on Linux
src/omega_blackwell_gates.c01stdio, stdlib, timehost toolingstays on Linux

Headers that still expose a Linux driver type and must lose it before the cut that migrates their users: src/omega_numeric_native.h (C/D), src/forge_realization.h, src/omega_evidence.h, src/omega_accelerator_world.h, src/omega_physics_dir.h (host tooling; they keep it). src/omega_gpu_session.h lost NvrmMem in cut C (session part).

Distinct driver entry points in use (count of call sites, same snapshot): nvrm_mthd 188, m16_native_close 46, nvrm_alloc 33, nvrm_alloc_gpu_uncached 30, m16_native_submit_methods 11, m16_native_create_channel 10, nvrm_free 6, m16_native_open 6, nvrm_retire 5, m16_native_wait_marker 4, nvrm_enqueue 2, nvrm_channel_destroy 2, nvrm_channel 2, m16_native_wait_marker_ge 2, nvrm_ring, nvrm_open, nvrm_close 1 each. The 188 nvrm_mthd sites are RM control calls (class allocation, VA space, channel setup); each maps to a row of section 2, and none of them exists in the native path by design: the native backend talks to the device through the platform services, not through an RM method table.

mk/omega-gpu-engine.mk, targets gpu-engine-freestanding and test-gpu-engine-freestanding, run by the gpu-engine job of .github/workflows/host-suites-2.yml.

5. The platform contract in one page

src/omega_gpu_platform.h, ABI 1.1 (1.0 in cut A; 1.1 adds the session services in cut C).

6. Next cuts

Pre-existing, unrelated to this cut: make test-gpu-serving-alloc fails its bounds mode on omega main 536870f1 ("in-bounds paged calls touched the driver (1 allocs)"), reproduced on an untouched checkout on 2026-10-12. It belongs to the matmul serving lane (cut I, omega#414), and is reported there. On main 4d0bb36 its sweep mode fails 130 checks as well; cut C leaves both failures unchanged (the output of all six modes is identical to main apart from test line numbers). gpu_attention_test --hd 128 --host-only fails 16 of 107 on main 4d0bb36 and on this branch with the same list.