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 / omega / test-arch-guard.sh
| 1 | #!/bin/sh |
| 2 | # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
| 3 | # Run the production architecture refusal. On AArch64 this row is NOT_RUN: |
| 4 | # the binary is not executed, so a device is not opened. A cross compile is |
| 5 | # not a runtime result. |
| 6 | set -eu |
| 7 | host=${TARGET_ARCH:-$(uname -m)} |
| 8 | case "$host" in |
| 9 | aarch64|arm64) |
| 10 | echo "x86-64 production refusal: NOT_RUN (this host is $host; the check runs on x86-64 Linux and does not open a device)" |
| 11 | exit 0 |
| 12 | ;; |
| 13 | esac |
| 14 | bin=${1:?architecture-guard binary} |
| 15 | if [ "${CROSS_COMPILE_ONLY:-0}" = 1 ]; then |
| 16 | echo "x86-64 production refusal: NOT_RUN (cross compile only, binary $bin)" |
| 17 | exit 0 |
| 18 | fi |
| 19 | [ -x "$bin" ] || { |
| 20 | echo "x86-64 production refusal: binary is missing or not executable: $bin" >&2 |
| 21 | exit 1 |
| 22 | } |
| 23 | "$bin" |