From 5976e5c372ce0eded29b628c6b233fca77762975 Mon Sep 17 00:00:00 2001 From: Birte Kristina Friesel Date: Mon, 15 Jul 2024 07:48:36 +0200 Subject: VA, GEMV: Add roofline benchmarks --- GEMV/dimes-hetsim-hbm-roofline.sh | 36 ++++++++++++++++++++++++++++++++++++ VA/dimes-hetsim-hbm-roofline.sh | 25 +++++++++++++++++++++++++ 2 files changed, 61 insertions(+) create mode 100755 GEMV/dimes-hetsim-hbm-roofline.sh create mode 100755 VA/dimes-hetsim-hbm-roofline.sh diff --git a/GEMV/dimes-hetsim-hbm-roofline.sh b/GEMV/dimes-hetsim-hbm-roofline.sh new file mode 100755 index 0000000..74e4051 --- /dev/null +++ b/GEMV/dimes-hetsim-hbm-roofline.sh @@ -0,0 +1,36 @@ +#!/bin/bash + +cd baselines/cpu +make -B NUMA=1 + +mkdir -p log/$(hostname) +fn=log/$(hostname)/$(date +%Y%m%d)-roofline + +# 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 + +( + +for i in $(seq 0 7); do + echo "single-node execution ($i/8)" >&2 + parallel -j1 --eta --joblog ${fn}.${i}.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 +done + +) > ${fn}.txt + +xz -f -v -9 -M 800M ${fn}.txt diff --git a/VA/dimes-hetsim-hbm-roofline.sh b/VA/dimes-hetsim-hbm-roofline.sh new file mode 100755 index 0000000..f987f5a --- /dev/null +++ b/VA/dimes-hetsim-hbm-roofline.sh @@ -0,0 +1,25 @@ +#!/bin/sh + +cd baselines/cpu +make -B NUMA=1 + +mkdir -p log/$(hostname) +fn=log/$(hostname)/$(date +%Y%m%d)-roofline + +# upstream uses 167772160 * 2 * int32 == 2.5 GiB input and 1.25 GiB output for DPU version + +( + +for i in $(seq 0 7); do + echo "single-node execution ($i/8)" >&2 + parallel -j1 --eta --joblog ${fn}.${i}.joblog --header : \ + ./va -i {input_size} -a {ram} -b {ram} -c {cpu} -t {nr_threads} -w 0 -e 5 \ + ::: nr_threads $(seq 1 16) \ + ::: cpu $i \ + ::: ram $i $((i+8)) \ + ::: input_size 167772160 +done + +) > ${fn}.txt + +xz -f -v -9 -M 800M ${fn}.txt -- cgit v1.2.3