interplane.Get Omega
Read in your language

omega-gpu-driver

aien-dev/omega-gpu-driver

Brought by drakestapleton

branch main Branches Tags History

omega-gpu-driver / tests / run.sh

42 lines · 1915 bytes Raw Blame History
1#!/bin/sh
2# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
3# Run every host gate once, fail closed on a failed gate, retain per-gate logs.
4# This is verification orchestration, not a driver runtime dependency.
5set -eu
6R=$(CDPATH= cd -- "$(dirname "$0")/.." && pwd)
7cd "$R"
8: "${AIENUX:?Set AIENUX to the pinned aienux C referee checkout documented in README.md}"
9: "${OGKM:?Set OGKM to NVIDIA open-gpu-kernel-modules 580.173.02 (verification only)}"
10: "${FW:?Set FW to the pinned read-only gsp_ga10x.bin firmware oracle}"
11OMC=${OMC:-$R/build/omc}
12export OMC
13. "$R/tools/omc.pin"
14a=$(sha256sum "$OMC"); a=${a%% *}
15[ "$a" = "$OMC_SHA256" ] || { echo 'host suite: INVALID compiler pin' >&2; exit 2; }
16# window_sim intentionally checks build/omc as well as OMC. Never silently replace it.
17a=$(sha256sum build/omc); a=${a%% *}
18[ "$a" = "$OMC_SHA256" ] || { echo 'host suite: INVALID build/omc pin' >&2; exit 2; }
19# Separate IRQ-effect compiler: do not replace the historical gate/compiler pin.
20sh tools/getirqomc.sh
21a=$(git -C "$AIENUX" rev-parse HEAD)
22[ "$a" = a108b1144a064aa7b824374a622d627c6ba91fd1 ] || { echo 'host suite: INVALID aienux reference revision' >&2; exit 2; }
23a=$(git -C "$OGKM" rev-parse HEAD)
24[ "$a" = 20e4e6e19cc26ba47b5cbe23130a396be100c427 ] || { echo 'host suite: INVALID NVIDIA reference revision' >&2; exit 2; }
25logs=$R/build/host-tests
26mkdir -p "$logs"
27printf 'gate\trc\n' > "$logs/status.tsv"
28n=0
29for s in tests/*.sh; do
30 [ "$s" != tests/run.sh ] || continue
31 name=${s##*/}
32 if sh "$s" > "$logs/$name.log" 2>&1; then rc=0; else rc=$?; fi
33 printf '%s\t%s\n' "$s" "$rc" >> "$logs/status.tsv"
34 if [ "$rc" -ne 0 ]; then
35 cat "$logs/$name.log"
36 printf 'OMEGA GPU DRIVER HOST TESTS FAIL (%s rc=%s)\n' "$s" "$rc"
37 exit "$rc"
38 fi
39 n=$((n + 1))
40 printf 'host suite: PASS %s\n' "$s"
41done
42printf 'OMEGA GPU DRIVER HOST TESTS PASS (%s gates)\n' "$n"