diff options
author | SiCong Li <sicong.li@arm.com> | 2019-09-26 16:55:49 +0100 |
---|---|---|
committer | Georgios Pinitas <georgios.pinitas@arm.com> | 2019-09-30 10:47:35 +0000 |
commit | ea80348ef330bd6415ec6dae45b99873710f812a (patch) | |
tree | 632a536cda0257e657c2b1a0fd4c33f89f7bb1d5 /examples/gemm_tuner/benchmark_gemm_examples.sh | |
parent | 0c17aa25a4f7bc812707150b91930f0cf8e75294 (diff) | |
download | ComputeLibrary-ea80348ef330bd6415ec6dae45b99873710f812a.tar.gz |
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>
Diffstat (limited to 'examples/gemm_tuner/benchmark_gemm_examples.sh')
-rwxr-xr-x | examples/gemm_tuner/benchmark_gemm_examples.sh | 37 |
1 files changed, 36 insertions, 1 deletions
diff --git a/examples/gemm_tuner/benchmark_gemm_examples.sh b/examples/gemm_tuner/benchmark_gemm_examples.sh index 7782b11f72..fd5f71df2b 100755 --- a/examples/gemm_tuner/benchmark_gemm_examples.sh +++ b/examples/gemm_tuner/benchmark_gemm_examples.sh @@ -29,9 +29,10 @@ set -u 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 @@ EOF } ####################################### +# 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 @@ Options: 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 @@ arr_contains "${STRATEGY_OPTION}" "${ALL_STRATEGY_OPTIONS[@]}" || 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 }}} |