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
omega-mv / tools / manifests / numeric_transc.chiprun
| 1 | # Manifest for tools/chip_run.sh: E1 row 10, GB10 transcendentals (EXP2 LOG2 SIGMOID TANH SIN COS ERF GELU RSQRT EXP LOG), |
| 2 | # every 2^32 input compared bit for bit with the CPU tier. Sourced as shell by chip_run.sh, |
| 3 | # which provides $HERE (omega root) and $PHYSICS. Forge queue only. |
| 4 | # Converted from the old tools/run_numeric_transc_gate.sh (origin/main) without changing what |
| 5 | # the gate measures: same sources, same gcc flags (the module's), same chip args, same verdict |
| 6 | # words, same receipt fields in the same order. The old-versus-new differences are listed in |
| 7 | # the PR and pinned by tests/test_chip_run_transc_manifest.sh. |
| 8 | # Verdict semantics, from tests/test_omega_numeric_transc_gb10.c: |
| 9 | # one "RESULT chip <op> checked=.. exhaustive=.. mismatches=.. unwritten=.. verdict=.. digest=<hex>" per op |
| 10 | # (digest: full-domain output digest, the tree of tests/test_omega_transc.c; "none" unless exhaustive), |
| 11 | # then "VERDICT PASS|FAIL|NOT_RUN" (line 223); exit 1 unless PASS. |
| 12 | GATE=E1-TRANSC-GB10 |
| 13 | OWNER="lane2 E1 transcendental GB10 chip run" |
| 14 | TEST_SOURCE="tests/test_omega_numeric_transc_gb10.c" |
| 15 | SOURCES="src/omega_numeric_divsqrt_gb10.c src/omega_numeric_transc.c src/omega_numeric.c src/omega_numeric_provenance.c src/omega_blackwell_encoder.c src/omega_blackwell_codegen.c src/omega_blackwell_matmul.c src/omega_blackwell_qmd.c src/omega_om_units.c" |
| 16 | EXTRA_BUILD_SOURCES="$PHYSICS/nvrm/nvrm.c $PHYSICS/m16/m16_native.c" |
| 17 | # The wrapper passes "--chip OP..." itself; this is the old default for direct use. |
| 18 | RUN_ARGS="--chip EXP2 LOG2 SIGMOID TANH SIN COS ERF GELU RSQRT EXP LOG" |
| 19 | # Old verdict: the last "VERDICT <word>" line of the chip log. RESULT lines come before it. |
| 20 | VERDICT_RE='^RESULT|^VERDICT' |
| 21 | PASS_LINE='^VERDICT PASS([^A-Z_]|$)' |
| 22 | EVIDENCE_DIR=${TRANSC_GB10_EVIDENCE_DIR:-$HOME/workspace/evidence-out/E1-TRANSC-GB10} |
| 23 | # Old refusals: exit 1 and "VERDICT NOT_RUN". Old console: RESULT and VERDICT lines of the chip |
| 24 | # log, then RECEIPT and a final "VERDICT <word>" line. Old exit: 0 PASS, else 1. |
| 25 | REFUSE_EXIT=1 |
| 26 | REFUSE_VERDICT_LINE='VERDICT NOT_RUN' |
| 27 | ECHO_RE='^RESULT|^VERDICT' |
| 28 | FINAL_LINE_STYLE=verdict |
| 29 | CHILD_EXIT_PASSTHROUGH=0 |
| 30 | # Old script: dirty omega refused, quiet flag raised for the run (owner string above), GPU lock |
| 31 | # taken, refusal on ANY process holding the lock file (fuser), then a blocking flock. |
| 32 | REFUSE_DIRTY_OMEGA=1 |
| 33 | RAISE_QUIET=1 |
| 34 | TAKE_GPU_LOCK=1 |
| 35 | GPU_LOCK_MODE=fuser |
| 36 | REQUIRE_ALL_PASS=0 |
| 37 | # Host tier, in the old order's spirit: host build, offline nvdisasm provenance check (all |
| 38 | # whole-program kernels), kernel digest, then the host run LAST so the receipt's host_tier |
| 39 | # (the module records the last line of this output) is the host run's last line, as before. |
| 40 | # Lines tagged HOSTTIER_NVD: and HOSTTIER_KDIG: are read back by RECEIPT_EXTRA_JQ via $hostlog. |
| 41 | HOST_TIER_CMD=' |
| 42 | echo "== host tier" |
| 43 | make -s -C . build/test_omega_numeric_transc_gb10_cpu > "$CHIPRUN_RUN_DIR/host-build.log" 2>&1 || { echo "host build failed"; exit 1; } |
| 44 | echo "== nvdisasm provenance" |
| 45 | tools/divsqrt_nvdisasm_check.sh > "$CHIPRUN_RUN_DIR/nvdisasm.log" 2>&1; NVD_RC=$? |
| 46 | grep -E "^\[|^VERDICT|^disassembler" "$CHIPRUN_RUN_DIR/nvdisasm.log" |
| 47 | grep -E "^disassembler|^VERDICT" "$CHIPRUN_RUN_DIR/nvdisasm.log" | sed "s/^/HOSTTIER_NVD:/" |
| 48 | build/test_omega_numeric_transc_gb10_cpu --digest > "$CHIPRUN_RUN_DIR/kdig.txt" || { echo "kernel digest failed"; exit 1; } |
| 49 | sed "s/^/HOSTTIER_KDIG:/" "$CHIPRUN_RUN_DIR/kdig.txt" |
| 50 | build/test_omega_numeric_transc_gb10_cpu; HOST_RC=$? |
| 51 | [ "$HOST_RC" = 0 ] && [ "$NVD_RC" = 0 ] || { echo "host tier ($HOST_RC) or nvdisasm check ($NVD_RC) failed"; exit 1; } |
| 52 | ' |
| 53 | # Receipt: the old object, same fields in the same order. The module's own owner, run_args, |
| 54 | # verdict_lines and reason are dropped (the old receipt had none); row, reference, kernels, |
| 55 | # nvdisasm_check, ops_requested and ops are rebuilt from the chip log and the host tier output. |
| 56 | # verdict: the chip's own last word (PASS, FAIL or NOT_RUN; none = NOT_RUN); a PASS the module |
| 57 | # does not confirm (nonzero exit, dirty tree, moved HEAD) becomes FAIL, as in the old script. |
| 58 | RECEIPT_EXTRA_JQ=' |
| 59 | def tagged($t): $hostlog | split("\n") | map(select(startswith($t)) | .[($t | length):]); |
| 60 | def chipword: ([$log | split("\n")[] | capture("^VERDICT (?<w>[A-Z_]*)") | .w] | last) // ""; |
| 61 | def typed($v): if $v == "true" then true elif $v == "false" then false elif ($v | test("^[0-9]+$")) then ($v | tonumber) else $v end; |
| 62 | def opsjson: try ([$log | split("\n")[] | select(startswith("RESULT chip ")) | split(" ") | map(select(length > 0)) as $f |
| 63 | | reduce $f[3:][] as $kv ({op: $f[2]}; ($kv | split("=")) as $p | . + {($p[0]): typed(if ($p | length) > 1 then ($p[1:] | join("=")) else $kv end)})]) catch []; |
| 64 | . as $r | (chipword) as $cw |
| 65 | | { |
| 66 | gate: $r.gate, |
| 67 | row: "E1 gap table row 10: GB10 transcendentals bit-identical to the frozen CPU sequences", |
| 68 | reference: "omega_math_<op> of src/omega_numeric_transc.c (EXP, LOG: src/omega_numeric.c) (CPU tier), every 32-bit input, bits compared exactly", |
| 69 | omega_commit: $r.omega_commit, |
| 70 | omega_tree_clean_before: $r.omega_tree_clean_before, |
| 71 | omega_tree_clean_after: $r.omega_tree_clean_after, |
| 72 | omega_commit_unchanged_after: $r.omega_commit_unchanged_after, |
| 73 | physics_commit: $r.physics_commit, |
| 74 | physics_lock_pin: $r.physics_lock_pin, |
| 75 | physics_tree_clean_before: $r.physics_tree_clean_before, |
| 76 | physics_tree_clean_after: $r.physics_tree_clean_after, |
| 77 | physics_commit_unchanged_after: $r.physics_commit_unchanged_after, |
| 78 | binary_sha256: $r.binary_sha256, |
| 79 | chip_log_sha256: $r.chip_log_sha256, |
| 80 | kernels: (tagged("HOSTTIER_KDIG:") | join("\n") | split("\n") | map(select(length > 0) | split(" ") | {op: .[0], instructions: (.[1] | tonumber), sha256: .[2]})), |
| 81 | nvdisasm_check: (tagged("HOSTTIER_NVD:") | join("\n")), |
| 82 | host_tier: $r.host_tier, |
| 83 | ops_requested: ($r.run_args[1:]), |
| 84 | ops: opsjson, |
| 85 | chip_exit_status: $r.chip_exit_status, |
| 86 | started_utc: $r.started_utc, |
| 87 | finished_utc: $r.finished_utc, |
| 88 | verdict: (if $r.verdict == "PASS" then "PASS" elif $cw == "PASS" then "FAIL" elif $cw == "" then "NOT_RUN" else $cw end) |
| 89 | } |
| 90 | ' |