CUDApp
CUDA++: AIEN’s GPU machine-code toolchain, runtime and driver client for NVIDIA GPUs without the CUDA toolkit. Hardware coverage and driver replacement limits are explicit.
Brought by drakestapleton
CUDApp / evidence / GEMM-GENERAL-AB-20261027 / hold.sh
| 1 | #!/bin/bash |
| 2 | # GemmGeneral chip hold for the served-shape A/B (AB-PLAN.md): flock, 18091 /health and compute apps before and after, |
| 3 | # BOARD GPU-START/GPU-END, 14-minute cap. No new hold while the last anchored Main WINDOW-* line on BOARD is WINDOW-START, |
| 4 | # and none while 18091 is not "status":"ok". Bounded: 3 h of waiting, then NOT_RUN on BOARD. |
| 5 | # Pattern copied from handoffs/GemmTune/hold.sh. |
| 6 | # usage: hold.sh <label> <logdir> <command...> |
| 7 | set -u |
| 8 | label=$1; logdir=$2; shift 2 |
| 9 | mkdir -p "$logdir" |
| 10 | B=/home/drakestapleton/handoffs/BOARD.md |
| 11 | window_open() { grep -E '^[0-9TZ:.-]+ Main: WINDOW-(START|END|ABORTED)' $B | tail -1 | grep -q 'WINDOW-START'; } |
| 12 | live_ok() { curl -s -m 5 127.0.0.1:18091/health | grep -q '"status":"ok"'; } |
| 13 | exec 9>/tmp/aien-gb10.lock |
| 14 | deadline=$(( $(date +%s) + 10800 )) |
| 15 | while :; do |
| 16 | if [ "$(date +%s)" -ge "$deadline" ]; then |
| 17 | echo "$(date -u +%FT%TZ) GemmGeneral: NOT_RUN $label (window open or 18091 not ok for 3 h)" >> $B; exit 75 |
| 18 | fi |
| 19 | if window_open || ! live_ok; then sleep 30; continue; fi |
| 20 | if ! flock -w 900 9; then continue; fi |
| 21 | if window_open || ! live_ok; then flock -u 9; sleep 30; continue; fi |
| 22 | break |
| 23 | done |
| 24 | { |
| 25 | echo "# $label start $(date -u +%FT%TZ) load $(cat /proc/loadavg)" |
| 26 | echo "# health before: $(curl -s -m 5 127.0.0.1:18091/health)" |
| 27 | echo "# compute apps before: $(nvidia-smi --query-compute-apps=pid,process_name --format=csv,noheader | tr '\n' ';')" |
| 28 | } > "$logdir/hold.log" |
| 29 | echo "$(date -u +%FT%TZ) GemmGeneral: GPU-START $label (flock /tmp/aien-gb10.lock, <=14 min, beside live 35B; log $logdir)" >> $B |
| 30 | timeout 840 "$@" > "$logdir/run.log" 2>&1 |
| 31 | rc=$? |
| 32 | { |
| 33 | echo "# exit $rc end $(date -u +%FT%TZ)" |
| 34 | echo "# health after: $(curl -s -m 5 127.0.0.1:18091/health)" |
| 35 | echo "# compute apps after: $(nvidia-smi --query-compute-apps=pid,process_name --format=csv,noheader | tr '\n' ';')" |
| 36 | } >> "$logdir/hold.log" |
| 37 | apps=$(nvidia-smi --query-compute-apps=pid --format=csv,noheader | tr -d ' ' | sort -u | tr '\n' ' ') |
| 38 | echo "$(date -u +%FT%TZ) GemmGeneral: GPU-END $label exit $rc; compute apps after: ${apps}; 18091 $(curl -s -m 5 127.0.0.1:18091/health | grep -o '"status":"[a-z]*"')" >> $B |
| 39 | exit $rc |