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 / regalloc_om / checkers.sh
| 1 | #!/bin/sh |
| 2 | # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
| 3 | # Invoke this entire runner under the device-free bwrap contract. |
| 4 | set -eu |
| 5 | cd "$(dirname "$0")/../.." |
| 6 | OUT=build/checkers-om |
| 7 | mkdir -p "$OUT" |
| 8 | rm -f "$OUT"/oracle-*.gcda "$OUT"/successor-*.gcda |
| 9 | CC=${CC:-cc} |
| 10 | FLAGS='-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" |
| 15 | cmp "$OUT/oracle.out" "$OUT/successor.out" |
| 16 | "$OUT/successor" --red > "$OUT/red.out" |
| 17 | if cmp -s "$OUT/oracle.out" "$OUT/red.out"; then echo 'FAIL checker red control'; exit 1; fi |
| 18 | ln -sfn ../../src "$OUT/src" |
| 19 | ln -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" |
| 23 | grep -qx 'log-overflow -1' "$OUT/log-overflow.out" |
| 24 | echo 'PASS checker differential, ordered failure state and red control' |