diff options
author | Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org> | 2021-04-15 17:57:30 +0530 |
---|---|---|
committer | Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org> | 2021-04-21 11:17:41 +0000 |
commit | 517aaade5fb7785f031a4f34ce73fa40ef1f19b9 (patch) | |
tree | 7bdaf7330f9cbb9a836ac64be72bd79ccba7e8f8 | |
parent | acf08dc6638e62b4372de04e8c9492d3487f479f (diff) |
Add comparison for vect metric.
Change-Id: I1c5e4c6b0cc43fbdf2923484b8c643e2a7c9c51e
-rwxr-xr-x | tcwg-benchmark-results.sh | 4 | ||||
-rwxr-xr-x | tcwg_bmk-build.sh | 70 |
2 files changed, 52 insertions, 22 deletions
diff --git a/tcwg-benchmark-results.sh b/tcwg-benchmark-results.sh index 5fa3e160..6b45c971 100755 --- a/tcwg-benchmark-results.sh +++ b/tcwg-benchmark-results.sh @@ -81,6 +81,10 @@ for i in "${results[@]}"; do hw_tag="${i%%/*}" gather_perf_data $has_perf_logs $hw_tag $num ;; + "vect") + $scripts/../bmk-scripts/vect-data-to-csv.py "results-$num" \ + "$top_artifacts/results-$num.csv" + ;; *) echo "ERROR: invalid value for metric: ${metric}" exit 1 diff --git a/tcwg_bmk-build.sh b/tcwg_bmk-build.sh index 1c7d4c52..4f55bfad 100755 --- a/tcwg_bmk-build.sh +++ b/tcwg_bmk-build.sh @@ -338,26 +338,6 @@ compare_results_perf () ( set -euf -o pipefail - local ref_results_id="$1" - local new_results_id="$2" - local cmp_options="$3" - - local results_ref results_new - results_ref=$(cat $ref_results_id) - results_new=$(cat $new_results_id) - - case "${rr[target]}" in - "arm_eabi") - cmp_options="$cmp_options --has_perf_logs no" - ;; - esac - - $scripts/tcwg-benchmark-results.sh \ - --results_ref $results_ref ++results $results_new \ - --top_artifacts "$run_step_artifacts" --verbose $verbose \ - --metric "perf" $cmp_options \ - > $run_step_artifacts/results.log 2>&1 - case "${cflags[0]}" in "-Os"*|"-Oz"*) # We use 1% tolerance for binary size @@ -425,19 +405,65 @@ compare_results_perf () ) } +compare_results_vect () +{ + ( + set -euf -o pipefail + echo "bmk,symbol,result" > $run_step_artifacts/results-compare.csv + + while IFS=, read -a arr; do + bmk=${arr[0]} + # hack to trim padding + symbol=$(echo ${arr[1]} | xargs) + base_num_vect_loops=${arr[3]} + target_num_vect_loops=${arr[4]} + if (( base_num_vect_loops > target_num_vect_loops )); then + echo "$bmk, $symbol, $base_num_vect_loops, $target_num_vect_loops" \ + >> $run_step_artifacts/results-compare.csv + fi + done < <(tail -n +2 $run_step_artifacts/results.csv) + ) +} + compare_results () { + ( + set -euf -o pipefail + local metric=$1 + local ref_results_id="$2" + local new_results_id="$3" + local cmp_options="$4" + + local results_ref results_new + results_ref=$(cat $ref_results_id) + results_new=$(cat $new_results_id) + + case "${rr[target]}" in + "arm_eabi") + cmp_options="$cmp_options --has_perf_logs no" + ;; + esac + + $scripts/tcwg-benchmark-results.sh \ + --results_ref $results_ref ++results $results_new \ + --top_artifacts "$run_step_artifacts" --verbose $verbose \ + --metric "$metric" $cmp_options \ + > $run_step_artifacts/results.log 2>&1 + case $metric in "perf") - shift - compare_results_perf "$@" + compare_results_perf + ;; + "vect") + compare_results_vect ;; *) echo "Invalid metric: $metric"; exit 1 ;; esac + ) } # Exit with code 0 if no new regressions between results_id-1 and -2 compared to |