aboutsummaryrefslogtreecommitdiff
path: root/examples/gemm_tuner/cl_gemm_reshaped_rhs_only.cpp
diff options
context:
space:
mode:
authorGian Marco Iodice <gianmarco.iodice@arm.com>2023-04-28 10:40:07 +0100
committerGian Marco Iodice <gianmarco.iodice@arm.com>2023-05-02 15:53:28 +0000
commit60ab4e66ea3cb85042035fd1aafbfea666bb4ea7 (patch)
tree05818f7fafb0cf02d337b201756548152090436f /examples/gemm_tuner/cl_gemm_reshaped_rhs_only.cpp
parentd7113e4af5b5497d3a3a62dc9cf6b147e2a024cd (diff)
downloadComputeLibrary-60ab4e66ea3cb85042035fd1aafbfea666bb4ea7.tar.gz
Fix export_to_cl_image issue in the fp16 GeMM implementation
- The issue affects Fp16 GeMM on Arm® Mali™-G78 - The issue was caused by a missing fallback implementation for the case when export_to_cl_image cannot be used - The new implementation fixes this issues and make the GeMM implementation for M=1 also faster (4-5% on various networks with fully connected at the end of the model) - This patch also enables the H0=0 case in the GeMM examples Resolves COMPMID-5812, COMPMID-5688, and COMPMID-6147 Signed-off-by: Gian Marco Iodice <gianmarco.iodice@arm.com> Change-Id: Ib7b355ae25337962598dd2ba21665b1a6b48686f Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/c/VisualCompute/ComputeLibrary/+/514664 Tested-by: bsgcomp <bsgcomp@arm.com> Reviewed-by: Viet-Hoa Do <viet-hoa.do@arm.com> Comments-Addressed: bsgcomp <bsgcomp@arm.com> Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/9526 Benchmark: Arm Jenkins <bsgcomp@arm.com> Tested-by: Arm Jenkins <bsgcomp@arm.com> Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'examples/gemm_tuner/cl_gemm_reshaped_rhs_only.cpp')
-rw-r--r--examples/gemm_tuner/cl_gemm_reshaped_rhs_only.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/examples/gemm_tuner/cl_gemm_reshaped_rhs_only.cpp b/examples/gemm_tuner/cl_gemm_reshaped_rhs_only.cpp
index 79f251ae7d..0ad2a65dc2 100644
--- a/examples/gemm_tuner/cl_gemm_reshaped_rhs_only.cpp
+++ b/examples/gemm_tuner/cl_gemm_reshaped_rhs_only.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2019-2021 Arm Limited.
+ * Copyright (c) 2019-2021, 2023 Arm Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -225,6 +225,11 @@ public:
kernel_info.broadcast_bias = true;
kernel_info.activation_info = act_info;
+ if(rhs_info.h0 == 0)
+ {
+ rhs_info.h0 = std::max(kernel_info.n / rhs_info.n0, 1U);
+ }
+
// Initialise rhs_reshaped tensor info
rhs_reshaped.allocator()->init(TensorInfo(compute_rhs_reshaped_shape(*rhs.info(), rhs_info), 1, params.data_type));