From 98e33b97b92c912f058bfb3295adad1bcad3e80f Mon Sep 17 00:00:00 2001 From: SiCong Li Date: Thu, 3 Dec 2020 14:52:53 +0000 Subject: Fix invalid arguments error for cl_gemmlowp* examples without arguments * Pass QASYMM8 as default argument for cl_gemmlowp examples * Fix the (arbitrary) quantization info to be the same across tensors to avoid quantization information mismatch issue Resolves COMPMID-4044 Signed-off-by: SiCong Li Change-Id: I14aa6648bbebdcd9b0bb77c47b46c27aa79d6253 Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/4650 Tested-by: Arm Jenkins Reviewed-by: Michele Di Giorgio Comments-Addressed: Arm Jenkins --- ...wp_reshaped_rhs_only_fused_output_stage_fixedpoint.cpp | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'examples/gemm_tuner/cl_gemmlowp_reshaped_rhs_only_fused_output_stage_fixedpoint.cpp') diff --git a/examples/gemm_tuner/cl_gemmlowp_reshaped_rhs_only_fused_output_stage_fixedpoint.cpp b/examples/gemm_tuner/cl_gemmlowp_reshaped_rhs_only_fused_output_stage_fixedpoint.cpp index 8323bbd971..a990ef1dee 100644 --- a/examples/gemm_tuner/cl_gemmlowp_reshaped_rhs_only_fused_output_stage_fixedpoint.cpp +++ b/examples/gemm_tuner/cl_gemmlowp_reshaped_rhs_only_fused_output_stage_fixedpoint.cpp @@ -160,7 +160,7 @@ public: // Parse command line options CommandLineParser parser; - CommonGemmExampleOptions param_options(parser); + CommonGemmExampleOptions param_options(parser, DataType::QASYMM8); GemmConfigOptions config_options(parser); parser.parse(argc, argv); @@ -196,10 +196,14 @@ public: // Set arbitrary quantization information (non-zero offset to ensure offset contribution stage is included) // Could be extended in the future to include a user-controlled option for offset == 0 - lhs.info()->set_quantization_info({ 0.012, 3 }); - rhs.info()->set_quantization_info({ 0.012, 3 }); - bias.info()->set_quantization_info({ 0.012, 3 }); - dst.info()->set_quantization_info({ 0.012, 3 }); + const QuantizationInfo q_info + { + 0.012, 3 + }; + lhs.info()->set_quantization_info(q_info); + rhs.info()->set_quantization_info(q_info); + bias.info()->set_quantization_info(q_info); + dst.info()->set_quantization_info(q_info); GEMMLHSMatrixInfo lhs_info; lhs_info.m0 = configs.m0; @@ -214,6 +218,7 @@ public: rhs_info.export_to_cl_image = false; // CL image not supported for quantized cases yet rhs_reshaped.allocator()->init(TensorInfo(compute_rhs_reshaped_shape(*rhs.info(), rhs_info), 1, params.data_type)); + rhs_reshaped.info()->set_quantization_info(q_info); if(rhs_info.export_to_cl_image) { examples::gemm_tuner_helpers::update_padding_for_cl_image(rhs_reshaped.info()); -- cgit v1.2.1