diff options
author | SiCong Li <sicong.li@arm.com> | 2020-12-03 14:52:53 +0000 |
---|---|---|
committer | SiCong Li <sicong.li@arm.com> | 2020-12-08 15:28:37 +0000 |
commit | 98e33b97b92c912f058bfb3295adad1bcad3e80f (patch) | |
tree | 4cebd7dbfa9f79db3525d498b5ab16ff9b5e7e16 /examples/gemm_tuner/cl_gemmlowp_reshaped_rhs_only_fused_output_stage_fixedpoint.cpp | |
parent | 045d33c2e36575612662c237a30ec0a2d7d8cd3e (diff) | |
download | ComputeLibrary-98e33b97b92c912f058bfb3295adad1bcad3e80f.tar.gz |
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 <sicong.li@arm.com>
Change-Id: I14aa6648bbebdcd9b0bb77c47b46c27aa79d6253
Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/4650
Tested-by: Arm Jenkins <bsgcomp@arm.com>
Reviewed-by: Michele Di Giorgio <michele.digiorgio@arm.com>
Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'examples/gemm_tuner/cl_gemmlowp_reshaped_rhs_only_fused_output_stage_fixedpoint.cpp')
-rw-r--r-- | examples/gemm_tuner/cl_gemmlowp_reshaped_rhs_only_fused_output_stage_fixedpoint.cpp | 15 |
1 files changed, 10 insertions, 5 deletions
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()); |