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 / evidence / NVML-365-2026-11-07 / commands.sh
| 1 | #!/bin/sh |
| 2 | # Scratch runner (not shipped): fresh-clone verification of CUDApp#365 at $1 with |
| 3 | # omega-bridge bc11b30 (OMEGA_BRIDGE) and omega-bridge#83 at $2 (OMEGA_CABI_BRIDGE). |
| 4 | set -u |
| 5 | H=$1 |
| 6 | B83=$2 |
| 7 | R=/tmp/bab/fc |
| 8 | E=$R/ev-cudapp |
| 9 | rm -rf $R/cudapp $R/b30 $R/b83 $R/b83-wrongtoc $E |
| 10 | mkdir -p $E |
| 11 | export OMEGA_SEED=$HOME/work/finish/nvml365-bridge/build/bootstrap/omc |
| 12 | OMC=$HOME/work/finish/nvml365-tools/omc |
| 13 | git clone -q ~/work/finish/CUDApp-365 $R/cudapp && git -C $R/cudapp checkout -q "$H" || exit 9 |
| 14 | git clone -q ~/work/finish/nvml365-bridge $R/b30 && git -C $R/b30 checkout -q bc11b30b1faa9af8b875ae6fec24e5f49cf03ac4 || exit 9 |
| 15 | git clone -q ~/work/bridgeabi $R/b83 && git -C $R/b83 checkout -q "$B83" || exit 9 |
| 16 | (cd $R/b30 && OMEGA_SEEDED_OMC=$OMC sh tools/build.sh) > $E/build-b30.log 2>&1; echo "rc=$?" >> $E/build-b30.log |
| 17 | (cd $R/b83 && OMEGA_SEEDED_OMC=$OMC sh tools/build.sh) > $E/build-b83.log 2>&1; echo "rc=$?" >> $E/build-b83.log |
| 18 | cd $R/cudapp |
| 19 | { |
| 20 | echo "CUDApp clone: $(git rev-parse HEAD)" |
| 21 | echo "OMEGA_BRIDGE clone: $(git -C $R/b30 rev-parse HEAD)" |
| 22 | echo " src/toc.om sha256: $(sha256sum < $R/b30/src/toc.om | cut -c1-64) (om/units.sh $(grep '^CONVERTER_PIN=' om/units.sh))" |
| 23 | echo " tools/bridge-seeded sha256: $(sha256sum < $R/b30/tools/bridge-seeded | cut -c1-64) (om/units.sh $(grep '^FRONTEND_PIN=' om/units.sh))" |
| 24 | echo "OMEGA_CABI_BRIDGE clone: $(git -C $R/b83 rev-parse HEAD)" |
| 25 | echo " src/toc.om sha256: $(sha256sum < $R/b83/src/toc.om | cut -c1-64) (lock $(grep '^CABI_CONVERTER_PIN=' om/omega-bridge-cabi.lock))" |
| 26 | echo " tools/bridge-seeded sha256: $(sha256sum < $R/b83/tools/bridge-seeded | cut -c1-64) (lock $(grep '^CABI_FRONTEND_PIN=' om/omega-bridge-cabi.lock))" |
| 27 | echo "OMEGA_OMC sha256: $(sha256sum < $OMC | cut -c1-64)" |
| 28 | echo "OMEGA_SEED (bridge bootstrap) sha256: $(sha256sum < $OMEGA_SEED | cut -c1-64)" |
| 29 | echo "cc (ORACLE): $(cc --version | sed -n 1p)" |
| 30 | echo "nm (ORACLE): $(nm --version | sed -n 1p)" |
| 31 | echo "readelf (ORACLE): $(readelf --version | sed -n 1p)" |
| 32 | echo "make: $(make --version | sed -n 1p)" |
| 33 | echo "CUDA nvml.h (ORACLE header): $(sha256sum < /usr/local/cuda/include/nvml.h | cut -c1-64)" |
| 34 | } > $E/env.txt |
| 35 | run() { name=$1; shift; "$@" > $E/$name.log 2>&1; echo "rc=$?" >> $E/$name.log; echo "$name $(tail -1 $E/$name.log)"; } |
| 36 | MK="make test-nvml CUDAPP_OMC_HOST=1 OMEGA_OMC=$OMC OMEGA_BRIDGE=$R/b30" |
| 37 | run test-nvml $MK OMEGA_CABI_BRIDGE=$R/b83 |
| 38 | run test-nvml-unconfigured make test-nvml CUDAPP_OMC_HOST=1 OMEGA_OMC=$OMC OMEGA_BRIDGE=$R/b30 |
| 39 | run gate-no-cabi-env env -u OMEGA_CABI_BRIDGE OMEGA_OMC=$OMC OMEGA_BRIDGE=$R/b30 build/nvml_gate |
| 40 | # The 53 portable units regenerate byte for byte with bc11b30 (unchanged since 1fae7beb). |
| 41 | run units-check-b30 env OMEGA_OMC=$OMC OMEGA_BRIDGE=$R/b30 sh om/units.sh --check |
| 42 | grep -c '^generating portable unit' $E/units-check-b30.log > $E/units-count.txt |
| 43 | git diff --stat 1fae7beb HEAD -- src om/units.sh om/omega-bridge.lock > $E/units-diff-since-1fae7beb.txt; echo "rc=$? (empty stat = no unit, pin or generated file changed)" >> $E/units-diff-since-1fae7beb.txt |
| 44 | # The #83 bridge cannot regenerate the other units: om/units.sh refuses it. |
| 45 | run units-check-b83-refused env OMEGA_OMC=$OMC OMEGA_BRIDGE=$R/b83 sh om/units.sh --check |
| 46 | # Wrong CABI converter: one note line appended to a copy's src/toc.om. |
| 47 | cp -a $R/b83 $R/b83-wrongtoc && printf 'note wrong-toc negative control\n' >> $R/b83-wrongtoc/src/toc.om |
| 48 | run neg-wrong-toc env OMEGA_OMC=$OMC OMEGA_BRIDGE=$R/b30 OMEGA_CABI_BRIDGE=$R/b83-wrongtoc build/nvml_gate |
| 49 | G="env OMEGA_OMC=$OMC OMEGA_BRIDGE=$R/b30 OMEGA_CABI_BRIDGE=$R/b83 build/nvml_gate" |
| 50 | # Lock with one hex digit changed in CABI_CONVERTER_PIN. |
| 51 | sed -i 's/^CABI_CONVERTER_PIN=2/CABI_CONVERTER_PIN=3/' om/omega-bridge-cabi.lock && git diff --stat -- om/omega-bridge-cabi.lock > $E/neg-lock-pin.diffstat |
| 52 | run neg-lock-pin $G |
| 53 | git checkout -q -- om/omega-bridge-cabi.lock |
| 54 | # Lock without its CABI_FRONTEND_PIN row. |
| 55 | sed -i '/^CABI_FRONTEND_PIN=/d' om/omega-bridge-cabi.lock && git diff --stat -- om/omega-bridge-cabi.lock > $E/neg-lock-row.diffstat |
| 56 | run neg-lock-row $G |
| 57 | git checkout -q -- om/omega-bridge-cabi.lock |
| 58 | # Lock with a second CABI_CONVERTER_PIN row (all zeros) after the pinned one. |
| 59 | printf 'CABI_CONVERTER_PIN=%064d\n' 0 >> om/omega-bridge-cabi.lock && git diff -- om/omega-bridge-cabi.lock > $E/neg-lock-dup.diff |
| 60 | run neg-lock-dup $G |
| 61 | git checkout -q -- om/omega-bridge-cabi.lock |
| 62 | # Committed generated library with one byte changed. |
| 63 | sed -i '0,/nvmlReturn_t/s//nvmlReturn_t /' compat/nvml/libnvidia-ml.c && git diff --stat -- compat/nvml/libnvidia-ml.c > $E/neg-stale-lib.diffstat |
| 64 | run neg-stale-lib $G |
| 65 | git checkout -q -- compat/nvml/libnvidia-ml.c |
| 66 | # Committed export map with one export dropped. |
| 67 | sed -i '/nvmlShutdown;/d' compat/nvml/libnvidia-ml.map && git diff --stat -- compat/nvml/libnvidia-ml.map > $E/neg-stale-map.diffstat |
| 68 | run neg-stale-map $G |
| 69 | git checkout -q -- compat/nvml/libnvidia-ml.map |
| 70 | git status --short > $E/clone-status-after.txt |
| 71 | echo done |