interplane.Get Omega
Read in your language

aien-sovereign-core-mv

AienOS host runtime: inference scheduling, paged KV state, the aien CLI and Spark verification tooling. Its inference engine is in alpha testing (DGX Spark GB10); Omega is the implementation destination.

Brought by drakestapleton

branch main Branches Tags History

aien-sovereign-core-mv / scripts / own8b-chip-run.sh

32 lines · 1733 bytes Raw Blame History
1#!/usr/bin/env bash
2# OWN-8B stage 2: one sealed chip run of own8b_check under the GB10 lock protocol.
3#
4# scripts/own8b-chip-run.sh <evidence-dir> <run-name> <binary> <checkpoint> <golden.json> [own8b_check chip args...]
5#
6# Refuses while the quiet flag is up (quietlock check). Takes /tmp/aien-gb10.lock for the whole
7# run (a serving process waits, it is never killed), records start/end stamps, the binary and
8# golden digests, the exact command, raw output and exit code, then refreshes SHA256SUMS in the
9# evidence dir. A control run (mutant flag) is expected to exit 1 (FAIL).
10set -uo pipefail
11ev=$1; name=$2; bin=$3; ckpt=$4; golden=$5; shift 5
12quietlock check || { echo "quiet flag is up: no chip run"; exit 4; }
13mkdir -p "$ev/$name"
14repo=$(cd "$(dirname "$0")/.." && pwd)
15{
16 echo "start $(date -u +%Y-%m-%dT%H:%M:%SZ)"
17 echo "sc commit $(git -C "$repo" rev-parse HEAD) branch $(git -C "$repo" rev-parse --abbrev-ref HEAD)"
18 echo "binary $bin sha256 $(sha256sum "$bin" | cut -d' ' -f1)"
19 echo "golden $golden sha256 $(sha256sum "$golden" | cut -d' ' -f1)"
20 echo "omega ${AIEN_OMEGA_DIR:-?} at $(git -C "${AIEN_OMEGA_DIR:-/nonexistent}" rev-parse HEAD 2>/dev/null)"
21 echo "cmd flock /tmp/aien-gb10.lock $bin chip $ckpt $golden $ev/$name $*"
22 free -g | head -2
23 uname -r
24} > "$ev/$name.start"
25flock /tmp/aien-gb10.lock "$bin" chip "$ckpt" "$golden" "$ev/$name" "$@" > "$ev/$name.raw" 2> "$ev/$name.err"
26rc=$?
27echo "$rc" > "$ev/$name.rc"
28{ echo "end $(date -u +%Y-%m-%dT%H:%M:%SZ)"; free -g | head -2; } > "$ev/$name.end"
29( cd "$ev" && find . -type f ! -name SHA256SUMS -print0 | sort -z | xargs -0 sha256sum > SHA256SUMS )
30echo "$name rc=$rc"
31grep -E "^(LOAD|PARITY|PREFILL|TOKENS|SPEED|SUMMARY)" "$ev/$name.raw"
32exit "$rc"