Skip to content

Mirror omega 62d1d0d so the drift gate is green (Refs #193) - #194

Merged
drakestapleton merged 1 commit into
mainfrom
cursor/drift-omega-62d1d0d-872c
Oct 30, 2026
Merged

drakestapleton merged 1 commit into
mainfrom
cursor/drift-omega-62d1d0d-872c

Conversation

@drakestapleton

@drakestapleton drakestapleton commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

Purpose and scope

Refs #193. The drift gate on main (78fea51) fails because omega-mv moved GPU paths that CUDA++ had not taken. This syncs those paths to omega 62d1d0d668f897386a0e311374f8dbcc5c32dde8 (omega-mv #492, the IMAD.HI.U32 register-Rc refusal, and #936, the offline DAG evaluator). It does not close the issue.

62d1d0d does not touch src/omega_cubin.* or om/cubin/. The only file it shares with open PR #170 is Makefile. examples/hello_gpu/hello_gpu.c is also edited, for the reason in the path list: the mirrored warp simulator dropped the fields that --sim was printing. That edit is not #170's sm_86 work.

Drift gate on this commit, against that omega revision:

DRIFT-GATE: PASS (745 GPU paths, omega 62d1d0d668f8, none moved away from CUDA++ since the baseline)

tools/extract/drift.sh --self-test also passed: both negative controls went red, and the real check stayed green. The same two lines are in CI job drift / drift on run 41064965109.

Path decisions

Path Decision Reason
src/omega_blackwell_codegen.h Mirrored. Blob 1f0b70eecd3860da68bbe013860f27ca01da0d2f. #492 bytes. Same as omega 62d1d0d.
tests/bw_warp_sim.h Mirrored. Blob 6d93828f3979b3a7223ebe0f1952b53e1d414764. The four simulators refuse a non-RZ Rc on IMAD.HI.U32 (WS_E_IMADHI_RC). The chip reads Rc as a 64-bit pair.
tests/bw_warp_sim_k.h Mirrored. Blob 993875647985cc99ce27a78003df26df91fd18e1. Same refusal.
tests/bw_warp_sim_pa.h Mirrored. Blob 157e396cde9d942cc0bfff02fd057ed393c52a0a. Same refusal.
tests/bw_warp_sim_tc.h Mirrored. Blob a08e38b6a05d815448fe8b4546d204aff6f3e166. Same refusal.
tests/gpu_imadhi_rc_test.c Mirrored. Blob 179596a27cd1c24e02ec8459a45f2e7216ca2424. Omega-only at the failing gate. One binary per simulator header.
Makefile Both omega hunks are in this file. The lines below are the ones this tree keeps. Baseline blob updated to 6b53cd12431392798d60c2da26875a3d7c843595. The gate compares file blobs. Omega's delta from the old baseline blob 4e068c1d is only the test-gpu-imadhi-rc block and the test-dagsim block. Those are copied. The file cannot become omega's 2781-line Makefile.
tools/dagsim/*, tests/dagsim/* Mirrored from 62d1d0d. #936. tools/dagsim is in tools/extract/extra-paths.txt so the map watches it.
src/runtime/rx_costmodel.c, src/runtime/rx_costmodel.h Mirrored. Blobs d8ddf956d88d4d9164682d2223a277cd04fc37dd and 6e2c0db52fafe3548e9161bc96ea9c07292dcd36. dagsim calls this calculator. The rest of src/runtime/ is not imported.

Not imported: the nvcc 13.0 listing under evidence/IMADHI-RC-ORACLE-nvcc13.0-20261016 (docs/AUDIT.md), spec/offline-evidence-v1.md, crumbs, and CONTRIBUTORS.md. None of those are GPU-map paths the gate was failing on.

examples/hello_gpu/hello_gpu.c is not one of the seven paths. The mirrored tests/bw_warp_sim.h no longer stores err_tid, err_cx, err_addr, err_bytes, gld_bytes, gst_bytes, or fp_ops. --sim now names the lane and the address from the launch it issued, and counts the vecadd itself (two f32 loads, one f32 store, one FADD per element). The file is on #170's list; this diff does not add the sm_86 encoder path.

Makefile lines this tree keeps

Omega's test-gpu-imadhi-rc block is lines 397–406 here, same text as 62d1d0d. The test-dagsim recipes at lines 428–442 are the same text. RX_CM_OBJ at lines 420–426 is omega's object rule from the test-costmodel block just above the #936 hunk (the hunk references $(RX_CM_OBJ)). It is copied, not rewritten. The test-costmodel unit target is not copied: it links src/omega_om_units.c and tests/runtime/rx_costmodel_unit.c, which are not in this tree.

Lines that are not omega's text:

  1. Line 354: test-gpu-imadhi-rc test-dagsim $(CARRIED_HOST_TESTS)
    make test is test: $(HOST_TESTS), and GNU make expands that list when it reads the rule. Omega has no HOST_TESTS. The two names have to be on this assignment or make test never runs them. A later HOST_TESTS += would not add them.

  2. Lines 411–412:
    src/omega_om_units.c is not in this tree. src/sha256.c is sha256_hash on every host.
    tests/dagsim/sha256_host.c is omega's non-AArch64 stub and aborts if a digest is requested.
    Omega's two comment lines say the seeded SHA-256 unit is AArch64 machine code and that other hosts link tests/dagsim/sha256_host.c. That is the ifeq this file does not use.

  3. Line 419: DS_SHA_SRC = src/sha256.c
    This replaces omega's four lines:
    ifeq ($(shell uname -m),aarch64) / DS_SHA_SRC = src/omega_om_units.c / else / DS_SHA_SRC = tests/dagsim/sha256_host.c / endif.
    src/omega_om_units.c is not in this repository. tests/dagsim/sha256_host.c is still the omega stub (blob 64ffdf4e) and aborts if sha256_hash is called. src/runtime/rx_costmodel.c calls sha256_hash. src/sha256.c is that function on every host, including AArch64.

  4. Lines 1–353 and 355–395, the CUDA++ GPU build that was already here.
    One reason for all of them: they are this repository's build (CC ?= gcc at line 15, PHYSICS_DIR ?= . at line 17, -include mk/*.mk at line 27, the HOST_TESTS manifest, the driver-client and encoder rules). Omega's Makefile at the same path is the omega runtime build (PHYSICS_DIR pointing at physics, a different SRCS list). The #492 and #936 delta does not edit those lines. Overwriting the file with omega's 2781-line Makefile would delete the CUDA++ build. The drift baseline records omega's new blob so this remaining difference does not fail the gate.

The nvcc listing named in the imadhi comment is not in this tree. The GB10 chip probe of an odd Rc is NOT RUN.

How this meets PR #192

#192 (cursor/reproducible-host-suite-8957) rewrites the HOST_TESTS assignment: it inserts test-omega-slice-runner, test-omega-arch-guard, test-omega-barrier-contract, and test-omega-binding-portable, then HOST_TESTS := $(filter-out $(CUDAPP_TARGET_ONLY_TESTS),$(HOST_TESTS)). Its last Makefile hunk is the test-portable-receipts recipe. It does not reach zero-cuda-gate or the two blocks appended after it (lines 397–442 here).

A merge has to keep both name sets on the assignment that the test: rule reads, and then keep #192's filter. test-gpu-imadhi-rc and test-dagsim are not in CUDAPP_TARGET_ONLY_TESTS, so that filter does not drop them. Putting either name in a HOST_TESTS += after the test: line would not run it.

Evidence on the exact commit

git rev-parse HEAD = 458a448e4491be308d876d9a3bee772ab1f740b4. Host: Linux 6.12.94+ x86_64. gcc and aarch64-linux-gnu-gcc are Ubuntu 13.3.0. qemu-aarch64-static is 8.2.2. No GB10, no /dev/nvidia0, no /dev/aien-gpu.

  • make test (host-only). FAIL, exit 2, on this x86_64 VM. CUDAPP_MEM_RESERVE_MIB=0 make CC=gcc -j4 test. test-drift finished first: DRIFT REGRESSION TESTS PASS. The archive then stopped in pre-existing AArch64 dsb sy (src/omega_blackwell_submit.c:284 and src/omega_blackwell_engine.c:558, Error: number of operands mismatch for ds). That is the gap Make the portable host suite run from a fresh x86-64 checkout #192 is closing. This commit does not change those instructions. CI host-tests on ubuntu-24.04-arm then passed: CUDA++ HOST TESTS PASS (58 targets).
  • make test-native-artifact (host-only). NOT RUN on this VM. It links the same archive, which does not assemble on x86. CI host-tests includes that target and passed.
  • make zero-cuda-gate (ELF audit and negative control). NOT RUN as its own command on this VM. CI host-tests includes it and passed.
  • build/hello_gpu --sim (simulator only). PASS under qemu, not as a native x86 binary. aarch64-linux-gnu-gcc built /tmp/cudapp-arm/hello_gpu, and qemu-aarch64-static -L /usr/aarch64-linux-gnu ran sh tests/dx/hello_sim_test.sh: hello --sim tests: 12 passed, 0 failed, exit 0. CI hello-sim / hello-sim succeeded on the arm runner.
  • make doctor. Ran. Exit 2, NOT READY: 5 problems (no NVIDIA module, no /dev/nvidia*, no GPU in sysfs). Expected on this machine. The target table is NOT_RUN (no pinned omc).
  • GB10 hardware tests. NOT RUN. No authorized GPU window, and this VM has no GB10.

Also run locally:

  • tools/extract/drift.sh /tmp/omega-mv 62d1d0d668f897386a0e311374f8dbcc5c32dde8: PASS, exit 0. DIVERGENCE: 360 shared, 165 same, 195 differ (126 licence-header only, 69 code); 375 cudapp-only, 10 omega-only. The 10 omega-only paths are pre-existing (src/omega_blackwell_gates.c/.h, tests/gpu_tern_test.c, and evidence files already in the baseline). No DRIFT line.
  • tools/extract/drift.sh --self-test on the same pair: PASS, SELF-TEST: PASS (both controls red, real check green).
  • CUDAPP_MEM_RESERVE_MIB=0 make CC=gcc -j4 test-dagsim on x86_64: PASS, exit 0. dagsim_unit: 171 checks, 0 failed, and tests/dagsim/run_cli.sh all ok.
  • The four test-gpu-imadhi-rc binaries, cross-built and run under qemu-aarch64-static: PASS, exit 0 each (bw_warp_sim, _tc, _k, _pa). Each prints PASS rc=RZ, PASS encode with Rc = R6, and PASS rc=R6: refused: IMADHI_RC at pc 5.

CI on 458a448: 15 checks, 15 successful, 0 failed. Run 41064965109. drift / drift logged DRIFT-GATE: PASS (745 GPU paths, omega 62d1d0d668f8, none moved away from CUDA++ since the baseline) and SELF-TEST: PASS. CI / host-tests logged CUDA++ HOST TESTS PASS (58 targets).

Correctness, compatibility and provenance

  • Negative controls and affected contracts are documented. The imadhi test's negative control is a register Rc, which must be refused. hello_sim still requires exit 1 on --bug=past-end and exit 1 on --bug=short in the control binary. The drift self-test is the gate's negative control.
  • API/ABI and Omega consumer effects are identified. No public runtime header in docs/runtime/omega_runtime_api.manifest changed. src/omega_blackwell_codegen.h is a straight sync. Source status is not raised. The chip behaviour of a register Rc is not claimed: the simulator refuses it, and the GB10 probe is NOT RUN.
  • Third-party material, licensing, and public-history safety were checked. New sources are omega's own files at 62d1d0d, copied byte for byte (git hash-object matched git rev-parse 62d1d0d:path for each). No NVIDIA cubin, PTX, or nvdisasm listing was added.
  • No secrets, personal machine paths, private addresses, other processes' logs, vendor binaries, or unauthorized generated artifacts were included.
  • Existing receipts remain immutable. No evidence/ receipt was rewritten. No new receipt directory: these are host checks, and the GB10 probe was not run.

Known limitations

GB10 is NOT RUN, including the odd-Rc chip probe the imadhi comment still says is pending. make test does not complete on this x86_64 host because of dsb sy in the engine and submit sources. The arm64 CI host suite did complete, 58 targets. tests/dagsim/sha256_host.c is present and unused by the link. dagsim is host arithmetic on the fixture numbers, not a measured cost model.

— Grokbot

Open in Web Open in Cursor 

Omega-mv #492 and #936 moved the warp simulators, the codegen header, the
IMAD.HI Rc host test, and the offline DAG evaluator. Those files are the
62d1d0d bytes. The Makefile takes both new blocks. DS_SHA_SRC is src/sha256.c
because this tree has no src/omega_om_units.c. The baseline blobs are that
commit's, so the gate accepts the Makefile lines this build still has to keep.

hello_gpu --sim accounts the vecadd itself. The mirrored warp simulator no
longer stores the lane, the address, or the byte counts that report used.

Refs #193

— Grokbot

Co-authored-by: Drake Stapleton <[email protected]>

@drakestapleton drakestapleton left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review at 458a448: ready-to-merge, and it should merge before #192.

1. Drift is green. The drift job (124093791605) reports DRIFT-GATE: PASS (745 GPU paths, omega 62d1d0d668f8, none moved away from CUDA++ since the baseline), and its self-test passes. All 15 checks are green, including host-tests (124093791452) and CodeQL.

2. Mirror fidelity. I compared this PR's file blob SHAs against git/trees/62d1d0d668f897386a0e311374f8dbcc5c32dde8 in aien-dev/omega-mv, read recursively.

  • Exact blob match, 21 files:
    • src/omega_blackwell_codegen.h
    • tests/bw_warp_sim{,_k,_pa,_tc}.h
    • tests/gpu_imadhi_rc_test.c
    • all of tools/dagsim/* and tests/dagsim/* (including 7 fixtures and sha256_host.c)
    • src/runtime/rx_costmodel.{c,h}
  • Makefile: recorded divergence. This blob is 050e736b; omega's is 6b53cd12. The baseline now records omega's new blob. The PR body gives line-by-line reasons: omega's test-gpu-imadhi-rc, RX_CM_OBJ and test-dagsim blocks are copied verbatim, the names are added to HOST_TESTS because test: expands it at read time, and DS_SHA_SRC = src/sha256.c is used because src/omega_om_units.c isn't in this tree. That is acceptable.
  • CUDA++-only files: examples/hello_gpu/hello_gpu.c, tools/extract/drift-baseline.tsv and extra-paths.txt don't exist in omega. The hello_gpu edit has a stated reason: the mirrored simulator dropped the fields --sim printed. hello-sim is green.

3. Frozen C stack. There's no rework. Every mirrored C/H file is byte-identical to omega, and the only CUDA++-only code edit is in the hello_gpu example. src/omega_cubin.c, src/omega_cubin.* and om/cubin/ are untouched (ADR 0044 holds).

4. GB10. The odd-Rc chip probe and all GB10 tests are labeled NOT_RUN. The imadhi refusal is a simulator behaviour, not a chip claim. Nothing ran on the Spark.

5. Overlap and merge order.

  • #192 (6235ac1): they share one file, Makefile, and both hunks rewrite the same line, the last line of the HOST_TESTS = assignment (main L353). That's a guaranteed one-line textual conflict. The other hunks don't collide: #192's last hunk is at main ~L376, and this PR's append is after L394.
  • Merge order: merge #194 first, then rebase #192. The rebase must keep both name sets on the HOST_TESTS = assignment, followed by #192's filter-out. This order turns main's drift green for everyone, and #192 is the larger PR that's already being re-checked.
  • Risk for the rebase: #192 turns on x86-64 host runs, but the PR body ran the test-gpu-imadhi-rc binaries only under qemu-aarch64, not natively on x86. The target isn't in #192's CUDAPP_TARGET_ONLY_TESTS, so after the rebase it will run on x86. Please confirm it builds and passes natively there, or add it to that list. test-dagsim already passed natively on x86-64.
  • #170: it shares Makefile and examples/hello_gpu/hello_gpu.c. #170 will need a rebase too; the hello_gpu --sim printing edits are the likely conflict.

— Grokbot

@drakestapleton
drakestapleton merged commit b4f0480 into main Oct 30, 2026
15 checks passed
@drakestapleton drakestapleton mentioned this pull request Oct 30, 2026
10 of 11 tasks
cursor Bot pushed a commit that referenced this pull request Oct 30, 2026
Bring in the drift fix from #194 (b4f0480). Keep both HOST_TESTS
additions: main's test-gpu-imadhi-rc and test-dagsim, and this
branch's portable omega targets, plus the x86 target-only filter.

Refs #15

Co-authored-by: Drake Stapleton <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants