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 / tests / grid_ab_exit_test.sh
| 1 | #!/bin/sh |
| 2 | # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
| 3 | # Invalid lists stop before command-list creation. No device is opened. |
| 4 | set -eu |
| 5 | binary=${1:?usage: grid_ab_exit_test.sh BINARY} |
| 6 | tmp=$(mktemp -d) |
| 7 | trap 'rm -rf "$tmp"' EXIT HUP INT TERM |
| 8 | for arms in '' 'bad' '0:0' '0:0,bad' '0:0x,0:0'; do |
| 9 | rc=0 |
| 10 | "$binary" --grid-ab "$arms" >"$tmp/output" 2>&1 || rc=$? |
| 11 | if [ "$rc" -ne 2 ]; then |
| 12 | cat "$tmp/output" |
| 13 | echo "FAIL: invalid grid list '$arms' returned $rc, expected 2" >&2 |
| 14 | exit 1 |
| 15 | fi |
| 16 | if grep -q ': PASS' "$tmp/output"; then |
| 17 | cat "$tmp/output" |
| 18 | echo 'FAIL: rejected grid list printed PASS' >&2 |
| 19 | exit 1 |
| 20 | fi |
| 21 | done |
| 22 | echo 'grid-ab invalid-list exit checks: PASS' |