diff options
Diffstat (limited to 'deeptagger/bench-interpret.sh')
-rwxr-xr-x | deeptagger/bench-interpret.sh | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/deeptagger/bench-interpret.sh b/deeptagger/bench-interpret.sh new file mode 100755 index 0000000..ffad9c9 --- /dev/null +++ b/deeptagger/bench-interpret.sh @@ -0,0 +1,51 @@ +#!/bin/sh -e +parse() { + awk 'BEGIN { + OFS = FS = "\t" + } { + name = $1 + path = $2 + cpu = $3 != "" + batch = $4 + time = $5 + + if (path ~ "/batch-") + name = name " (batch)" + else if (name ~ /^WD / && batch > 1) + next + } { + group = name FS cpu FS batch + if (lastgroup != group) { + if (lastgroup) + print lastgroup, mintime + + lastgroup = group + mintime = time + } else { + if (mintime > time) + mintime = time + } + } END { + print lastgroup, mintime + }' "${BENCH_LOG:-bench.out}" +} + +cat <<END +GPU inference +~~~~~~~~~~~~~ +[cols="<,>,>", options=header] +|=== +|Model|Batch size|Time +$(parse | awk -F'\t' 'BEGIN { OFS = "|" } + !$2 { print "", $1, $3, $4 " s" }' | sort -t'|' -nk4) +|=== + +CPU inference +~~~~~~~~~~~~~ +[cols="<,>,>", options=header] +|=== +|Model|Batch size|Time +$(parse | awk -F'\t' 'BEGIN { OFS = "|" } + $2 { print "", $1, $3, $4 " s" }' | sort -t'|' -nk4) +|=== +END |