From 680e27d0c99173e0c0daa9e9b41d4b97e2d15967 Mon Sep 17 00:00:00 2001 From: Antonin Portelli Date: Thu, 8 Sep 2022 14:27:12 +0100 Subject: [PATCH] Epsilon constraint on power --- c0-eps.dat => c0-eps-perf.dat | 0 c0-eps-power.dat | 105 ++++++++++++++++++ full-analysis.sh | 6 +- loc32-eps.dat => loc32-eps-perf.dat | 0 loc32-eps-power.dat | 105 ++++++++++++++++++ ...lon-table.sh => make-perf-epsilon-table.sh | 0 make-power-epsilon-table.sh | 18 +++ 7 files changed, 232 insertions(+), 2 deletions(-) rename c0-eps.dat => c0-eps-perf.dat (100%) create mode 100644 c0-eps-power.dat rename loc32-eps.dat => loc32-eps-perf.dat (100%) create mode 100644 loc32-eps-power.dat rename make-epsilon-table.sh => make-perf-epsilon-table.sh (100%) create mode 100755 make-power-epsilon-table.sh diff --git a/c0-eps.dat b/c0-eps-perf.dat similarity index 100% rename from c0-eps.dat rename to c0-eps-perf.dat diff --git a/c0-eps-power.dat b/c0-eps-power.dat new file mode 100644 index 0000000..6eb8620 --- /dev/null +++ b/c0-eps-power.dat @@ -0,0 +1,105 @@ +# Columns +# ------- +# 1 epsilon, i.e. relative reduction of power draw +# 2 performance-optimal GPU clock frequency (MHz) +0 1410 +0.01 1395 +0.02 1380 +0.03 1365 +0.04 1365 +0.05 1365 +0.06 1350 +0.07 1320 +0.08 1305 +0.09 1290 +0.1 1275 +0.11 1245 +0.12 1245 +0.13 1230 +0.14 1200 +0.15 1200 +0.16 1155 +0.17 1125 +0.18 1095 +0.19 1080 +0.2 1050 +0.21 1020 +0.22 1005 +0.23 975 +0.24 915 +0.25 840 +0.26 840 +0.27 780 +0.28 720 +0.29 690 +0.3 630 +0.31 360 +0.32 255 +0.33 NaN +0.34 NaN +0.35 NaN +0.36 NaN +0.37 NaN +0.38 NaN +0.39 NaN +0.4 NaN +0.41 NaN +0.42 NaN +0.43 NaN +0.44 NaN +0.45 NaN +0.46 NaN +0.47 NaN +0.48 NaN +0.49 NaN +0.5 NaN +0.51 NaN +0.52 NaN +0.53 NaN +0.54 NaN +0.55 NaN +0.56 NaN +0.57 NaN +0.58 NaN +0.59 NaN +0.6 NaN +0.61 NaN +0.62 NaN +0.63 NaN +0.64 NaN +0.65 NaN +0.66 NaN +0.67 NaN +0.68 NaN +0.69 NaN +0.7 NaN +0.71 NaN +0.72 NaN +0.73 NaN +0.74 NaN +0.75 NaN +0.76 NaN +0.77 NaN +0.78 NaN +0.79 NaN +0.8 NaN +0.81 NaN +0.82 NaN +0.83 NaN +0.84 NaN +0.85 NaN +0.86 NaN +0.87 NaN +0.88 NaN +0.89 NaN +0.9 NaN +0.91 NaN +0.92 NaN +0.93 NaN +0.94 NaN +0.95 NaN +0.96 NaN +0.97 NaN +0.98 NaN +0.99 NaN +1 NaN diff --git a/full-analysis.sh b/full-analysis.sh index 0c975f1..c73d7e3 100755 --- a/full-analysis.sh +++ b/full-analysis.sh @@ -9,5 +9,7 @@ echo '-- make result tables...' ./make-result-table.sh jobs.db size_loc32 2-racks/rack-power.db run_220822 > loc32.dat echo '-- make eps-constraint tables...' -./make-epsilon-table.sh c0.dat > c0-eps.dat -./make-epsilon-table.sh loc32.dat > loc32-eps.dat +./make-perf-epsilon-table.sh c0.dat > c0-eps-perf.dat +./make-perf-epsilon-table.sh loc32.dat > loc32-eps-perf.dat +./make-power-epsilon-table.sh c0.dat > c0-eps-power.dat +./make-power-epsilon-table.sh loc32.dat > loc32-eps-power.dat diff --git a/loc32-eps.dat b/loc32-eps-perf.dat similarity index 100% rename from loc32-eps.dat rename to loc32-eps-perf.dat diff --git a/loc32-eps-power.dat b/loc32-eps-power.dat new file mode 100644 index 0000000..9b4fe58 --- /dev/null +++ b/loc32-eps-power.dat @@ -0,0 +1,105 @@ +# Columns +# ------- +# 1 epsilon, i.e. relative reduction of power draw +# 2 performance-optimal GPU clock frequency (MHz) +0 1410 +0.01 1395 +0.02 1395 +0.03 1365 +0.04 1365 +0.05 1365 +0.06 1350 +0.07 1350 +0.08 1335 +0.09 1335 +0.1 1320 +0.11 1290 +0.12 1290 +0.13 1275 +0.14 1260 +0.15 1230 +0.16 1230 +0.17 1215 +0.18 1200 +0.19 1170 +0.2 1155 +0.21 1140 +0.22 1110 +0.23 1095 +0.24 1065 +0.25 1050 +0.26 1020 +0.27 975 +0.28 930 +0.29 885 +0.3 855 +0.31 825 +0.32 780 +0.33 720 +0.34 690 +0.35 645 +0.36 465 +0.37 435 +0.38 405 +0.39 375 +0.4 360 +0.41 330 +0.42 315 +0.43 300 +0.44 270 +0.45 255 +0.46 240 +0.47 225 +0.48 210 +0.49 NaN +0.5 NaN +0.51 NaN +0.52 NaN +0.53 NaN +0.54 NaN +0.55 NaN +0.56 NaN +0.57 NaN +0.58 NaN +0.59 NaN +0.6 NaN +0.61 NaN +0.62 NaN +0.63 NaN +0.64 NaN +0.65 NaN +0.66 NaN +0.67 NaN +0.68 NaN +0.69 NaN +0.7 NaN +0.71 NaN +0.72 NaN +0.73 NaN +0.74 NaN +0.75 NaN +0.76 NaN +0.77 NaN +0.78 NaN +0.79 NaN +0.8 NaN +0.81 NaN +0.82 NaN +0.83 NaN +0.84 NaN +0.85 NaN +0.86 NaN +0.87 NaN +0.88 NaN +0.89 NaN +0.9 NaN +0.91 NaN +0.92 NaN +0.93 NaN +0.94 NaN +0.95 NaN +0.96 NaN +0.97 NaN +0.98 NaN +0.99 NaN +1 NaN diff --git a/make-epsilon-table.sh b/make-perf-epsilon-table.sh similarity index 100% rename from make-epsilon-table.sh rename to make-perf-epsilon-table.sh diff --git a/make-power-epsilon-table.sh b/make-power-epsilon-table.sh new file mode 100755 index 0000000..48396c0 --- /dev/null +++ b/make-power-epsilon-table.sh @@ -0,0 +1,18 @@ +#!/usr/bin/env bash + +if (( $# != 1 )); then + echo "usage: $(basename "$0") &2 + exit 1 +fi +table=$1 + +echo '# Columns' +echo '# -------' +echo '# 1 epsilon, i.e. relative reduction of power draw' +echo '# 2 performance-optimal GPU clock frequency (MHz)' +for eps in $(seq 1 -0.01 0); do + awk -v max="$(awk '!/#/{print $4}' "${table}" | datamash max 1)" \ + -v eps="${eps}" \ + 'BEGIN{bestp=0;c="NaN"} !/#/{if (($4/max <= eps) && (0.5*($7+$8) > bestp)){bestp = 0.5*($7+$8); c = $1}} END{print (1 - eps)" "c}'\ + "${table}" +done