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 / tests / dagsim / corpus_gate.sh
| 1 | #!/bin/sh |
| 2 | # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
| 3 | # Host only. Invoke inside the required bwrap/taskset/nice envelope. |
| 4 | set -eu |
| 5 | ROOT=$(CDPATH= cd -- "$(dirname -- "$0")/../.." && pwd) |
| 6 | cd "$ROOT" |
| 7 | tmp=build/dagsim-corpus |
| 8 | mkdir -p "$tmp" |
| 9 | . tests/tools-om/lib.sh |
| 10 | tom_pin |
| 11 | srcs="tools/dagsim/dagsim_cli.c tools/dagsim/dagsim.c src/runtime/rx_costmodel.c src/sha256.c src/cudapp_om_dag_eval.c src/cudapp_om_dag_parse.c src/cudapp_om_dag_fmt.c src/cudapp_om_dag_res.c src/cudapp_om_dag_diff.c" |
| 12 | # Integrated runtime cost-model and SHA decisions are Omega providers. |
| 13 | srcs="$srcs src/cudapp_om_core_sha.c src/cudapp_om_cm_*.c" |
| 14 | srcs="$srcs src/cudapp_om_dag_jstr.c" |
| 15 | $CC $TOM_CFLAGS -Itools/dagsim -DCUDAPP_MIGRATION_PENDING_C_TOOLS=1 -DCUDAPP_MIGRATION_PENDING_C_DAGSIM_PARSE=1 -DCUDAPP_MIGRATION_PENDING_C_DAGSIM_RESOLVE=1 $srcs -lm -o "$tmp/ds_c" |
| 16 | $CC $TOM_CFLAGS -Itools/dagsim $srcs -lm -o "$tmp/ds_om" |
| 17 | python3 tests/dagsim/corpus_diff.py "$tmp/ds_c" "$tmp/ds_om" 1200 |
| 18 | rc=0 |
| 19 | python3 tests/dagsim/corpus_diff.py "$tmp/ds_c" /bin/true 50 || rc=$? |
| 20 | [ "$rc" = 1 ] || { echo "FAIL corpus driver negative control rc=$rc"; exit 1; } |
| 21 | echo 'corpus driver negative control: caught (rc=1)' |
| 22 | "$tmp/ds_c" eval tests/dagsim/fixtures/valid_disjoint_80.oev --asof 2026-10-20 > "$tmp/oracle.out" |
| 23 | "$tmp/ds_om" eval tests/dagsim/fixtures/valid_disjoint_80.oev --asof 2026-10-20 > "$tmp/omega.out" |
| 24 | tom_flip "$tmp/oracle.out" "$tmp/omega.out" |
| 25 | echo 'dagsim corpus: PASS (1200 cases, driver and flipped-record red controls)' |