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

branch main Branches Tags History

omega-mv / tools / run_numeric_transc_gate.sh

44 lines · 2631 bytes Raw Blame History
1#!/bin/bash
2# SPDX-License-Identifier: Apache-2.0
3# Copyright 2026 Drake Stapleton (AIEN / aien-dev)
4#
5# Licensed under the Apache License, Version 2.0 (the "License");
6# you may not use this file except in compliance with the License.
7# You may obtain a copy of the License at
8#
9# http://www.apache.org/licenses/LICENSE-2.0
10#
11# Unless required by applicable law or agreed to in writing, software
12# distributed under the License is distributed on an "AS IS" BASIS,
13# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14# See the License for the specific language governing permissions and
15# limitations under the License.
16
17# run_numeric_transc_gate.sh -- E1 row 10 chip gate: GB10 realizations of the
18# frozen FP32 transcendental sequences (src/omega_numeric_transc.c; natural EXP
19# and LOG: omega_math_exp / omega_math_log of src/omega_numeric.c), every
20# 2^32 input of each op compared bit for bit with the CPU tier. Each op's RESULT
21# line carries the full-domain output digest (digest=<hex>).
22#
23# Usage: tools/run_numeric_transc_gate.sh [OP ...] (default: EXP2 LOG2 SIGMOID TANH SIN COS ERF GELU RSQRT EXP LOG)
24# Exit: 0 PASS; 1 anything else (FAIL, NOT_RUN, refused). Refusals print
25# "REFUSED: why" and "VERDICT NOT_RUN". Last stdout line: "VERDICT <word>".
26#
27# Thin wrapper: refusals, host tier (host build, host run and the offline disassembler
28# provenance check), quiet flag, GPU lock, chip build, never-killed run and the
29# content-addressed receipt <evidence-dir>/<sha256>.json plus blobs/<sha256>.log live
30# in tools/chip_run.sh, configured by tools/manifests/numeric_transc.chiprun. This
31# wrapper keeps the op-name check and the default ops. Env: PHYSICS_DIR (default
32# ~/workspace/hive-worktrees/physics-gate14-e95e3ed, the module's own default differs)
33# and TRANSC_GB10_EVIDENCE_DIR (read by the manifest).
34#
35# Run it detached so a closed terminal cannot cut the chip run:
36# setsid nohup tools/run_numeric_transc_gate.sh > /tmp/transc-gate.out 2>&1 < /dev/null &
37# Shell + coreutils + git + jq + gcc. No Python.
38set -u
39HERE=$(cd -P "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)
40PHYSICS=${PHYSICS_DIR:-$HOME/workspace/hive-worktrees/physics-gate14-e95e3ed}
41OPS=("$@"); [ ${#OPS[@]} -gt 0 ] || OPS=(EXP2 LOG2 SIGMOID TANH SIN COS ERF GELU RSQRT EXP LOG)
42refuse() { echo "REFUSED: $*"; echo "VERDICT NOT_RUN"; exit 1; }
43for op in "${OPS[@]}"; do case "$op" in EXP2|LOG2|SIGMOID|TANH|SIN|COS|ERF|GELU|RSQRT|EXP|LOG) ;; *) refuse "unknown op $op" ;; esac; done
44exec bash "$HERE/tools/chip_run.sh" "$HERE/tools/manifests/numeric_transc.chiprun" --physics-dir "$PHYSICS" -- --chip "${OPS[@]}"