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 / latmeas / selftest.sh
| 1 | #!/bin/sh |
| 2 | # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
| 3 | # Host self-test: encode, disassemble, oracle, NAK diff, template dry run. |
| 4 | # No device is opened. Synthetic template output stays in a temp file. |
| 5 | set -eu |
| 6 | bin=${1:?binary} |
| 7 | root=$(CDPATH= cd -- "$(dirname -- "$0")/../.." && pwd) |
| 8 | cd "$root" |
| 9 | "$bin" --self-test |
| 10 | "$bin" --print-plan >/dev/null |
| 11 | python3 tools/latmeas/diff_nak.py --check >/dev/null |
| 12 | python3 tools/latmeas/fill_template.py --self-test |
| 13 | dir=$(mktemp -d) |
| 14 | trap 'rm -rf "$dir"' EXIT |
| 15 | "$bin" --emit "$dir/kernels" >/dev/null |
| 16 | test -f "$dir/kernels/manifest.txt" |
| 17 | test -f "$dir/kernels/alu_alu_4.bin" |
| 18 | if grep -q '90 s' tools/latmeas/run_spark.sh; then |
| 19 | echo "FAIL: run_spark.sh still quotes a 90 s bound" >&2 |
| 20 | exit 1 |
| 21 | fi |
| 22 | sh tools/latmeas/run_spark.sh --receipt-self-test |
| 23 | echo "latmeas host self-test PASS" |