From 5f60524e1c3515a14ec01449bb2f888e60babdbd Mon Sep 17 00:00:00 2001 From: Max Bergfelt Date: Thu, 12 Jun 2025 11:36:41 +0200 Subject: [PATCH] MLBEDSW-10239: Add activation function fusing check Added a check that ensures an activation function is not fused on another activation function. Change-Id: I1eb8e3622148773e657a9b3f2ec38b546ac2e91e Signed-off-by: Max Bergfelt --- ethosu/regor/architecture/ethosu55/ethos_u55.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ethosu/regor/architecture/ethosu55/ethos_u55.cpp b/ethosu/regor/architecture/ethosu55/ethos_u55.cpp index 693884ec..5782190b 100644 --- a/ethosu/regor/architecture/ethosu55/ethos_u55.cpp +++ b/ethosu/regor/architecture/ethosu55/ethos_u55.cpp @@ -738,9 +738,9 @@ int EthosU55OpGroup::Add(const ArchitectureOpGroupQuery &op, const std::vector 0 && !IsActivation(op.type) ) + if ( _opsCount > 0 && (!IsActivation(op.type) || IsActivation(_ops[0].type)) ) { - // Can only fuse with activation + // Can only fuse with activation. Can also not fuse two consecutive activations. return 0; } -- GitLab