From b10181b9b476a0b41e270472e97eb0b8e5e197d5 Mon Sep 17 00:00:00 2001 From: SiCong Li Date: Tue, 11 Aug 2020 13:00:20 +0100 Subject: COMPMID-3456 Update gemm tuner documentation * Update README with the improvements * Add a new step-by-step example section Change-Id: I4d76821fb6c2f3b5edd54edfeff053e1c92fbb6e Signed-off-by: SiCong Li Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/3713 Comments-Addressed: Arm Jenkins Reviewed-by: Sheri Zhang Tested-by: Arm Jenkins --- examples/gemm_tuner/benchmark_gemm_examples.sh | 32 +++++++++++--------------- 1 file changed, 13 insertions(+), 19 deletions(-) (limited to '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 index bb9ec0f3ab..f764cfaef6 100755 --- a/examples/gemm_tuner/benchmark_gemm_examples.sh +++ b/examples/gemm_tuner/benchmark_gemm_examples.sh @@ -59,10 +59,7 @@ NUM_ITERATION=5 function help_gemm_shape_file() { cat >&2 << EOF Gemm shape file: - Gemm shape file is a headerless csv file with fields separated by commas and commas only (there cannot be whitespaces - around each field). - - Note also comments and extraneous empty lines are not permitted. + Gemm shape file is a headerless csv file with fields separated by commas A gemm shape is a list of 4 positive integers describing the shapes of the two matrices (LHS and RHS) with: @@ -91,10 +88,7 @@ EOF 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). - - Note also comments and extraneous empty lines are not permitted. + Gemm config file is a headerless csv file with fields separated by commas A gemm config is a list of 3 positive integers , with: m0 - Number of rows processed by the matrix multiplication @@ -126,19 +120,20 @@ EOF function help_gemm_config_file_reshaped_rhs_only() { cat >&2 << EOF Gemm config file (Strategy reshaped_rhs_only): - Gemm config file is a headerless csv file with fields separated by commas and commas only (there cannot be whitespaces - around each field). + Gemm config file is a headerless csv file with fields separated by commas. Note also comments and extraneous empty lines are not permitted. - A gemm config is a list of 4 positive integers and 2 boolean values interleave_rhs and transpose_rhs, with: + A gemm config is a list of 4 positive integers and 3 boolean values: 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 h0 - Number of horizontal blocks of size (k0xn0) stored on the same output row interleave_rhs - Interleave rhs matrix (1) / Do not interleave rhs matrix (0) transpose_rhs - Transpose rhs matrix (1) / Do not transpose rhs matrix (0) - export_to_cl_image_rhs - Export rhs matrix to cl_image (1) / Do not export rhs matrix to cl_image (0) + export_to_cl_image_rhs - Export rhs matrix to cl_image (1) / Do not export rhs matrix to cl_image (0). Can only be true + with certain combinations of the GEMMParams and other configs. Please refer to CLGEMMReshapeRHSMatrixKernel + for more details Only the following configurations of M0, N0 and K0 are currently supported: M0 = 1, 2, 3, 4, 5, 6, 7, 8 @@ -166,12 +161,9 @@ EOF function help_gemm_config_file_reshaped() { cat >&2 << EOF Gemm config file (Strategy reshaped): - Gemm config file is a headerless csv file with fields separated by commas and commas only (there cannot be whitespaces - around each field). - - Note also comments and extraneous empty lines are not permitted. + Gemm config file is a headerless csv file with fields separated by commas - A gemm config is a list of 5 positive integers and 3 boolean values interleave_lhs, interleave_rhs and transpose_rhs, with: + A gemm config is a list of 5 positive integers and 4 boolean values: 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 @@ -180,7 +172,9 @@ Gemm config file (Strategy reshaped): interleave_lhs - Interleave lhs matrix (1) / Do not interleave lhs matrix (0) interleave_rhs - Interleave rhs matrix (1) / Do not interleave rhs matrix (0) transpose_rhs - Transpose rhs matrix but not lhs matrix (1) / Do not transpose rhs matrix but do transpose lhs matrix (0) - export_to_cl_image_rhs - Export rhs matrix to cl_image (1) / Do not export rhs matrix to cl_image (0) + export_to_cl_image_rhs - Export rhs matrix to cl_image (1) / Do not export rhs matrix to cl_image (0). Can only be true + with certain combinations of the GEMMParams and other configs. Please refer to CLGEMMReshapeRHSMatrixKernel + for more details If rhs matrix is transposed only the following configurations are currently supported: M0 = 2, 3, 4, 5, 6, 7, 8 @@ -218,7 +212,7 @@ function usage() { Run gemm examples of a selected strategy, over provided tunable configurationsa and gemm shapes. Save the benchmark results to json files in an output directory. -Usage: ${CMD} [-h] -s -e -g -c [-o ] +Usage: ${CMD} [-h] -s -e -g -c [-d ] [-o ] Options: -h -- cgit v1.2.1