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 / run_gpu_cmdlist_chip.sh
| 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_gpu_cmdlist_chip.sh EVIDENCE_DIR [PHYSICS_DIR] |
| 18 | # OWN-30B W-L2 chip gate for omega_gpu_cmdlist (many launches in one submission) + the decode glue kernels. |
| 19 | # Caller holds the GB10 lock: flock /tmp/aien-gb10.lock tools/run_gpu_cmdlist_chip.sh EVID |
| 20 | # 0. host proofs first (never hardware results): --host-only, --sim |
| 21 | # 1. main: baseline (session launch loop) vs one list (PCAS, INLINE) at L = 64, 289, 1024, bit-identical, negative |
| 22 | # control (dropped launch caught), no-barrier control (informational), glue kernels in one list + mutants caught |
| 23 | # 2. one variable, informational: --spin-us 0 (platform poll only) |
| 24 | # Verdict line last: "GPU_CMDLIST_CHIP: PASS|FAIL". |
| 25 | set -u |
| 26 | EVID="${1:?evidence dir}"; PHYS="${2:-$HOME/workspace/physics-own30b-k}" |
| 27 | "$(dirname "$0")/require_physics_pin.sh" "$PHYS" || exit 2 # omega#456: refuse a Physics checkout other than physics.lock |
| 28 | HERE="$(cd "$(dirname "$0")/.." && pwd)" |
| 29 | mkdir -p "$EVID" |
| 30 | cd "$HERE" || exit 2 |
| 31 | { |
| 32 | echo "start $(date -u +%FT%TZ) omega=$(git rev-parse HEAD) branch=$(git rev-parse --abbrev-ref HEAD) dirty=$(git status --porcelain | wc -l) physics=$PHYS physics_commit=$(git -C "$PHYS" rev-parse HEAD) physics_lock=$(cat physics.lock 2>/dev/null | head -1)" |
| 33 | uname -a; nvidia-smi --query-gpu=name,driver_version --format=csv,noheader 2>/dev/null; free -g | head -2 |
| 34 | } > "$EVID/device.txt" |
| 35 | make PHYSICS_DIR="$PHYS" -j10 build/gpu_cmdlist_test > "$EVID/build.log" 2>&1 || { echo "GPU_CMDLIST_CHIP: FAIL build"; exit 1; } |
| 36 | T=./build/gpu_cmdlist_test |
| 37 | fail=0 |
| 38 | $T --host-only 2>&1 | tee "$EVID/host-only.log"; [ "${PIPESTATUS[0]}" = 0 ] || fail=1 |
| 39 | $T --sim 2>&1 | tee "$EVID/sim.log"; [ "${PIPESTATUS[0]}" = 0 ] || fail=1 |
| 40 | $T --reps "${REPS:-20}" --out "$EVID/receipt-main.json" 2>&1 | tee "$EVID/main.log"; [ "${PIPESTATUS[0]}" = 0 ] || fail=1 |
| 41 | $T --reps "${REPS:-20}" --spin-us 0 --out "$EVID/receipt-spin0.json" 2>&1 | tee "$EVID/spin0.log"; echo "spin-us 0 exit ${PIPESTATUS[0]} (informational)" | tee -a "$EVID/spin0.log" |
| 42 | echo "end $(date -u +%FT%TZ)" >> "$EVID/device.txt" |
| 43 | (cd "$EVID" && sha256sum *.json *.log device.txt > SHA256SUMS) |
| 44 | if [ $fail = 0 ]; then echo "GPU_CMDLIST_CHIP: PASS"; else echo "GPU_CMDLIST_CHIP: FAIL"; exit 1; fi |