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 / tests / dagsim / corpus_gate.sh

25 lines · 1507 bytes Raw Blame History
1#!/bin/sh
2# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
3# Host only. Invoke inside the required bwrap/taskset/nice envelope.
4set -eu
5ROOT=$(CDPATH= cd -- "$(dirname -- "$0")/../.." && pwd)
6cd "$ROOT"
7tmp=build/dagsim-corpus
8mkdir -p "$tmp"
9. tests/tools-om/lib.sh
10tom_pin
11srcs="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.
13srcs="$srcs src/cudapp_om_core_sha.c src/cudapp_om_cm_*.c"
14srcs="$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"
17python3 tests/dagsim/corpus_diff.py "$tmp/ds_c" "$tmp/ds_om" 1200
18rc=0
19python3 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; }
21echo '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"
24tom_flip "$tmp/oracle.out" "$tmp/omega.out"
25echo 'dagsim corpus: PASS (1200 cases, driver and flipped-record red controls)'