From 68f1aa4317c13f0b943eba4c2767c16717f5b399 Mon Sep 17 00:00:00 2001 From: Philip Hall Date: Tue, 20 May 2025 16:55:56 +0100 Subject: [PATCH] MLBEDSW-10837: Improve Ethos-U85 block config search ratio OFMs with extreme aspects (like 1:200) end up using a pathological scaling ratio during the block config search. - This commit changes the scaling ratio to be more conservative thus refining more accurately (at the cost of speed). - Fixed issue where the last, smallest-possible configuration was not selectable. Signed-off-by: Philip Hall Change-Id: I20eed6268543453267c76f057b1a84b7cbadc1c5 --- ethosu/regor/architecture/ethosu85/ethos_u85.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ethosu/regor/architecture/ethosu85/ethos_u85.cpp b/ethosu/regor/architecture/ethosu85/ethos_u85.cpp index 40070b88..4d37a800 100644 --- a/ethosu/regor/architecture/ethosu85/ethos_u85.cpp +++ b/ethosu/regor/architecture/ethosu85/ethos_u85.cpp @@ -776,7 +776,7 @@ Shape ArchEthosU85::AreaFit(const FindConfigCommon &common, const Shape &ofmShap } // Didn't fit both ACC & IB, reduce the volume and retry - double ratio = std::min(ibRatio * ibRatio, abRatio); + double ratio = std::min(ibRatio, abRatio); int newAcc = GranularScale(fitAcc, ubAccElements, ratio); // Ratio didn't scale if ( newAcc == fitAcc ) @@ -784,7 +784,7 @@ Shape ArchEthosU85::AreaFit(const FindConfigCommon &common, const Shape &ofmShap newAcc = fitAcc - ubAccElements; } // No fit - if ( newAcc <= ubAccElements ) + if ( newAcc < ubAccElements ) { break; } -- GitLab