diff options
author | Přemysl Eric Janouch <p@janouch.name> | 2024-01-18 18:16:18 +0100 |
---|---|---|
committer | Přemysl Eric Janouch <p@janouch.name> | 2024-01-18 18:31:10 +0100 |
commit | 77e988365d1c3a5ee67301c99c8992fbed7ce7bd (patch) | |
tree | fdae4f1c9f4bffa022802bf1c2ac55dbd1442136 /deeptagger/bench-interpret.sh | |
parent | 8df76dbaab2912e86059f8c7d8e4d2abf350a5d3 (diff) | |
download | gallery-77e988365d1c3a5ee67301c99c8992fbed7ce7bd.tar.gz gallery-77e988365d1c3a5ee67301c99c8992fbed7ce7bd.tar.xz gallery-77e988365d1c3a5ee67301c99c8992fbed7ce7bd.zip |
Add some benchmarks and information
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 |