Files
leleka/scripts/test-kar-expert-cache.sh
T
Pavlo Ratushnyi 92e611bad5
KAR CUDA compile (GPU hidden) / kar-cuda-compile (push) Failing after 4s
KAR CUDA compile (GPU hidden) / kar-cuda-compile (pull_request) Failing after 4s
feat(kar): add bounded compressed expert LRU
2026-10-07 13:38:15 +02:00

15 lines
732 B
Bash
Executable File

#!/usr/bin/env bash
set -euo pipefail
repo_root="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
build_dir="$(mktemp -d "${TMPDIR:-/tmp}/kar-expert-cache.XXXXXX")"
trap 'rm -rf "$build_dir"' EXIT
"${CXX:-c++}" -std=c++17 -Wall -Wextra -Werror -pedantic \
-fsanitize=address,undefined -fno-omit-frame-pointer -I"$repo_root/gpu/kar/include" \
"$repo_root/gpu/kar/src/kar_expert_cache_test.cpp" -o "$build_dir/kar-expert-cache-test"
if [[ "$(uname -s)" == Darwin ]]; then
# Apple's ASan runtime does not implement LeakSanitizer.
ASAN_OPTIONS=detect_leaks=0 UBSAN_OPTIONS=halt_on_error=1 "$build_dir/kar-expert-cache-test"
else
ASAN_OPTIONS=detect_leaks=1 UBSAN_OPTIONS=halt_on_error=1 "$build_dir/kar-expert-cache-test"
fi