From 5a3652ed60704d2b45eb652639f9d712ea32e104 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Fri, 2 Jun 2023 15:28:11 +0200 Subject: GEMV: update dfatool port; add benchmark scripts --- GEMV/baselines/cpu/gemv_openmp.c | 10 +++------- GEMV/baselines/cpu/run-opti.sh | 11 +++++++++++ GEMV/baselines/cpu/run.sh | 10 ++++++++-- 3 files changed, 22 insertions(+), 9 deletions(-) create mode 100755 GEMV/baselines/cpu/run-opti.sh (limited to 'GEMV/baselines/cpu') diff --git a/GEMV/baselines/cpu/gemv_openmp.c b/GEMV/baselines/cpu/gemv_openmp.c index 69c3ae1..df70be3 100644 --- a/GEMV/baselines/cpu/gemv_openmp.c +++ b/GEMV/baselines/cpu/gemv_openmp.c @@ -41,16 +41,12 @@ int main(int argc, char *argv[]) start(&timer, 0, 0); gemv(A, x, rows, cols, &b); stop(&timer, 0); - printf("[::] n_threads=%d e_type=%s n_elements=%d " - "| throughput_cpu_omp_MBps=%f\n", + printf("[::] GEMV CPU | n_threads=%d e_type=%s n_elements=%d " + "| throughput_MBps=%f", nr_threads, "double", rows * cols, rows * cols * sizeof(double) / timer.time[0]); - printf("[::] n_threads=%d e_type=%s n_elements=%d " - "| throughput_cpu_omp_MOpps=%f\n", - nr_threads, "double", rows * cols, + printf(" throughput_MOpps=%f", rows * cols / timer.time[0]); - printf("[::] n_threads=%d e_type=%s n_elements=%d |", - nr_threads, "double", rows * cols); printall(&timer, 0); } diff --git a/GEMV/baselines/cpu/run-opti.sh b/GEMV/baselines/cpu/run-opti.sh new file mode 100755 index 0000000..0a3a4a3 --- /dev/null +++ b/GEMV/baselines/cpu/run-opti.sh @@ -0,0 +1,11 @@ +#!/bin/sh + +HOST="$(hostname)" + +echo $HOST + +make clean + +make run_O0 | sed 's/CPU/CPU O0/' | tee "${HOST}-O0.txt" + +make run_O2 | sed 's/CPU/CPU O2/' | tee "${HOST}-O2.txt" diff --git a/GEMV/baselines/cpu/run.sh b/GEMV/baselines/cpu/run.sh index 8f936a3..14c03af 100755 --- a/GEMV/baselines/cpu/run.sh +++ b/GEMV/baselines/cpu/run.sh @@ -2,12 +2,18 @@ set -e +HOST="$(hostname)" + +echo $HOST + +( echo "prim-benchmarks GEMV CPU (dfatool edition)" echo "Started at $(date)" echo "Revision $(git describe --always)" -make +make -B verbose=1 -for nr_threads in 1 2 4 6 8 12 16 20 24 32; do +for nr_threads in 88 64 44 1 2 4 6 8 12 16 20 24 32; do OMP_NUM_THREADS=${nr_threads} timeout --foreground -k 1m 30m ./gemv || true done +) | tee "${HOST}-explore.txt" -- cgit v1.2.3