Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/CUDApp/blob/main/om/core/native.sh # 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 Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `main` Branches Tags History `CUDApp / om / core / native.sh` 36 lines · 1947 bytes Raw Blame History 1 #!/bin/sh 2 # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 3 # Canonical local-source composition only; native compiler selection belongs to the aggregate build. 4 set -eu 5 ROOT=$(CDPATH= cd -- "$(dirname -- "$0")/../.." && pwd) 6 MODE=${1:-write} 7 case "$MODE" in write|--check) ;; *) echo 'usage: native.sh [--check]' >&2; exit 2;; esac 8 TMP=$(mktemp -d) 9 trap 'rm -rf "$TMP"' EXIT HUP INT TERM 10 compose() { 11 printf 'om2\nnote Generated by om/core/native.sh from canonical local Omega sources.\n' 12 for source in "$@"; do 13 while IFS= read -r line || [ -n "$line" ]; do 14 case "$line" in 15 'fn omsha '*|'fn omcanon '*|'fn omcidcmp '*|'fn omcidhex '*|'fn omparse '*|'fn omcver '*|'fn omcheck '*|'fn omobject '*|'fn omgraph '*|'fn ompay '*|'fn omparam '*|'fn omeffect '*|'fn omeval '*|'fn omvec '*|'fn omvspec '*|'fn omvpay '*|'fn omfmt '*|'fn omnum '*|'fn omclip '*|'fn omhost '*|'fn cubmsg '*|'fn cubadmit '*|'fn ampack '*|'fn cubin_elf '*|'fn ampere_enc_sm86 '*) printf 'export %s\n' "$line" ;; 16 *) printf '%s\n' "$line" ;; 17 esac 18 done < "$ROOT/$source" 19 printf '\n' 20 done 21 } 22 compose om/core/sha256.om om/core/canonical.om om/core/idparse.om \ 23 om/core/object.om om/core/graph.om om/core/payload.om om/core/param.om om/core/effect.om om/core/eval.om \ 24 om/core/vector.om om/core/vecspec.om om/core/vpay.om om/core/fmt.om om/core/fmtnum.om om/core/fmtclip.om om/core/hostmath.om om/core/cubinmsg.om om/core/cubadmit.om om/core/ampack.om \ 25 om/core/omcanon.om om/core/omcidcmp.om om/core/omcidhex.om om/core/omparse.om om/core/omcver.om om/core/omcheck.om > "$TMP/native.om" 26 compose om/cubin/cubin_elf.om > "$TMP/cubin.om" 27 compose om/encoder/ampere_enc_sm86.om > "$TMP/ampere.om" 28 for unit in native cubin ampere; do 29 path="$ROOT/om/core/$unit.om" 30 if [ "$MODE" = --check ]; then 31 cmp "$TMP/$unit.om" "$path" 32 else 33 cp "$TMP/$unit.om" "$path" 34 fi 35 done 36 echo "CORE-UTIL standalone native inputs $MODE PASS"