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 / tools / multitarget / targets-doctor.sh

31 lines · 1470 bytes Raw Blame History
1#!/bin/sh
2# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
3# `make doctor` part 2: the target table from backend/targets.om (seeded Omega), one row per GPU
4# family with its honest status. Only the GB10 (sm_121) is SUPPORTED; every other GPU row is PLANNED
5# with hardware NOT_RUN. Compiles with the pinned omc and opens no device.
6# usage: targets-doctor.sh OMC OUTDIR (OMC may be empty: prints how to get it and exits 0)
7set -u
8LC_ALL=C
9export LC_ALL
10omc_pin=2c82480596bbdc50cda9626866209ef662d5834f278f839ff4ce0250c495029f
11root=$(CDPATH= cd -- "$(dirname -- "$0")/../.." && pwd) || exit 74
12omc=${1:-}; out=${2:?usage: targets-doctor.sh OMC OUTDIR}
13echo
14echo "GPU targets (backend/targets.om):"
15if [ -z "$omc" ] || [ ! -x "$omc" ]; then
16 echo " NOT_RUN: the target table is seeded Omega and needs the pinned omc."
17 echo " Fix: make doctor OMC=/absolute/path/to/omega-mv/seed/out/omc (omega-mv 369dbc96, sha256 $omc_pin)"
18 exit 0
19fi
20d=$(sha256sum < "$omc"); d=${d%% *}
21if [ "$d" != "$omc_pin" ]; then
22 echo " FAIL: $omc has sha256 $d, not the pin $omc_pin."
23 echo " Fix: use seed/out/omc from aien-dev/omega-mv at 369dbc96."
24 exit 1
25fi
26mkdir -p "$out" || exit 74
27if ! "$omc" < "$root/backend/targets.om" > "$out/targets" 2> "$out/targets.compile.err" || [ -s "$out/targets.compile.err" ]; then
28 cat "$out/targets.compile.err"; echo " FAIL: backend/targets.om did not compile"; exit 1
29fi
30chmod 700 "$out/targets" || exit 74
31"$out/targets" doctor