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 / packers.sh
| 1 | #!/bin/sh |
| 2 | # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
| 3 | # Run this whole runner under the device-free bwrap contract. |
| 4 | set -eu |
| 5 | cd "$(dirname "$0")/../.." |
| 6 | OUT=build/packers-om |
| 7 | mkdir -p "$OUT" |
| 8 | rm -f "$OUT"/oracle-*.gcda |
| 9 | CC=${CC:-cc} |
| 10 | FLAGS='-std=gnu11 -O2 -Wall -Wextra -Werror -ffp-contract=off -ffunction-sections -fdata-sections -Isrc' |
| 11 | $CC $FLAGS -O0 --coverage -DCUDAPP_MIGRATION_PENDING_C_PACK tests/regalloc_om/packers.c src/omega_blackwell_codegen.c -Wl,--gc-sections -o "$OUT/oracle" |
| 12 | $CC $FLAGS tests/regalloc_om/packers.c src/omega_blackwell_codegen.c src/cudapp_om_cg_pack_len.c src/cudapp_om_cg_pack_h.c src/cudapp_om_cg_sentin.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 fragment differential red control'; exit 1; fi |
| 18 | ln -sfn ../../src "$OUT/src" |
| 19 | ln -sfn ../../tests "$OUT/tests" |
| 20 | (cd "$OUT" && gcov -b -c oracle-omega_blackwell_codegen.gcno > gcov.log) |
| 21 | $CC $FLAGS tests/regalloc_om/packers_units.c src/cudapp_om_cg_pack_len.c src/cudapp_om_cg_pack_h.c src/cudapp_om_cg_mrow.c -o "$OUT/units" |
| 22 | "$OUT/units" |
| 23 | $CC $FLAGS -O1 -g -fsanitize=address tests/regalloc_om/packers.c src/omega_blackwell_codegen.c src/cudapp_om_cg_pack_len.c src/cudapp_om_cg_pack_h.c src/cudapp_om_cg_sentin.c -Wl,--gc-sections -o "$OUT/row0-asan" |
| 24 | "$OUT/row0-asan" --row0 |
| 25 | echo 'PASS five fragment packers and result sentinels bitwise differential, source partition and row0 ASan regression' |