From b54bafc940c2767f9ee787007af14c601086c74c Mon Sep 17 00:00:00 2001 From: "Ben L. Titzer" Date: Thu, 12 Dec 2024 11:24:30 -0500 Subject: [PATCH] Update compare script and add sorted list for Wasm-R3 --- scripts/compare.bash | 68 ++++++++-------------------------- wasm/suites/wasm-r3/sorted.txt | 22 +++++++++++ 2 files changed, 37 insertions(+), 53 deletions(-) create mode 100644 wasm/suites/wasm-r3/sorted.txt diff --git a/scripts/compare.bash b/scripts/compare.bash index 9d60865..434d1cb 100755 --- a/scripts/compare.bash +++ b/scripts/compare.bash @@ -1,60 +1,22 @@ #!/bin/bash -HERE=$(cd $(dirname ${BASH_SOURCE[0]}) && pwd) +if [ "$#" -lt 3 ]; then + echo "Usage: [RUNS=] compare.bash " + exit 1 +fi -BENCHMARKS="BENCHMARK bicg mvt atax gemver trmm doitgen syrk correlation covariance symm syr2k gemm gramschmidt 2mm nussinov adi 3mm fdtd-2d jacobi-2d seidel-2d heat-3d cholesky ludcmp lu" +CMD_A=$1 +shift +CMD_B=$1 +shift -ENGINES=${ENGINES:="v8-turbofan v8-liftoff wizeng-jit"} +RUNS=${RUNS:=10} -COLUMN=1 -for b in $BENCHMARKS; do - f=~/pbench/$b.wasm +LABEL_A=${LABEL_A:="A"} +LABEL_B=${LABEL_B:="B"} - printf "%s " $b - - if [ $COLUMN = 1 ]; then - printf "\twizeng-jit" - else - METRIC=$($HERE/engines/wizeng -mode=jit --metrics=main:time_us $f | grep main:time | awk '{print $3}') - printf "\t%s" $(python <<< "print('%.6f' % ($METRIC/1000000.0))") - fi - - if [ $COLUMN = 1 ]; then - printf "\twizeng-jit2" - else - METRIC=$(/tmp/wizeng-untagged -mode=jit --metrics=main:time_us $f | grep main:time | awk '{print $3}') - printf "\t%s" $(python <<< "print('%.6f' % ($METRIC/1000000.0))") - fi - - if [ $COLUMN = 1 ]; then - printf "\tv8-liftoff" - else - printf "\t%s" $($HERE/engines/v8-liftoff $f | grep main:time | awk '{print $3}') - fi +printf "%-20s:\t" "$LABEL_A" +btime -i $RUNS $CMD_A $@ - if [ $COLUMN = 1 ]; then - printf "\tv8-turbofan" - else - printf "\t%s" $($HERE/engines/v8-turbofan $f | grep main:time | awk '{print $3}') - fi - - if [ $COLUMN = 1 ]; then - printf "\twizeng" - else - METRIC=$($HERE/engines/wizeng --metrics=main:time_us $f | grep main:time | awk '{print $3}') - printf "\t%s" $(python <<< "print('%.6f' % ($METRIC/1000000.0))") - fi - - printf "\n" - - COLUMN=0 -done - -exit 0 -for b in $@; do - echo ---- $b -------- - for e in $ENGINES; do - printf " %-12s: " $e - btime 5 $HERE/engines/$e $b - done -done +printf "%-20s:\t" "$LABEL_B" +btime -i $RUNS $CMD_B $@ diff --git a/wasm/suites/wasm-r3/sorted.txt b/wasm/suites/wasm-r3/sorted.txt new file mode 100644 index 0000000..df4fe54 --- /dev/null +++ b/wasm/suites/wasm-r3/sorted.txt @@ -0,0 +1,22 @@ +ogv +game-of-life +video +figma-startpage +rtexviewer +sqlgui +riconpacker +visual6502remix +handy-tools +boa +guiicons +ffmpeg +jsc +kittygame +commanderkeen +funky-kart +uarm +sandspiel +pathfinding +multiplyInt +heatmap +multiplyDouble