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

GitHub aien-dev/omega-mv#201 (code only)

closed derived 14ae26d232b76460 #201

Imported from GitHub aien-dev/omega-mv#201 (code only)

GitHub's metadata for this pull request is unavailable: its state is DERIVED from the commits (merged: the head is reachable from this project's main; open: GitHub kept a merge ref; else closed).

Base 2956e3857e6d86be717934ae846a2b0e7416fb96 · Head da2e0f8fb685356b9a74308320420d3e3ba84839

Apply it

git checkout -b patch-14ae26d232b76460 2956e3857e6d86be717934ae846a2b0e7416fb96
curl -fsSL https://interplane.io/drakestapleton/omega-mv/patches/14ae26d232b76460.patch | git am

Raw patch (mbox) · Diff

Provenance

This proposal is imported from GitHub; it is not signed by its author. Its import statement and source record:

github-import 1
aien-dev/omega-mv
201
da2e0f8fb685356b9a74308320420d3e3ba84839
{"kind":"github-import","owner":"aien-dev","repo":"omega-mv","number":201,"url":"https://github.com/aien-dev/omega-mv/pull/201","export_sha256":"967c79e26a893657b5cdaa45efd442be5dbd2ecfe68e25f9a8c1b5da4d60d452","imported_utc":"2026-11-18T16:36:45Z","metadata":"unavailable","state_derived":true}

Changes

diff --git a/src/omega_numeric_divsqrt_gb10.c b/src/omega_numeric_divsqrt_gb10.c
index cbc9efae4..bc81e6037 100644
--- a/src/omega_numeric_divsqrt_gb10.c
+++ b/src/omega_numeric_divsqrt_gb10.c
@@ -1073,6 +1073,7 @@ int omega_ds_gb10_run(OmegaDsOp op, const uint32_t *a, const uint32_t *b, uint32
     volatile uint32_t *hmarker = (volatile uint32_t *)marker_mem.cpu;
     *hsem = 0;
     *hmarker = 0;
+    *(volatile uint32_t *)((uint8_t *)marker_mem.cpu + 0x10) = 0;
     __asm__ volatile("dsb sy" ::: "memory");
 
     static uint32_t pb[1024];
@@ -1104,6 +1105,14 @@ int omega_ds_gb10_run(OmegaDsOp op, const uint32_t *a, const uint32_t *b, uint32
     pb[n++] = nvrm_mthd(0, 0x005c, 5);
     pb[n++] = (uint32_t)marker_mem.va; pb[n++] = (uint32_t)(marker_mem.va >> 32);
     pb[n++] = OMEGA_BW_MARKER_COMPLETION_PAYLOAD; pb[n++] = 0; pb[n++] = 0x1 | (1u << 20);
+    /* C3 FIX A: after the WFI marker, flush GPU L2 dirty lines to memory
+     * (NVC96F_MEM_OP_A..D = 0x28..0x34, D bits 31:27 OPERATION = L2_FLUSH_DIRTY 0x10;
+     * third_party/nvidia-open-580.173.02/src/common/sdk/nvidia/inc/class/clc96f.h:36-73),
+     * then a second WFI marker that the host waits for before the readback. */
+    pb[n++] = nvrm_mthd(0, 0x0028, 4); pb[n++] = 0; pb[n++] = 0; pb[n++] = 0; pb[n++] = (0x10u << 27);
+    pb[n++] = nvrm_mthd(0, 0x005c, 5);
+    pb[n++] = (uint32_t)(marker_mem.va + 0x10); pb[n++] = (uint32_t)((marker_mem.va + 0x10) >> 32);
+    pb[n++] = 0x46464646u; pb[n++] = 0; pb[n++] = 0x1 | (1u << 20);
 
     if (m16_native_submit_methods(&ctx, pb, n) != 0) { m16_native_close(&ctx); return OMEGA_NUMERIC_ERR_DEVICE; }
     /* Wait long: closing the channel under a running kernel jams the seat. */
@@ -1111,6 +1120,11 @@ int omega_ds_gb10_run(OmegaDsOp op, const uint32_t *a, const uint32_t *b, uint32
         m16_native_close(&ctx);
         return OMEGA_NUMERIC_ERR_DEVICE;
     }
+    volatile uint32_t *hmarker2 = (volatile uint32_t *)((uint8_t *)marker_mem.cpu + 0x10);
+    if (m16_native_wait_marker(hmarker2, 0x46464646u, 600000) != 0) {
+        m16_native_close(&ctx);
+        return OMEGA_NUMERIC_ERR_DEVICE;
+    }
     /* The host marker can land before the last CTAs' stores are visible: the
      * first chip run (receipt 88930d2f...) read the 0x55 fill pattern for
      * 49,359,680 SQRT outputs. Read only after the QMD's own release