COMPMID-3980: Fix F16 regression on Mali-G76
authorGian Marco Iodice <gianmarco.iodice@arm.com>
Wed, 18 Nov 2020 13:35:21 +0000 (13:35 +0000)
committerPablo Marquez Tello <pablo.tello@arm.com>
Mon, 23 Nov 2020 11:58:30 +0000 (11:58 +0000)
- The issue was related to the wrong N0 used in CLGEMMReshaped heuristic

Change-Id: Iecb010f0de383169c9fb8543faf15b2f93ba2ed8
Signed-off-by: Gian Marco Iodice <gianmarco.iodice@arm.com>
Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/4464
Reviewed-by: Georgios Pinitas <georgios.pinitas@arm.com>
Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
Tested-by: Arm Jenkins <bsgcomp@arm.com>
(cherry picked from commit f1f61444429447e207e6f145b9d9645d0216dede)
Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/4167
Reviewed-by: Michele Di Giorgio <michele.digiorgio@arm.com>
Tested-by: Michele Di Giorgio <michele.digiorgio@arm.com>
src/core/CL/gemm/reshaped/CLGEMMReshapedKernelConfigurationBifrost.cpp

index e5c89f89af5a0560a0c6ad72e8339adef19282fb..59a2a82edf717a5b660f9761e5b86ccfb1bf5d29 100644 (file)
@@ -333,13 +333,12 @@ std::pair<GEMMLHSMatrixInfo, GEMMRHSMatrixInfo> CLGEMMReshapedKernelConfiguratio
 {
     const float workload = (static_cast<float>(m) * static_cast<float>(n) * static_cast<float>(b)) / 20.0f;
     const float r_mk = static_cast<float>(m) / static_cast<float>(k);
-    const float r_nk = static_cast<float>(n) / static_cast<float>(k);
 
-    if(workload <= 1422.40f)
+    if(workload <= 1595.2000f)
     {
-        if(r_mk <= 2.45f)
+        if(r_mk <= 2.1044f)
         {
-            if(workload <= 801.60f)
+            if(workload <= 870.4000f)
             {
                 return configure_lhs_rhs_info(m, n, 2, 4, 4, 1, 2, true, false, true, false, false);
             }
@@ -350,19 +349,12 @@ std::pair<GEMMLHSMatrixInfo, GEMMRHSMatrixInfo> CLGEMMReshapedKernelConfiguratio
         }
         else
         {
-            if(r_nk <= 0.67f)
-            {
-                return configure_lhs_rhs_info(m, n, 4, 2, 4, 2, 2, false, false, true, false, false);
-            }
-            else
-            {
-                return configure_lhs_rhs_info(m, n, 2, 4, 4, 4, 1, false, true, false, true, false);
-            }
+            return configure_lhs_rhs_info(m, n, 4, 2, 4, 2, 2, false, false, true, false, false);
         }
     }
     else
     {
-        return configure_lhs_rhs_info(m, n, 4, 4, 4, 2, 4, true, true, true, false, false);
+        return configure_lhs_rhs_info(m, n, 4, 8, 4, 4, 2, true, true, true, false, false);
     }
 }