aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSiCong Li <sicong.li@arm.com>2020-11-08 22:11:01 +0000
committerGeorgios Pinitas <georgios.pinitas@arm.com>2020-11-09 12:32:08 +0000
commit4d2365de0a63f5e8cabe161da2efe99221dcfa43 (patch)
treed9c0f01d1b0ce7b97a363dde848a35393228fc67
parent94e25636f89aecaad1ef9ccc6738bdd4af9a04b1 (diff)
downloadComputeLibrary-4d2365de0a63f5e8cabe161da2efe99221dcfa43.tar.gz
COMPMID-3951 LargeGraph_FLOAT32_Rank4_25 CTS failures in Android Q in CL Fix 2
* Select between the 2 reshaped rhs only kernels at run time Signed-off-by: SiCong Li <sicong.li@arm.com> Change-Id: Iae6bcc5379d6d84b5538feccf255cbed43fe64c0 Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/4348 Comments-Addressed: Arm Jenkins <bsgcomp@arm.com> Tested-by: Arm Jenkins <bsgcomp@arm.com> Reviewed-by: Georgios Pinitas <georgios.pinitas@arm.com>
-rw-r--r--arm_compute/runtime/CL/functions/CLGEMM.h1
-rw-r--r--src/runtime/CL/functions/CLGEMM.cpp19
2 files changed, 7 insertions, 13 deletions
diff --git a/arm_compute/runtime/CL/functions/CLGEMM.h b/arm_compute/runtime/CL/functions/CLGEMM.h
index 0b13e7dbbf..3d645bdbff 100644
--- a/arm_compute/runtime/CL/functions/CLGEMM.h
+++ b/arm_compute/runtime/CL/functions/CLGEMM.h
@@ -212,7 +212,6 @@ private:
ICLTensor *_dst;
bool _reshape_b_only_on_first_run;
bool _is_prepared;
- bool _has_pad_y;
CLGEMMKernelType _gemm_kernel_type;
};
} // namespace arm_compute
diff --git a/src/runtime/CL/functions/CLGEMM.cpp b/src/runtime/CL/functions/CLGEMM.cpp
index 0151485849..57a5f9739e 100644
--- a/src/runtime/CL/functions/CLGEMM.cpp
+++ b/src/runtime/CL/functions/CLGEMM.cpp
@@ -116,7 +116,6 @@ CLGEMM::CLGEMM(std::shared_ptr<IMemoryManager> memory_manager, IWeightsManager *
_dst(nullptr),
_reshape_b_only_on_first_run(false),
_is_prepared(false),
- _has_pad_y(false),
_gemm_kernel_type(CLGEMMKernelType::NATIVE_V1)
{
}
@@ -735,7 +734,13 @@ void CLGEMM::run()
CLScheduler::get().enqueue(*_reshape_rhs_kernel, false);
}
}
- if(_has_pad_y)
+ // In case of RESHAPED_ONLY_RHS, we need to check the padding requirement
+ // Check if the lhs or dst tensors have padding
+ const unsigned int cross_plane_pad_lhs = _lhs->info()->padding().top + _lhs->info()->padding().bottom;
+ const unsigned int cross_plane_pad_dst = _dst->info()->padding().top + _dst->info()->padding().bottom;
+
+ bool has_pad_y = (cross_plane_pad_lhs != 0) || (cross_plane_pad_dst != 0);
+ if(has_pad_y)
{
CLScheduler::get().enqueue(*_mm_reshaped_only_rhs_fallback_kernel, true);
}
@@ -756,16 +761,6 @@ void CLGEMM::prepare()
{
if(!_is_prepared)
{
- // In case of RESHAPED_ONLY_RHS, we need to check the padding requirement
- if(_gemm_kernel_type == CLGEMMKernelType::RESHAPED_ONLY_RHS)
- {
- // Check if the lhs or dst tensors have padding
- const unsigned int cross_plane_pad_lhs = _lhs->info()->padding().top + _lhs->info()->padding().bottom;
- const unsigned int cross_plane_pad_dst = _dst->info()->padding().top + _dst->info()->padding().bottom;
-
- _has_pad_y = (cross_plane_pad_lhs != 0) || (cross_plane_pad_dst != 0);
- }
-
if(_gemm_kernel_type != CLGEMMKernelType::NATIVE_V1 && _reshape_b_only_on_first_run)
{
if(_weights_manager && _weights_manager->are_weights_managed(_original_b))