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 / om / c1 / source-check.sh

15 lines · 978 bytes Raw Blame History
1#!/bin/sh
2# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
3set -eu
4lang=${1:-}
5read -r want < om/c1/omega-mv.lock
6[ -n "$lang" ] && [ -d "$lang/.git" -o -f "$lang/.git" ] || { echo "NOT_RUN C1: set OMEGA_C1_SOURCE to omega-mv source pin $want" >&2; exit 3; }
7have=$(git -C "$lang" rev-parse HEAD)
8[ "$have" = "$want" ] || { echo "NOT_RUN C1: source pin $have != $want" >&2; exit 3; }
9git -C "$lang" diff --quiet HEAD -- . || { echo 'NOT_RUN C1: tracked language checkout files differ from pin' >&2; exit 3; }
10compiler=3ad9f10f64309e7acf8a725082b28e23a2a4aeb07e98322fb4dc0fcd8fc93194
11[ -x "$lang/seed/out/omc" ] || { echo "NOT_RUN C1: compiler artifact absent; required sha256 $compiler" >&2; exit 3; }
12have_compiler=$(sha256sum "$lang/seed/out/omc")
13have_compiler=${have_compiler%% *}
14[ "$have_compiler" = "$compiler" ] || { echo "NOT_RUN C1: compiler sha256 $have_compiler != $compiler" >&2; exit 3; }
15echo "C1 SOURCE PASS source=$have compiler_sha256=$have_compiler"