COMPMID-2564 - Add CLGEMMNative example

* Add gemm native example.
* Update shell script to run gemm native example.

Signed-off-by: SiCong Li <sicong.li@arm.com>
Change-Id: I0252f556b6f94adb776b8cb84b45971f1eb317e4
Reviewed-on: https://review.mlplatform.org/c/1992
Tested-by: Arm Jenkins <bsgcomp@arm.com>
Reviewed-by: Georgios Pinitas <georgios.pinitas@arm.com>
diff --git a/examples/gemm_tuner/benchmark_gemm_examples.sh b/examples/gemm_tuner/benchmark_gemm_examples.sh
index 7782b11..fd5f71d 100755
--- a/examples/gemm_tuner/benchmark_gemm_examples.sh
+++ b/examples/gemm_tuner/benchmark_gemm_examples.sh
@@ -29,9 +29,10 @@
 CMD=$( basename $0 )
 
 # All supported strategy options
-ALL_STRATEGY_OPTIONS=("reshaped_rhs_only" "reshaped")
+ALL_STRATEGY_OPTIONS=("native" "reshaped_rhs_only" "reshaped")
 
 # Names of example binary for each strategy
+EXAMPLE_BIN_NATIVE="benchmark_cl_gemm_native"
 EXAMPLE_BIN_RESHAPED_RHS_ONLY="benchmark_cl_gemm_reshaped_rhs_only"
 EXAMPLE_BIN_RESHAPED="benchmark_cl_gemm_reshaped"
 
@@ -73,6 +74,38 @@
 }
 
 #######################################
+# Print gemm config file for native help message
+# Globals:
+#   None
+# Arguments:
+#   None
+# Returns:
+#   None
+#######################################
+function help_gemm_config_file_native() {
+  cat >&2 << EOF
+Gemm config file (Strategy native):
+  Gemm config file is a headerless csv file with fields separated by commas and commas only (there cannot be whitespaces
+  around each field).
+  A gemm config is a list of 4 positive integers <m0, n0, k0, h0> and 2 boolean values interleave_rhs and transpose_rhs, with:
+  m0 - Number of rows processed by the matrix multiplication
+  n0 - Number of columns processed by the matrix multiplication
+  k0 - Number of partial accumulations performed by the matrix multiplication
+
+  Only the following configurations of M0, N0 and K0 are currently supported:
+  M0 = 1, 2, 3, 4, 5, 6, 7, 8
+  N0 = 2, 3, 4, 8, 16
+  K0 = 2, 3, 4, 8, 16
+
+  An example gemm config file looks like:
+  1,4,4
+  2,3,8
+  ...
+
+EOF
+}
+
+#######################################
 # Print gemm config file for reshaped_rhs_only help message
 # Globals:
 #   None
@@ -195,6 +228,7 @@
 EOF
 # Print help messages about gemm shapes and various gemm configs
 $HELP && help_gemm_shape_file
+$HELP && ( [ "${STRATEGY_OPTION}" == "" ] || [ "${STRATEGY_OPTION}" == "native" ] ) && help_gemm_config_file_native
 $HELP && ( [ "${STRATEGY_OPTION}" == "" ] || [ "${STRATEGY_OPTION}" == "reshaped_rhs_only" ] ) && help_gemm_config_file_reshaped_rhs_only
 $HELP && ( [ "${STRATEGY_OPTION}" == "" ] || [ "${STRATEGY_OPTION}" == "reshaped" ] ) && help_gemm_config_file_reshaped
 exit 1
@@ -360,6 +394,7 @@
 mkdir ${OUT_DIR}
 
 # Run selected strategy with all configurations
+[ "${STRATEGY_OPTION}" == "native" ] && run $EXAMPLE_BIN_NATIVE
 [ "${STRATEGY_OPTION}" == "reshaped_rhs_only" ] && run $EXAMPLE_BIN_RESHAPED_RHS_ONLY
 [ "${STRATEGY_OPTION}" == "reshaped" ] && run $EXAMPLE_BIN_RESHAPED
 # Main: Main script }}}