-
Notifications
You must be signed in to change notification settings - Fork 143
/
test_cub.sh
executable file
·85 lines (71 loc) · 1.49 KB
/
test_cub.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
#!/bin/bash
set -euo pipefail
NO_LID=false
LID0=false
LID1=false
LID2=false
LIMITED=false
ci_dir=$(dirname "$0")
new_args=$("${ci_dir}/util/extract_switches.sh" -no-lid -lid0 -lid1 -lid2 -limited -- "$@")
eval set -- ${new_args}
while true; do
case "$1" in
-no-lid)
NO_LID=true
shift
;;
-lid0)
LID0=true
shift
;;
-lid1)
LID1=true
shift
;;
-lid2)
LID2=true
shift
;;
-limited)
LIMITED=true
shift
;;
--)
shift
break
;;
*)
echo "Unknown argument: $1"
exit 1
;;
esac
done
if $LIMITED; then
export CCCL_SEED_COUNT_OVERRIDE=1
readonly device_mem_GiB=8
export CCCL_DEVICE_MEMORY_LIMIT=$((${device_mem_GiB} * 1024 * 1024 * 1024))
export CCCL_DEBUG_CHECKED_ALLOC_FAILURES=1
echo "Configuring limited environment:"
echo " CCCL_SEED_COUNT_OVERRIDE=${CCCL_SEED_COUNT_OVERRIDE}"
echo " CCCL_DEVICE_MEMORY_LIMIT=${CCCL_DEVICE_MEMORY_LIMIT} (${device_mem_GiB} GiB)"
echo " CCCL_DEBUG_CHECKED_ALLOC_FAILURES=${CCCL_DEBUG_CHECKED_ALLOC_FAILURES}"
echo
fi
source "${ci_dir}/build_common.sh"
print_environment_details
./build_cub.sh "$@"
if $NO_LID; then
PRESETS=("cub-nolid-cpp$CXX_STANDARD")
elif $LID0; then
PRESETS=("cub-lid0-cpp$CXX_STANDARD")
elif $LID1; then
PRESETS=("cub-lid1-cpp$CXX_STANDARD")
elif $LID2; then
PRESETS=("cub-lid2-cpp$CXX_STANDARD")
else
PRESETS=("cub-cpp$CXX_STANDARD")
fi
for PRESET in ${PRESETS[@]}; do
test_preset "CUB (${PRESET})" ${PRESET}
done
print_time_summary