blob: ad6895eccfb60ab3675104e4f37013045e2aca97 (
plain)
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
|
#!/bin/bash
cd baselines/cpu
make -B NUMA=1
mkdir -p log/$(hostname)
fn=log/$(hostname)/$(date +%Y%m%d)
# upstream DPU version uses -m 163840 -n 4096
# → (163840 * 4096 + 4096) * uint32 ≈ 2.5 GiB
# upstream baseline uses 20480 rows and 8192 cols, allocating 20480 * double + 8192 * double + 20480 * double + 20480 * 8192 * double
# → ≈ 1.25 GiB
run_benchmark() {
local "$@"
OMP_NUM_THREADS=$nr_threads ./gemv $ram $ram $cpu
return $?
}
export -f run_benchmark
(
echo "CPU single-node (1/2)" >&2
parallel -j1 --eta --joblog ${fn}.1.joblog --header : \
run_benchmark nr_threads={nr_threads} ram={ram} cpu={cpu} \
::: cpu $(seq 0 7) \
::: ram $(seq 0 15) \
::: nr_threads 1 2 4 8 12 16
echo "CPU multi-node (2/2)" >&2
parallel -j1 --eta --joblog ${fn}.2.joblog --header : \
run_benchmark nr_threads={nr_threads} ram={ram} cpu={cpu} \
::: cpu -1 \
::: ram $(seq 0 15) \
::: nr_threads 32 48 64 96 128
) > ${fn}.txt
xz -f -v -9 -M 800M ${fn}.txt
|