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#484 (code only)

merged derived 2910d3d7b882707c #484

Imported from GitHub aien-dev/omega-mv#484 (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 ce7fdce70e4785abbc5fe27966f8b888fac7470b · Head ce7fdce70e4785abbc5fe27966f8b888fac7470b

- reviewed (COMMENTED) on -

Independent review of R5 (native SHFL.BFLY / F2FP.BF16 entries, patch step removed, f32 global atomic add). Reviewed head 4a83e43e in a fresh clone; CPU only, nothing run on the GPU.

Blockers

None found.

Should-fix

  1. A missing destination encodes R0, not RZ, for the new atomic. src/omega_blackwell_codegen.c:265 maps dst_vreg < 0 to physical 0, and the new case at src/omega_blackwell_codegen.c:532-538 uses that dst unchanged. I encoded BW_IR_ATOMG_ADD_F32_STRONG_SYS with dst_vreg = -1 and nvdisasm gives ATOMG.E.ADD.F32.FTZ.RN.STRONG.SYS PT, R0, desc[UR6][R2.64], R3, so the old value silently overwrites whatever lives in R0. The integer twin has the same latent problem (pre-existing), but this entry is pitched at gradient accumulation where callers will usually want to discard the old value. Fix: in this case emit 0xff (RZ) when insn->dst_vreg < 0, and add a fixture row with d = -1. The fixture's existing RZ row passes d = 255 through the identity map, so it doesn't test this path.
  2. Scope and order are fixed at STRONG.SYS without saying why, and the header suggests dW use. src/omega_blackwell_codegen.h:108-111. The bits are right: order field 77..80 = 0xa matches Mesa set_mem_order (Strong(System)), and I decoded the .GPU variant (0x0c1ef306) too. For dW accumulation into device memory read by a later launch, nvcc's atomicAdd emits the GPU-scope, no-return form (RED). SYS scope is only needed when the CPU or another agent watches the word during the kernel. The 2 M adds/s in probe.log was measured on GPU-uncached host-visible memory, with every thread on one address, under SYS scope. It is not a training-path figure and not a hardware ceiling. Please add one line saying SYS is for host-visible words and that a .GPU/RED variant will be added (and measured against the ceiling) before the trainer uses this op.

  3. The probe evidence names a commit that doesn't exist on GitHub. evidence/R5-ATOMF32-PROBE-29ef3cb6-20261016T0226Z/probe.log:1 says commit 29ef3cb6. That commit is not in this PR's history and git fetch origin 29ef3cb6 fails (it is probably the pre-rebase commit). SHA256SUMS verify, but nothing ties the chip run to the code under review. Either record which PR commit has the same src/ and tests/ tree (for example with git rev-parse <commit>^{tree} on both), or re-run the probe on the head.

  4. CI covers the new golden words but not the new simulator semantics. test-codegen-freestanding (gpu-engine lane, path filter matches omega_blackwell_codegen) runs both new fixtures. gpu_atomf32_probe_test --host-only (Makefile:2551) is not in any workflow, so the FTZ add model at tests/bw_warp_sim_tc.h:200 and the BFLY/F2FP simulator cases are only run by hand. The other gpu_*_test --host-only binaries have the same gap, so this is pre-existing. Adding this one to a host lane is cheap: the build plus run took seconds here.

Nits

  • src/omega_blackwell_codegen.c:1004: "mode .DOWN 1 -> .BFLY 3". Mesa NAK OpShfl encodes bits 58..59 as Idx 0, Up 1, Down 2, Bfly 3. The word arithmetic (set bit 58) is correct; only the "1" in the comment is wrong.
  • src/omega_blackwell_codegen.c:1038-1041: Mesa ranges are half-open, so the float op field 87..91 is bits 87..90 (Add 0, Min 2, Max 4). Bit 90, which this entry sets for desc[], falls inside Mesa's op field, so Mesa's map and the emitted word disagree. nvdisasm and the chip are the authority here (I confirmed that setting bit 88 decodes as .MIN and bit 90 keeps .ADD). Please say in the comment that the desc bit contradicts Mesa's field and was settled by the decoder.
  • tests/gpu_atomf32_probe_test.c:87,109-113: the subnormal case passes trivially if the atomic does nothing (the word stays 0 and the returned values are 0). It is only meaningful after cases 0 and 1 have passed in the same process, and --cases 2 on its own would pass vacuously. Refuse --cases orders that put 2 before 0, or seed the word with a normal value for that case.
  • tests/gpu_atomf32_probe_test.c:4-7: every partial sum is exact, so .RN is never exercised. One case whose sum must round, for example 2^24 + 1.0 with round-half-even, would pin the rounding mode the comment claims.

