From eef1a3a6e878474a0e361587733228760d6dc5ab Mon Sep 17 00:00:00 2001 From: Laurent Alfonsi Date: Fri, 17 Jun 2022 18:11:31 +0200 Subject: break-up-bmks.sh : customize parallelization with bench Change-Id: If069fbf7b35e9e8052e136102ccf43854da21c5d --- break-up-bmks.sh | 44 ++++++++++++++++++++++++++++++++++++++------ 1 file changed, 38 insertions(+), 6 deletions(-) (limited to 'break-up-bmks.sh') 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 ;; -- cgit v1.2.3