From d72bd12f63601d873bd2a567973950333e0076d2 Mon Sep 17 00:00:00 2001 From: Gian Marco Iodice Date: Wed, 12 Aug 2020 18:39:55 +0100 Subject: COMPMID-3743: Fix for benchmark_gemm_examples.sh The regular expression used for the gemm shapes was not correct and caused the skip of few tests - Fix the regular expression to retrieve the gemm shapes from the csv file Change-Id: Ib99d9dede728d3aba4beadc460b2a30050fba8f9 Signed-off-by: Gian Marco Iodice Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/3732 Tested-by: Arm Jenkins Reviewed-by: SiCong Li Comments-Addressed: Arm Jenkins --- examples/gemm_tuner/benchmark_gemm_examples.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) mode change 100755 => 100644 examples/gemm_tuner/benchmark_gemm_examples.sh diff --git a/examples/gemm_tuner/benchmark_gemm_examples.sh b/examples/gemm_tuner/benchmark_gemm_examples.sh old mode 100755 new mode 100644 index f764cfaef6..b5628f7be8 --- a/examples/gemm_tuner/benchmark_gemm_examples.sh +++ b/examples/gemm_tuner/benchmark_gemm_examples.sh @@ -341,11 +341,11 @@ function run() { local total_num_experiment local num_params local num_configs - #local match_expression="^(?:\s*\d+\s*,)+\s*\d+\s*$" - local match_expression="^(\s*[0-9]+\s*,)+\s*[0-9]\s*$" + local match_expression_shape="^([^,]*,){3}[^,]*$" + local match_expression_config="^(\s*[0-9]+\s*,)+\s*[0-9]\s*$" # Don't count empty lines and lines starting with # (comments) - num_params=$( grep -E "$match_expression" "${GEMM_SHAPES_FILE}" | wc -l | cut -d " " -f 1) - num_configs=$( grep -E "$match_expression" "${GEMM_CONFIGS_FILE}" | wc -l | cut -d " " -f 1) + num_params=$( grep -E "$match_expression_shape" "${GEMM_SHAPES_FILE}" | wc -l | cut -d " " -f 1) + num_configs=$( grep -E "$match_expression_config" "${GEMM_CONFIGS_FILE}" | wc -l | cut -d " " -f 1) (( total_num_experiment=${num_params} * ${num_configs} )) # Time elapsed since the beginning in seconds local time_elapsed_s @@ -358,7 +358,7 @@ function run() { while read gemm_config do # Ignore empty lines and lines starting with # (comments) - if echo "$gemm_shape" | grep -Eq "$match_expression" && echo "$gemm_config" | grep -Eq "$match_expression";then + if echo "$gemm_shape" | grep -Eq "$match_expression_shape" && echo "$gemm_config" | grep -Eq "$match_expression_config";then echo "Running..." 1>&2 example_args="${gemm_shape},${gemm_config},--type=${DATA_TYPE}" # Run experiment -- cgit v1.2.1