aboutsummaryrefslogtreecommitdiff
path: root/break-up-bmks.sh
diff options
context:
space:
mode:
authorLaurent Alfonsi <laurent.alfonsi@linaro.org>2022-06-17 18:11:31 +0200
committerLaurent Alfonsi <laurent.alfonsi@linaro.org>2022-06-17 18:24:56 +0200
commiteef1a3a6e878474a0e361587733228760d6dc5ab (patch)
treeb7de969e8eaad2a3c50980fd9fec99f3d102ef9d /break-up-bmks.sh
parenta9d4a2e8c70c668456ee0e424da2f3fe41962861 (diff)
break-up-bmks.sh : customize parallelization with bench
Change-Id: If069fbf7b35e9e8052e136102ccf43854da21c5d
Diffstat (limited to 'break-up-bmks.sh')
-rwxr-xr-xbreak-up-bmks.sh44
1 files changed, 38 insertions, 6 deletions
diff --git a/break-up-bmks.sh b/break-up-bmks.sh
index 8e3e76a..212ffbf 100755
--- a/break-up-bmks.sh
+++ b/break-up-bmks.sh
@@ -118,13 +118,45 @@ if [ x"$board_selection" != x"balance" ]; then
exit
fi
+get_testsuite ()
+{
+ local bch bmks suite
+ bmks=$*
+
+ testsuite=""
+ # Which bench are we running exactly ?
+ for bch in $bmks; do
+ case ${bch} in
+ 4[0-9][0-9].*|99[89].specrand)
+ suite=cpu2006 ;;
+ 5[0-9][0-9].*|6[0-9][0-9].*|99[6789].specrand_[fi][rs])
+ suite=cpu2017 ;;
+ coremark)
+ suite=coremark ;;
+ *)
+ echo "ERROR: Option benchmark $bch not recognized"
+ exit 1
+ esac
+ if [ -z "$testsuite" ]; then
+ testsuite=$suite
+ elif [ "$testsuite" != "$suite" ]; then
+ echo ERROR: Option --bench cannot mix benches tests within a single run.
+ exit 1
+ fi
+ done
+}
+
+get_testsuite "${bmks[@]}"
+
n_cores=1 # e.g., stm32
-case "$bmk_hw" in
- "apm") n_cores=8 ;;
- "sq") n_cores=10 ;;
- "tk1") n_cores=4 ;;
- "tx1") n_cores=4 ;;
- "fx") n_cores=4 ;;
+case "$bmk_hw:$testsuite" in
+ apm:*) n_cores=8 ;;
+ sq:cpu2006) n_cores=24 ;;
+ sq:cpu2017) n_cores=10 ;;
+ tk1:*) n_cores=4 ;;
+ tx1:*) n_cores=4 ;;
+ fx:cpu2006) n_cores=20 ;;
+ fx:cpu2017) n_cores=4 ;;
esac
case "$run_profile" in
"serial") n_cores=1 ;;