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 / regalloc_om / checkers.sh

24 lines · 1394 bytes Raw Blame History
1#!/bin/sh
2# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
3# Invoke this entire runner under the device-free bwrap contract.
4set -eu
5cd "$(dirname "$0")/../.."
6OUT=build/checkers-om
7mkdir -p "$OUT"
8rm -f "$OUT"/oracle-*.gcda "$OUT"/successor-*.gcda
9CC=${CC:-cc}
10FLAGS='-std=gnu11 -O0 --coverage -Wall -Wextra -Werror -ffunction-sections -fdata-sections -Isrc'
11$CC $FLAGS -DCUDAPP_MIGRATION_PENDING_C_EM -DCUDAPP_MIGRATION_PENDING_C_RECONV tests/regalloc_om/checkers.c -Wl,--gc-sections -o "$OUT/oracle"
12$CC $FLAGS tests/regalloc_om/checkers.c src/cudapp_om_cg_em.c src/cudapp_om_cg_reconv.c -Wl,--gc-sections -o "$OUT/successor"
13"$OUT/oracle" > "$OUT/oracle.out"
14"$OUT/successor" > "$OUT/successor.out"
15cmp "$OUT/oracle.out" "$OUT/successor.out"
16"$OUT/successor" --red > "$OUT/red.out"
17if cmp -s "$OUT/oracle.out" "$OUT/red.out"; then echo 'FAIL checker red control'; exit 1; fi
18ln -sfn ../../src "$OUT/src"
19ln -sfn ../../tests "$OUT/tests"
20(cd "$OUT" && gcov -b -c oracle-checkers.gcno > gcov.log)
21$CC $FLAGS -fsanitize=undefined -fno-sanitize-recover=undefined -DCUDAPP_MIGRATION_PENDING_C_EM -DCUDAPP_MIGRATION_PENDING_C_RECONV tests/regalloc_om/checkers.c -Wl,--gc-sections -o "$OUT/log-overflow"
22"$OUT/log-overflow" --log-overflow > "$OUT/log-overflow.out"
23grep -qx 'log-overflow -1' "$OUT/log-overflow.out"
24echo 'PASS checker differential, ordered failure state and red control'