interplane.Get Omega
Read in your language

omega-dnn

aien-dev/omega-dnn

Brought by drakestapleton

branch main Branches Tags History

omega-dnn / evidence / STACK7-GPU-20261026 / gpu-bench / gpu_run.sh

15 lines · 993 bytes Raw Blame History
1#!/bin/sh
2# gpu_run.sh LABEL CMD...: BOARD start line, flock around CMD only, BOARD end line, compute-apps check.
3# Output of CMD goes to stdout; summary line to stderr.
4B=/home/drakestapleton/handoffs/BOARD.md
5label=$1; shift
6echo "$(date -u +%FT%TZ) OmegaDnn.GpuDnn: START $label 0 running (lock /tmp/aien-gb10.lock, driver 580.173.02)" >> $B
7t0=$(date +%s)
8flock -w 900 /tmp/aien-gb10.lock /tmp/OmegaDnn/gpu/bench/held.sh "$@" 2>/tmp/OmegaDnn/gpu/.held.$$; rc=$?
9cat /tmp/OmegaDnn/gpu/.held.$$ >&2
10held=$(grep '^LOCK_HELD_S' /tmp/OmegaDnn/gpu/.held.$$ | tail -1 | cut -d' ' -f2); rm -f /tmp/OmegaDnn/gpu/.held.$$
11apps=$(nvidia-smi --query-compute-apps=pid --format=csv,noheader)
12napps=$(printf '%s' "$apps" | grep -c .)
13echo "$(date -u +%FT%TZ) OmegaDnn.GpuDnn: END $label lock_held_s=$held rc=$rc compute_apps_rows=$napps" >> $B
14echo "GPU_RUN $label rc=$rc lock_held_s=$held compute_apps_rows=$napps apps=[$apps] date=$(date -u +%FT%TZ) load=$(cut -d' ' -f1-3 /proc/loadavg)" >&2
15exit $rc