-
Notifications
You must be signed in to change notification settings - Fork 1
/
run-benchmarks.sh
executable file
·90 lines (68 loc) · 1.55 KB
/
run-benchmarks.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
86
87
88
89
90
#! /bin/bash
# Run all NUMA benchmarks in their own process
set -eou pipefail -x
# default out dir is current directory
OUT_DIR=`readlink -f .`
# default bench command is scope
BENCH=./scope
while getopts "h?o:b:" opt; do
case "$opt" in
h|\?)
show_help
exit 0
;;
o) OUT_DIR=`readlink -f $OPTARG`
;;
b) BENCH="$OPTARG";
;;
esac
done
shift $((OPTIND-1))
[ "${1:-}" = "--" ] && shift
# echo "Leftovers: $@"
s822lc_gpus=( 0 1 2 3 )
s822lc_numas=( 0 1 )
ac922_gpus=( 0 1 2 3 )
ac922_numas=( 0 8 )
dgx_gpus=( 0 1 2 3 4 5 6 7 )
dgx_numas=( 0 1 )
shared_bmarks=(
noop
)
numa_numa_bmarks=(
NUMA_Memcpy_HostToPinned
NUMA_WR
NUMA_RD
noop
)
numa_gpu_gpu_bmarks=(
NUMA_Memcpy_GPUToGPU
noop
)
gpu_gpu_bmarks=(
CUDA_Memcpy_GPUToGPU
UM_Coherence_GPUToGPU
UM_Prefetch_GPUToGPU
UM_Latency_GPUToGPU
noop
)
numa_gpu_bmarks=(
Comm_NUMAMemcpy_GPUToHost
Comm_NUMAMemcpy_GPUToPinned
Comm_NUMAMemcpy_HostToGPU
Comm_NUMAMemcpy_PinnedToGPU
Comm_UM_Coherence_GPUToHost
Comm_UM_Coherence_HostToGPU
Comm_UM_Prefetch_GPUToHost
Comm_UM_Prefetch_HostToGPU
Comm_UM_Latency_GPUToHost
Comm_UM_Latency_HostToGPU
noop
)
mkdir -p "$OUT_DIR"
for b in "${numa_gpu_bmarks[@]}"; do
if [ "$b" != "noop" ]; then
eval "$BENCH" --numa_ids=0 --cuda_ids=0 --benchmark_filter="$b/.*" --benchmark_out="$OUT_DIR"/`hostname`-$b-numa0-cuda0.json --benchmark_repetitions=5;
eval "$BENCH" --numa_ids=0 --cuda_ids=1 --benchmark_filter="$b/.*" --benchmark_out="$OUT_DIR"/`hostname`-$b-numa0-cuda1.json --benchmark_repetitions=5;
fi
done