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/openaccel-lab/blob/main/runners/cuda/run_all.sh # openaccel-lab aien-dev/openaccel-lab 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 `openaccel-lab / runners / cuda / run_all.sh` 25 lines ยท 1636 bytes Raw Blame History 1 #!/bin/sh 2 # SPDX-License-Identifier: Apache-2.0 3 # runners/cuda/run_all.sh OUT.jsonl [oal-matrix options...] 4 # Run the CUDA entrant of every workload and control on the GPU of this machine and write 5 # oal-result/1 lines to OUT.jsonl. Needs nvcc, nvidia-smi and one NVIDIA GPU; the lab never runs 6 # this on CI. The records carry the GPU name, compute capability and driver in machine.runner and 7 # the label below, so the board can tell them from CPU rows. 8 # Exit: oal-matrix's status (0 when every line was written), 2 on a usage error, 4 without a GPU. 9 # INTERIM host glue (POSIX sh). Successor: an Omega runner script once omega-mv has one. 10 set -eu 11 [ $# -ge 1 ] || { echo "usage: run_all.sh OUT.jsonl [oal-matrix options]" >&2; exit 2; } 12 out=$1; shift 13 here=$(cd "$(dirname "$0")/../.." && pwd) 14 q=$(nvidia-smi --query-gpu=name,compute_cap,driver_version --format=csv,noheader 2>/dev/null | sed -n 1p) || true 15 [ -n "$q" ] || { echo "run_all.sh: no NVIDIA GPU visible" >&2; exit 4; } 16 name=$(echo "$q" | cut -d, -f1 | sed 's/^ *//;s/ *$//') 17 cc=$(echo "$q" | cut -d, -f2 | tr -d ' .') 18 drv=$(echo "$q" | cut -d, -f3 | tr -d ' ') 19 export OAL_CUDA_RUN=1 20 export OAL_CUDA_ARCH="${OAL_CUDA_ARCH:-sm_$cc}" 21 export OAL_RUNNER_LABEL="${OAL_RUNNER_LABEL:-$name sm_$cc driver $drv}" 22 export OAL_TIMING_LABEL="${OAL_TIMING_LABEL:-GPU: launch + cudaDeviceSynchronize, host steady_clock, per repeat}" 23 export OAL_EVIDENCE="${OAL_EVIDENCE:-QUALIFIED-on-$name candidate: GPU run, driver $drv, $(date -u +%Y-%m-%dT%H:%MZ)}" 24 echo "run_all.sh: $OAL_RUNNER_LABEL arch $OAL_CUDA_ARCH" >&2 25 exec python3 "$here/bin/oal-matrix" --backends cuda --controls "$@" > "$out"