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 / tools / l136_channel_gates.sh
| 1 | #!/bin/sh |
| 2 | # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
| 3 | # L136 correctness gates on the chip. $1 = existing evidence dir (absolute). |
| 4 | # Takes the GB10 lock itself for the set; do not wrap in another hold of the lock. |
| 5 | # Record the first failed child and stop with its exit status. |
| 6 | set -eu |
| 7 | E=${1:?usage: tools/l136_channel_gates.sh EVIDENCE_DIR} |
| 8 | N=$HOME/workspace/omega-gpu-channels/build |
| 9 | B=$HOME/workspace/omega-gpu-channels-base/build |
| 10 | LOCK=${LOCK:-/tmp/aien-gb10.lock} |
| 11 | cd "$HOME/workspace/omega-gpu-channels" || exit 1 |
| 12 | if [ -e "$LOCK" ]; then exec 9<"$LOCK"; else exec 9>>"$LOCK"; fi |
| 13 | flock -w 900 9 || { echo 'NOT_RUN: GB10 lock busy for 900 s' >&2; exit 2; } |
| 14 | { date -u; git rev-parse HEAD; uname -r; grep MemAvailable /proc/meminfo; cat /proc/loadavg; } > "$E/device.txt" |
| 15 | run() { |
| 16 | name=$1; shift |
| 17 | rc=0 |
| 18 | "$@" > "$E/$name.log" 2>&1 || rc=$? |
| 19 | printf '%s rc=%s %s\n' "$name" "$rc" "$(tail -1 "$E/$name.log")" >> "$E/summary.txt" |
| 20 | return "$rc" |
| 21 | } |
| 22 | unset AIEN_OMEGA_GPU_CHANNELS |
| 23 | # G1: one channel, the new build against the base build (0010f7d3 on physics 6d7cf0d4), same arguments |
| 24 | run g1-base-q38-l4 "$B/gpu_q38_graph_test" --layers 4 --mask 0x8 --reps 3 |
| 25 | run g1-new-q38-l4 "$N/gpu_q38_graph_test" --layers 4 --mask 0x8 --reps 3 |
| 26 | run g1-base-q38-l2 "$B/gpu_q38_graph_test" --reps 3 |
| 27 | run g1-new-q38-l2 "$N/gpu_q38_graph_test" --reps 3 |
| 28 | run g1-base-cmdlist "$B/gpu_cmdlist_test" |
| 29 | run g1-new-cmdlist "$N/gpu_cmdlist_test" |
| 30 | run g1-base-dgraph "$B/gpu_decode_graph_test" |
| 31 | run g1-new-dgraph "$N/gpu_decode_graph_test" |
| 32 | # refusal: no AIEN_OMEGA_GPU_CHANNELS, the pair is refused by name, the serial path decodes |
| 33 | run refusal "$N/gpu_q38_channels_test" --layers 4 --steps 2 --block 0 --refusal |
| 34 | # G2 small: two channels, 4 layers, 16 steps + 16-step blocks |
| 35 | AIEN_OMEGA_GPU_CHANNELS=2 run g2-l4 "$N/gpu_q38_channels_test" --layers 4 --steps 16 --block 16 |
| 36 | # two-channel device: the one-channel tests still pass on queue 0 |
| 37 | AIEN_OMEGA_GPU_CHANNELS=2 run g1-ch2-q38-l4 "$N/gpu_q38_graph_test" --layers 4 --mask 0x8 --reps 3 |
| 38 | echo done >> "$E/summary.txt" |