Verification done

  • Bit fields vs sources. I read Mesa NAK sm70_encode.rs at a08a0b9. ATOMG f32: opcode 0x9a3; type 73..76 = 9 (.ftz); order 77..80 = 0xa; pred-dst 81..83 = PT; eviction 84..86 = 1 (Normal); bit 63 = Ra.64; bit 91 = UR form. All match the emitted words except bit 90 (see nit). SHFL: bits 53..57 lane, c 40..52 = 0x1f, pred-dst PT, mode 58..59 = 3. F2FP: opcode 0x23e, RZ in 64..71, rounding 79..80 = RN. The F2FP and SHFL golden words match the sealed evidence/OWN30B-T3-TC-PEAK-BW-5faa0f70-20261013T2236Z/fa_ops.sass (lines 21-48).
  • Decoder round-trip (nvdisasm 13.0 -b SM121, my own encodes). SHFL.BFLY for all 32 lanes with varied registers, F2FP with R254/RZ/R128, and ATOMG f32 with R17/R40/R99/UR12 all decode to the intended text. I also decoded flipped bits: clearing bit 90 gives [R2.64+UR6]; bit 88 gives .MIN; type 0x59 gives .RN without FTZ; order 0xf3 gives .GPU. The nvdisasm_decode.txt lines match.
  • Hardcoded fields. Guard predicate PT, address offset 0, eviction Normal and scope SYS are fixed. Each is acceptable for this entry if documented (should-fix 2). The register, UR and lane fields are all operands.
  • Byte identity, re-run independently. I wrote my own harness (not the author's) and built it against main (8edeab5e) and this PR, both with the pinned physics at 6d7cf0d. It encodes the way the runtime loads code (encode_into, then omega_tc_patch_code on main only, then omega_qmma_patch_code) and hashes each kernel with sha256. It enumerated 71,912 kernels: prefill attention 40, tc2 61,440, pq 192, qgemm 10,240. My grid is wider than the author's (two n values for tc2, four wait values for qgemm). Old tree with the patch vs this PR: 0 differ. Negative control, old tree without the patch: 35,988 differ (tc2 30,720, i.e. exactly the SWIGLU half; qgemm 5,120; pq 128; prefill attention 20, i.e. the modes with placeholders). The control is meaningful, and its split matches where the emitters are actually used.
  • Removed patch step. On main, omega_tc_patch_code had exactly three callers (omega_gpu_prefill.c:94, omega_gpu_prefill_attn_api.c:138,165), and all three are gone. No references remain to OMEGA_TC_MARK_*, omega_tc_patch_* or the placeholder counts outside sealed evidence. The test-side users of the tc2, pq, qgemm and prefill-attention generators are simulator-only, so no path ran unpatched before. The QMMA patch is untouched.
  • Host tests (CPU). test-codegen-freestanding PASS (14 fixtures, includes both new ones). --host-only PASS for gpu_prefill_attn_test (69 checks), gpu_tcgemm_test, gpu_pfgemm_test, gpu_qgemm_test and gpu_atomf32_probe_test.
  • Evidence. The folder exists, SHA256SUMS verify, and probe.log shows 5/5 PASS with the numbers in the PR body. The wrong-answer control can really fail: integer adds of 0x3f800000 across 2^17 threads wrap to 0, and the check reports 131,054 faults. The probe aborts if the control is not caught (tests/gpu_atomf32_probe_test.c:118-119).
  • Build-system bug (stale m16_native.o / nvrm.o). This PR does not touch it. The cause is Makefile:104-108: the objects depend on $(PHYSICS_DIR)/... by path, so pointing PHYSICS_DIR at a different checkout whose sources are older than the existing .o does not rebuild them, and check-physics-lock checks the directory, not what built the objects. It should be a separate issue, for example stamping the physics commit into build/ and making these objects depend on the stamp. I found no existing issue for it.
  • CI at review time. 28 checks passed, about 30 were still queued or running, none had failed.

Reviewed by an independent Claude Opus 5.5 reviewer for the orchestrator.

Code

The head commit is on main: ce7fdce70e4785abbc5fe27966f8b888fac7470b.

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
484
ce7fdce70e4785abbc5fe27966f8b888fac7470b
{"kind":"github-import","owner":"aien-dev","repo":"omega-mv","number":484,"url":"https://github.com/aien-dev/omega-mv/pull/484","export_sha256":"967c79e26a893657b5cdaa45efd442be5dbd2ecfe68e25f9a8c1b5da4d60d452","imported_utc":"2026-11-18T16:38:01Z","metadata":"unavailable","state_derived":true}

Changes

There is no diff: the head commit is already on main.