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_reconv_chip.sh
| 1 | #!/bin/sh |
| 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 | # tools/run_gpu_reconv_chip.sh [OUT_ROOT] [-- extra gate args] |
| 18 | # omega #308 chip gate: structured warp reconvergence. Runs the host part first (encoder |
| 19 | # goldens, region bookkeeping, refusals, nvdisasm, every probe through the SIMT warp |
| 20 | # simulator, mutation controls); a kernel the simulator rejects never gets chip time. Then |
| 21 | # every probe (R3 diamond, R4 loop break, R5 nested, R6 lanes past the end + BAR/SHFL, 16-deep |
| 22 | # barrier bound) on the chip against the host oracle, bit-exact, then each math mutant must be |
| 23 | # caught. Sealed receipt folder OUT_ROOT/GPU-RECONV-<sha>/ (default ~/workspace/evidence-out): |
| 24 | # receipt.json machine-readable verdict per case run.log test output |
| 25 | # device.txt kernel, driver, omega and physics shas build.log compiler output |
| 26 | # copies of the source files the verdict depends on, SHA256SUMS over all |
| 27 | # Pattern of tools/run_gpu_elementwise_chip.sh. Never creates or touches the quiet flag (the |
| 28 | # operator runs it inside an own quiet window) and never kills or times out the run. |
| 29 | # PHYSICS_DIR must be at the physics.lock commit (the Makefile refuses otherwise). |
| 30 | set -u |
| 31 | cd "$(dirname "$0")/.." || exit 2 |
| 32 | P=${PHYSICS_DIR:-../physics} |
| 33 | OUT_ROOT=$HOME/workspace/evidence-out |
| 34 | EXTRA="" |
| 35 | if [ $# -gt 0 ] && [ "$1" != "--" ]; then OUT_ROOT=$1; shift; fi |
| 36 | if [ $# -gt 0 ] && [ "$1" = "--" ]; then shift; EXTRA="$*"; fi |
| 37 | SHA=$(git rev-parse --short HEAD) |
| 38 | OUT=$OUT_ROOT/GPU-RECONV-$SHA |
| 39 | mkdir -p "$OUT" |
| 40 | if ! make PHYSICS_DIR="$P" build/gpu_reconv_test > "$OUT/build.log" 2>&1; then |
| 41 | echo "GPU-RECONV BUILD FAIL (see $OUT/build.log)"; exit 1 |
| 42 | fi |
| 43 | { |
| 44 | uname -a |
| 45 | nvidia-smi --query-gpu=name,driver_version --format=csv,noheader 2>/dev/null || echo "nvidia-smi: unavailable" |
| 46 | echo "omega $(git rev-parse HEAD) ($(git status --porcelain | wc -l) uncommitted paths)" |
| 47 | echo "physics $(git -C "$P" rev-parse HEAD)" |
| 48 | date -u +%FT%TZ |
| 49 | } > "$OUT/device.txt" |
| 50 | # shellcheck disable=SC2086 |
| 51 | ./build/gpu_reconv_test --out "$OUT/receipt.json" $EXTRA > "$OUT/run.log" 2>&1 |
| 52 | rc=$? |
| 53 | cp src/omega_gpu_elementwise_api.c src/omega_gpu_elementwise_api.h src/omega_bw_reconv.h src/omega_blackwell_codegen.c \ |
| 54 | om/encoder/bw_enc_sm121.om src/omega_om_units.ident tests/gpu_reconv_test.c tests/bw_warp_sim.h "$OUT/" |
| 55 | (cd "$OUT" && sha256sum -- * > SHA256SUMS) |
| 56 | tail -1 "$OUT/run.log" |
| 57 | echo "GPU-RECONV chip gate rc=$rc receipt=$OUT/receipt.json" |
| 58 | exit $rc |