interplane.Get Omega
Read in your language

CUDApp

CUDA++: AIEN’s GPU machine-code toolchain, runtime and driver client for NVIDIA GPUs without the CUDA toolkit. Hardware coverage and driver replacement limits are explicit.

Brought by drakestapleton

branch main Branches Tags History

CUDApp / docs / speculation / NATIVE-DEVICE.md

70 lines · 4614 bytes Raw Blame History Rendered
1# Native GPU connection
2
3`native/nvrm/context.om` continues the canonical NVRM lifecycle from
4`349913f17c083996680c72b32f767b225005155d` in seeded Omega. It uses the
5NVIDIA580.173.02 public ABI definitions already retained with their notices in
6this repository. No C or Rust runtime helper is linked or executed.
7
8The compiler extension is in Omega PR676. It adds scoped RM parameter binding,
9an exact UVM request allowlist, owned memory addresses, ordered mapped words,
10unused low-address reservations and binding limited to those reservations.
11The source-born compiler has no foreign compiler, assembler or linker in its
12construction chain. Independent GCC header-layout and GNU assembler encoding
13oracles were used during development; shell and Node coordinated checks.
14
15The physical probes cover private RM/UVM context creation, a GPU address space,
16coherent system-memory objects, their CPU and GPU mappings, an uncached queue,
17the compute channel, a mapped notification page, submission and bounded waiting.
18`nvstart` queries the device, `nvfull` attaches UVM, `nvalloc` returns an owned
19mapping, `nvchan` creates an empty channel, `nvsend` submits one packet and
20`nvwait` observes its completion. `nvdrop` releases an allocation and `nvstop`
21tears down the entire context. Failed operations retain stage/error information.
22
23There is one outstanding packet at a time. Pending work prevents buffer release
24and another submission. A missed completion latches a fault; further submission
25and context reuse are refused. Partial allocation state remains recorded until
26cleanup. The table has96 live allocation slots; the compiler has128 mapping
27slots. These are bounded runtime resources, not model-sized allocation arenas.
28
29Teardown has three explicit phases: closed, driver resources live, and
30descriptors closed with CPU mapping cleanup pending. A failed unmap retains its
31mapping handle. A later `nvstop` retries only those mappings; it does not repeat
32RM/UVM operations or descriptor closes. The context fault stays latched even
33after cleanup succeeds. The [host refusal fixture](TEARDOWN-HOST.md) checks this
34contract with substituted OS effects. Its native compilation and execution
35remain NOT_RUN until replayed with the pinned compiler on Linux AArch64; the
36earlier physical receipts do not qualify this source change.
37
38GPU buffers first reserve unused page-aligned CPU addresses below1TiB. File
39binding can replace only that owned reservation. The same address is serialized
40into the GPU mappings. This matters because a command entry's address field is
4140bits; ordinary Linux-selected CPU addresses can exceed it. The existing
42canonical GP entry word, including its level bit, is retained. No other runtime
43or shared compiler tree was modified.
44
45The driver reports the GB10 SM identifier as2564, matching the repository's
46historical M16 receipt. That field uses a different numbering contract from the
47CUDA target name. An initial test incorrectly expected3073 and was corrected.
48Its initial negative-value diagnostic also required correction. Both failures
49are retained locally. A UVM attempt launched before scheduling confirmation is
50excluded from qualified evidence; subsequent probes required confirmed admission.
51
52| Physical check | Result |
53| --- | --- |
54| Device and private address-space lifecycle | Three complete cycles per probe passed. |
55| Buffer lifecycle | Twelve buffers over three contexts; full written-byte comparison, explicit release and context-owned cleanup passed. |
56| Empty channel lifecycle | Three cycles passed, including refusal to free its active queue. |
57| FIFO submission | 2,052 distinct completion payloads passed across two contexts, including ring wrap. A deliberately wrong expected payload timed out and latched the fault. |
58
59These are correctness probes under shared hardware admission. The FIFO test
60executes semaphore commands. The subsequent [native kernel qualification](NATIVE-KERNEL.md)
61separately covers integer vector arithmetic. There is no model inference,
62AIENOS endpoint integration or timing comparison in this device evidence.
63Full-state rollback, all four experiment arms and issues63-66
64remain open. Cleanup refusal injection and independent final-source review remain
65required alongside the next kernel/model stages.
66
67To build a probe, concatenate `native/nvrm/context.om` with the selected
68`tests/speculation/native-{device,memory,channel,submit}-test.om`, compile it with
69the pinned native compiler and run only in an admitted hardware window. Current
70source/artifact identities and bounded results are in `evidence/speculation/native-device`.