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_gpu_elementwise_chip.sh

48 lines · 2366 bytes Raw Blame History
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_elementwise_chip.sh [OUT_ROOT]
18# FB-1 cut 4 chip gate (rmsnorm, rope, swiglu, EX2 and shared-exchange probes,
19# each against the host oracle and then against its mutant kernel), with a
20# sealed receipt folder OUT_ROOT/FB1-CUT4-<sha>/ (default ~/workspace/evidence-out):
21# receipt.json machine-readable verdict per case run.log test output
22# device.txt kernel, driver, omega and physics shas build.log compiler output
23# copies of the source files the verdict depends on (bw_mufu_ftz.h: the flush model), SHA256SUMS over all
24# Run it through the heavy queue only (lanes.sh queue --heavy); never kill it.
25set -u
26cd "$(dirname "$0")/.." || exit 2
27P=${PHYSICS_DIR:-../physics}
28SHA=$(git rev-parse --short HEAD)
29OUT=${1:-$HOME/workspace/evidence-out}/FB1-CUT4-$SHA
30mkdir -p "$OUT"
31if ! make PHYSICS_DIR="$P" build/gpu_elementwise_test > "$OUT/build.log" 2>&1; then
32 echo "FB1-CUT4 BUILD FAIL (see $OUT/build.log)"; exit 1
33fi
34{
35 uname -a
36 nvidia-smi --query-gpu=name,driver_version --format=csv,noheader 2>/dev/null || echo "nvidia-smi: unavailable"
37 echo "omega $(git rev-parse HEAD) ($(git status --porcelain | wc -l) uncommitted paths)"
38 echo "physics $(git -C "$P" rev-parse HEAD)"
39 echo "binary build/gpu_elementwise_test sha256 $(sha256sum < build/gpu_elementwise_test | cut -c1-64)"
40 date -u +%FT%TZ
41} > "$OUT/device.txt"
42./build/gpu_elementwise_test --out "$OUT/receipt.json" > "$OUT/run.log" 2>&1
43rc=$?
44cp src/omega_gpu_elementwise_api.c src/omega_gpu_elementwise_api.h tests/gpu_elementwise_test.c tests/bw_mufu_ftz.h "$OUT/"
45(cd "$OUT" && sha256sum -- * > SHA256SUMS)
46tail -1 "$OUT/run.log"
47echo "FB1-CUT4 chip gate rc=$rc receipt=$OUT/receipt.json"
48exit $rc