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 / evidence / q36-batch-20261021 / time-run.sh

23 lines · 1983 bytes Raw Blame History
1#!/bin/bash
2# L354 timing run, inside ONE spark-window (chip + quiet locks): for each mode (v2 = strokes in the batch, v1 =
3# AIEN_Q36_STROKE_V2=0, inturn = AIEN_Q36_STROKE=0) load the batch door (32 slots) on 18089 under q36-extra, time-batch.sh, stop it. The servers start
4# inside the window, so they carry AIEN_GB10_LOCK_HELD=1 and do not queue behind it. q36-extra waits at most
5# Q36_EXTRA_WAIT=300 s for the extra-35B slot (its holder may be waiting for the chip we hold), else the mode is skipped.
6# time-run.sh <sha8> (opens and closes the window itself; log time-run.log)
7set -u
8D=$(cd "$(dirname "$0")" && pwd); cd "$D"; S=$HOME/.local/state/aien-q36; SHA=${1:?sha8}; export PORT=18089
9log() { echo "$(date -u +%FT%TZ) $*" >> time-run.log; }
10if [ -z "${SPARK_WINDOW:-}" ]; then
11 log "waiting for a window"; spark-window open q36-batch --ledger L354 --lease 75 --wait >> time-run.log 2>&1 || { log "no window"; exit 3; }
12 spark-window run "$D/time-run.sh" "$SHA"; rc=$?; spark-window close >> time-run.log 2>&1; log "window closed (rc $rc)"; exit $rc
13fi
14up() { for i in $(seq 1 1000); do curl -s -m 5 http://127.0.0.1:$PORT/v1/models | grep -q '"id"' && return 0; kill -0 $(cat $S/batch-$PORT.pid) 2>/dev/null || return 1; sleep 5; done; return 1; }
15down() { local p=$(cat $S/batch-$PORT.pid); ps -o args= -p $p | grep -q "port $PORT" && kill $p; for i in $(seq 1 30); do ps -p $p >/dev/null || break; sleep 2; done; log "stopped $p"; }
16log "window $SPARK_WINDOW"
17for mode in ${MODES:-v2 v1 inturn}; do
18 st=1; v2=1; [ $mode = inturn ] && st=0; [ $mode = v1 ] && v2=0
19 log "$mode: load ($SHA, 32 slots)"; Q36_EXTRA_WAIT=300 AIEN_Q36_STROKE=$st AIEN_Q36_STROKE_V2=$v2 ./serve-batch.sh $SHA 32 2048 time-$mode >> time-run.log 2>&1
20 up || { log "$mode: server did not come up: $(tail -1 $S/batch-$PORT.log | cut -c1-200)"; down; continue; }
21 log "$mode: up"; ./time-batch.sh $PORT time-$mode-$SHA >> time-run.log 2>&1; log "$mode: timing rc $?"; down
22done
23log done