summaryrefslogtreecommitdiff
path: root/GEMV
diff options
context:
space:
mode:
authorDaniel Friesel <daniel.friesel@uos.de>2023-06-02 15:28:11 +0200
committerDaniel Friesel <daniel.friesel@uos.de>2023-06-02 15:28:11 +0200
commit5a3652ed60704d2b45eb652639f9d712ea32e104 (patch)
tree4e202f53aec3ecd5663f279fa4250144db140539 /GEMV
parent7e0597a2ddb2d07ff7b72a6fa47245774e04f964 (diff)
GEMV: update dfatool port; add benchmark scripts
Diffstat (limited to 'GEMV')
-rw-r--r--GEMV/baselines/cpu/gemv_openmp.c10
-rwxr-xr-xGEMV/baselines/cpu/run-opti.sh11
-rwxr-xr-xGEMV/baselines/cpu/run.sh10
-rw-r--r--GEMV/host/app.c10
-rwxr-xr-xGEMV/run-paper-strong-full.sh19
-rwxr-xr-xGEMV/run-paper-strong-rank.sh20
-rwxr-xr-xGEMV/run-paper-weak.sh21
7 files changed, 85 insertions, 16 deletions
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"
diff --git a/GEMV/host/app.c b/GEMV/host/app.c
index daf4427..612758d 100644
--- a/GEMV/host/app.c
+++ b/GEMV/host/app.c
@@ -230,20 +230,16 @@ int main(int argc, char **argv) {
if (status) {
printf("[" ANSI_COLOR_GREEN "OK" ANSI_COLOR_RESET "] Outputs are equal\n");
if (rep >= p.n_warmup) {
- printf("[::] n_dpus=%d n_tasklets=%d e_type=%s n_elements=%d "
- "| throughput_cpu_MBps=%f throughput_pim_MBps=%f throughput_MBps=%f\n",
+ printf("[::] GEMV NMC | n_dpus=%d n_tasklets=%d e_type=%s n_elements=%d "
+ "| throughput_cpu_MBps=%f throughput_pim_MBps=%f throughput_MBps=%f",
nr_of_dpus, NR_TASKLETS, XSTR(T), n_size * m_size,
n_size * m_size * sizeof(T) / timer.time[0],
n_size * m_size * sizeof(T) / timer.time[2],
n_size * m_size * sizeof(T) / (timer.time[1] + timer.time[2] + timer.time[3]));
- printf("[::] n_dpus=%d n_tasklets=%d e_type=%s n_elements=%d "
- "| throughput_cpu_MOpps=%f throughput_pim_MOpps=%f throughput_MOpps=%f\n",
- nr_of_dpus, NR_TASKLETS, XSTR(T), n_size * m_size,
+ printf(" throughput_cpu_MOpps=%f throughput_pim_MOpps=%f throughput_MOpps=%f",
n_size * m_size / timer.time[0],
n_size * m_size / timer.time[2],
n_size * m_size / (timer.time[1] + timer.time[2] + timer.time[3]));
- printf("[::] n_dpus=%d n_tasklets=%d e_type=%s n_elements=%d |",
- nr_of_dpus, NR_TASKLETS, XSTR(T), n_size * m_size);
printall(&timer, 3);
}
} else {
diff --git a/GEMV/run-paper-strong-full.sh b/GEMV/run-paper-strong-full.sh
new file mode 100755
index 0000000..735b89a
--- /dev/null
+++ b/GEMV/run-paper-strong-full.sh
@@ -0,0 +1,19 @@
+#!/bin/bash
+
+set -e
+
+(
+
+echo "prim-benchmarks GEMV strong-full (dfatool edition)"
+echo "Started at $(date)"
+echo "Revision $(git describe --always)"
+
+for nr_dpus in 256 512 1024 2048; do
+ for nr_tasklets in 1 2 4 8 16; do
+ echo
+ if make -B NR_DPUS=${nr_dpus} NR_TASKLETS=${nr_tasklets} BL=10 verbose=1; then
+ timeout --foreground -k 1m 30m bin/gemv_host -w 1 -e 100 -m 163840 -n 4096 || true
+ fi
+ done
+done
+) | tee log-paper-strong-full.txt
diff --git a/GEMV/run-paper-strong-rank.sh b/GEMV/run-paper-strong-rank.sh
new file mode 100755
index 0000000..a5451cb
--- /dev/null
+++ b/GEMV/run-paper-strong-rank.sh
@@ -0,0 +1,20 @@
+#!/bin/bash
+
+set -e
+
+(
+
+echo "prim-benchmarks GEMV strong-rank (dfatool edition)"
+echo "Started at $(date)"
+echo "Revision $(git describe --always)"
+
+# 256 and 512 are not part of upstream config space
+for nr_dpus in 512 256 1 4 16 64; do
+ for nr_tasklets in 1 2 4 8 16; do
+ echo
+ if make -B NR_DPUS=${nr_dpus} NR_TASKLETS=${nr_tasklets} BL=10 verbose=1; then
+ timeout --foreground -k 1m 30m bin/gemv_host -w 1 -e 100 -m 8192 -n 1024 || true
+ fi
+ done
+done
+) | tee log-paper-strong-rank.txt
diff --git a/GEMV/run-paper-weak.sh b/GEMV/run-paper-weak.sh
new file mode 100755
index 0000000..0632e71
--- /dev/null
+++ b/GEMV/run-paper-weak.sh
@@ -0,0 +1,21 @@
+#!/bin/bash
+
+set -e
+
+(
+
+echo "prim-benchmarks GEMV weak (dfatool edition)"
+echo "Started at $(date)"
+echo "Revision $(git describe --always)"
+
+# 256 and 512 are not part of upstream config space
+for nr_dpus in 512 256 1 4 16 64; do
+ for nr_tasklets in 1 2 4 8 16; do
+ echo
+ if make -B NR_DPUS=${nr_dpus} NR_TASKLETS=${nr_tasklets} BL=10 verbose=1; then
+ i=$(( nr_dpus * 1024 ))
+ timeout --foreground -k 1m 30m bin/gemv_host -w 1 -e 100 -m $i -n 2048 || true
+ fi
+ done
+done
+) | tee log-paper-weak.txt