Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/aien-train/blob/main/tests/omegalora/run.sh # aien-train AIEN training programme: language-model history, GB10 constraints and the route to training on the project engine. Plans and runnable checks are distinguished. Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `main` Branches Tags History `aien-train / tests / omegalora / run.sh` 41 lines ยท 1955 bytes Raw Blame History 1 #!/bin/sh 2 # SPDX-License-Identifier: AGPL-3.0-only 3 # omegalora host glue (POSIX sh): compile native/omegalora/lora.om with the pinned seeded omc, 4 # run the real build and the three mutants, and record every status. All math, training and 5 # verdicts are in the .om unit; this script only compiles, runs and compares exit codes. 6 # Usage: sh tests/omegalora/run.sh Env: OMC (pinned omc), OUT (default evidence/OMEGALORA/run). 7 # Host CPU only (AArch64 Linux, the omc target). No GPU, network or service is touched. 8 set -u 9 ROOT=$(cd "$(dirname "$0")/../.." && pwd) 10 OUT=${OUT:-$ROOT/evidence/OMEGALORA/run} 11 OMC=${OMC:-$ROOT/../omega-mv/seed/out/omc} 12 OMC_SHA=`2c82480596bbdc50cda9626866209ef662d5834f278f839ff4ce0250c495029f` 13 BUILD=$(mktemp -d "${TMPDIR:-/tmp}/omegalora.XXXXXX") 14 mkdir -p "$OUT" 15 SUM="$OUT/summary.txt" 16 : > "$SUM" 17 note() { echo "$*" | tee -a "$SUM"; } 18 fail() { note "OMEGALORA_FAIL $*"; exit 1; } 19 note "source_commit=$(git -C "$ROOT" rev-parse HEAD)" 20 note "host=$(uname -srm)" 21 set -- $(sha256sum "$OMC") 22 [ "$1" = "$OMC_SHA" ] || fail "compiler hash $1" 23 note "compiler_sha256=$1" 24 "$OMC" < "$ROOT/native/omegalora/lora.om" > "$BUILD/lora" 2> "$OUT/compile.stderr" || fail compile 25 chmod +x "$BUILD/lora" 26 set -- $(sha256sum "$ROOT/native/omegalora/lora.om"); note "source_sha256=$1" 27 set -- $(sha256sum "$BUILD/lora"); note "binary_sha256=$1" 28 # case MUTANT EXPECTED_EXIT: 0 real build, 1 silu grad, 2 rmsnorm grad, 3 adam sign 29 bad=0 30 for c in 0:0 1:10 2:10 3:11; do 31 mu=${c%%:*}; want=${c##*:} 32 printf '%s' "$mu" | "$BUILD/lora" > "$OUT/mutant$mu.stdout" 2> "$OUT/mutant$mu.stderr" 33 rc=$? 34 echo "$rc" > "$OUT/mutant$mu.rc" 35 if [ "$rc" = "$want" ]; then note "mutant$mu exit=$rc expected=$want PASS" 36 else note "mutant$mu exit=$rc expected=$want FAIL"; bad=1; fi 37 done 38 (cd "$OUT" && sha256sum mutant*.rc mutant*.stdout mutant*.stderr compile.stderr) > "$OUT/raw.sha256" 39 rm -rf "$BUILD" 40 [ $bad = 0 ] || fail "exit code mismatch" 41 note OMEGALORA_PASS