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 / packers.sh

25 lines · 1594 bytes Raw Blame History
1#!/bin/sh
2# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
3# Run this whole runner under the device-free bwrap contract.
4set -eu
5cd "$(dirname "$0")/../.."
6OUT=build/packers-om
7mkdir -p "$OUT"
8rm -f "$OUT"/oracle-*.gcda
9CC=${CC:-cc}
10FLAGS='-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"
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 fragment differential red control'; exit 1; fi
18ln -sfn ../../src "$OUT/src"
19ln -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
25echo 'PASS five fragment packers and result sentinels bitwise differential, source partition and row0 ASan regression'