aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/CL/gemm/CLGEMMKernelSelectionBifrost.cpp
diff options
context:
space:
mode:
authorGian Marco Iodice <gianmarco.iodice@arm.com>2020-09-01 13:59:44 +0100
committerGian Marco Iodice <gianmarco.iodice@arm.com>2020-09-03 09:05:47 +0000
commit12e0209d9369f9aea14946453ad1b0887292a6ba (patch)
tree4eed956684c3b5f768d0a5db593004ee2a4b9329 /src/runtime/CL/gemm/CLGEMMKernelSelectionBifrost.cpp
parent7a7f4e08eab1e53a2a1ae62c62705b890fb66c60 (diff)
downloadComputeLibrary-12e0209d9369f9aea14946453ad1b0887292a6ba.tar.gz
COMPMID-3772: Update GEMM selection heuristic for Mali-G76 (F32)
Change-Id: Iaaf3a72ec98a923ef2a4a39aeeb02f95795c2f6f Signed-off-by: Gian Marco Iodice <gianmarco.iodice@arm.com> Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/3895 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 'src/runtime/CL/gemm/CLGEMMKernelSelectionBifrost.cpp')
-rw-r--r--src/runtime/CL/gemm/CLGEMMKernelSelectionBifrost.cpp51
1 files changed, 39 insertions, 12 deletions
diff --git a/src/runtime/CL/gemm/CLGEMMKernelSelectionBifrost.cpp b/src/runtime/CL/gemm/CLGEMMKernelSelectionBifrost.cpp
index 48f38cac55..7b8eee975e 100644
--- a/src/runtime/CL/gemm/CLGEMMKernelSelectionBifrost.cpp
+++ b/src/runtime/CL/gemm/CLGEMMKernelSelectionBifrost.cpp
@@ -184,32 +184,59 @@ CLGEMMKernelType CLGEMMKernelSelectionBifrost::g76_f32(unsigned int m, unsigned
{
ARM_COMPUTE_UNUSED(b);
- CLGEMMKernelType gemm_type = CLGEMMKernelType::NATIVE_V1;
+ if(!is_rhs_constant)
+ {
+ return CLGEMMKernelType::NATIVE;
+ }
- if(is_rhs_constant)
+ if(m == 1)
{
- if((m > 1) && (n < 16))
+ return CLGEMMKernelType::RESHAPED_ONLY_RHS;
+ }
+
+ if(k <= 496)
+ {
+ if(n <= 544)
{
- gemm_type = CLGEMMKernelType::RESHAPED;
+ return CLGEMMKernelType::RESHAPED_ONLY_RHS;
}
- else if(m == 1)
+ else
{
- gemm_type = CLGEMMKernelType::RESHAPED_ONLY_RHS;
+ return CLGEMMKernelType::RESHAPED;
}
- else
+ }
+ else
+ {
+ if(k <= 588)
{
- if((k > 256) && (m > 4))
+ if(k <= 552)
{
- gemm_type = CLGEMMKernelType::RESHAPED;
+ if(m <= 148)
+ {
+ return CLGEMMKernelType::RESHAPED_ONLY_RHS;
+ }
+ else
+ {
+ if(m <= 278)
+ {
+ return CLGEMMKernelType::RESHAPED;
+ }
+ else
+ {
+ return CLGEMMKernelType::RESHAPED_ONLY_RHS;
+ }
+ }
}
else
{
- gemm_type = CLGEMMKernelType::RESHAPED_ONLY_RHS;
+ return CLGEMMKernelType::RESHAPED_ONLY_RHS;
}
}
+ else
+ {
+ return CLGEMMKernelType::RESHAPED;
+ }
}
-
- return gemm_type;
}
CLGEMMKernelType CLGEMMKernelSelectionBifrost::g71_f16(unsigned int m, unsigned int n, unsigned int k, unsigned int b, bool is_rhs_constant)