interplane.Get Omega
Read in your language

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

branch main Branches Tags History

CUDApp / tests / grid_ab_exit_test.sh

22 lines · 727 bytes Raw Blame History
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.
4set -eu
5binary=${1:?usage: grid_ab_exit_test.sh BINARY}
6tmp=$(mktemp -d)
7trap 'rm -rf "$tmp"' EXIT HUP INT TERM
8for 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
21done
22echo 'grid-ab invalid-list exit checks: PASS'