COMPMID-3982 Add QASYMM8 support to gemm tuner (reshaped and reshaped_only_rhs)
Signed-off-by: SiCongLi <sicong.li@arm.com>
Change-Id: Ic6492cfd2701374d837ac53d51b0ddc07e6b1fd1
Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/4550
Tested-by: Arm Jenkins <bsgcomp@arm.com>
Reviewed-by: Gian Marco Iodice <gianmarco.iodice@arm.com>
Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
diff --git a/examples/gemm_tuner/benchmark_gemm_examples.sh b/examples/gemm_tuner/benchmark_gemm_examples.sh
index b5628f7..8789db9 100644
--- a/examples/gemm_tuner/benchmark_gemm_examples.sh
+++ b/examples/gemm_tuner/benchmark_gemm_examples.sh
@@ -1,4 +1,4 @@
-# Copyright (c) 2019 Arm Limited.
+# Copyright (c) 2019-2020 Arm Limited.
#
# SPDX-License-Identifier: MIT
#
@@ -35,6 +35,8 @@
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"
+EXAMPLE_BIN_RESHAPED_RHS_ONLY_LOWP="benchmark_cl_gemmlowp_reshaped_rhs_only_fused_output_stage_fixedpoint"
+EXAMPLE_BIN_RESHAPED_LOWP="benchmark_cl_gemmlowp_reshaped"
# Default data type
DEFAULT_DATA_TYPE="F32"
@@ -131,7 +133,7 @@
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). Can only be true
+ export_to_cl_image_rhs - (Not supported for quantized types) 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
@@ -172,7 +174,7 @@
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). Can only be true
+ export_to_cl_image_rhs - (Not supported for quantized types) 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
@@ -238,8 +240,8 @@
Supported options:
Strategy : Data Types
Native : F32
- Reshaped : F16, F32
- Reshaped RHS Only : F16, F32
+ Reshaped : F16, F32, QASYMM8
+ Reshaped RHS Only : F16, F32, QASYMM8
-o <out_dir>
Path to output directory that holds output json files
@@ -436,7 +438,7 @@
e) EXAMPLE_BIN_DIR="${OPTARG}";;
g) GEMM_SHAPES_FILE="${OPTARG}";;
c) GEMM_CONFIGS_FILE="${OPTARG}";;
- d) DATA_TYPE="${OPTARG}";;
+ d) DATA_TYPE=$(to_lower "${OPTARG}");;
o) OUT_DIR="${OPTARG}";;
esac
done
@@ -482,10 +484,16 @@
# Run selected strategy with all configurations
# Restart the built-in timer
-SECONDS=0
-[ "${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
-
-date +%s > ${OUT_DIR}/end_time_unix_seconds
+if [ "$DATA_TYPE" == "qasymm8" ]; then
+ SECONDS=0
+ [ "${STRATEGY_OPTION}" == "reshaped_rhs_only" ] && run $EXAMPLE_BIN_RESHAPED_RHS_ONLY_LOWP
+ [ "${STRATEGY_OPTION}" == "reshaped" ] && run $EXAMPLE_BIN_RESHAPED_LOWP
+ date +%s > ${OUT_DIR}/end_time_unix_seconds
+else
+ SECONDS=0
+ [ "${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
+ date +%s > ${OUT_DIR}/end_time_unix_seconds
+fi
# Main: Main script }}}