From c9ed0bee16e3ef74bc1b5db0b38555ac300d05cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johan=20Alfv=C3=A9n?= Date: Mon, 3 Feb 2025 15:11:42 +0100 Subject: [PATCH] MLBEDSW-10231 Fix find block config for AvgPool MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Find block config for an AvgPool failed and triggered an assert - Adding a final step which halves the depth until minimum granule depth is reached solves the problem Change-Id: I81689fb26e20744b5f5b23226570ef8df499b8ea Signed-off-by: Johan Alfvén --- ethosu/regor/architecture/ethosu85/ethos_u85.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/ethosu/regor/architecture/ethosu85/ethos_u85.cpp b/ethosu/regor/architecture/ethosu85/ethos_u85.cpp index bcb1b7c3..ec616dba 100644 --- a/ethosu/regor/architecture/ethosu85/ethos_u85.cpp +++ b/ethosu/regor/architecture/ethosu85/ethos_u85.cpp @@ -1,5 +1,5 @@ // -// SPDX-FileCopyrightText: Copyright 2021-2024 Arm Limited and/or its affiliates +// SPDX-FileCopyrightText: Copyright 2021-2025 Arm Limited and/or its affiliates // // SPDX-License-Identifier: Apache-2.0 // @@ -854,6 +854,11 @@ Shape ArchEthosU85::FindDepthwiseConfig(const ArchitectureConfigQuery &query, co { forceReduce = (forceReduce << 1) | 1; } + else if ( depth > common.granule.Depth() ) + { + // Last resort, reducing depth + depth = std::max(depth / 2, common.granule.Depth()); + } else { assert(false); -- GitLab