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 / omega / test-arch-guard.sh

23 lines · 755 bytes Raw Blame History
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.
6set -eu
7host=${TARGET_ARCH:-$(uname -m)}
8case "$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 ;;
13esac
14bin=${1:?architecture-guard binary}
15if [ "${CROSS_COMPILE_ONLY:-0}" = 1 ]; then
16 echo "x86-64 production refusal: NOT_RUN (cross compile only, binary $bin)"
17 exit 0
18fi
19[ -x "$bin" ] || {
20 echo "x86-64 production refusal: binary is missing or not executable: $bin" >&2
21 exit 1
22}
23"$bin"