From 0c3eb046d78c9fdc13109a2f909e00971921ce49 Mon Sep 17 00:00:00 2001 From: Alexander Bengtsson Date: Tue, 11 Feb 2025 14:38:35 +0100 Subject: [PATCH] MLBEDSW-10425: Don't IFM-fuse non-unit Rescales on ReduceSum - ReduceSum only supports unit scaling on the IFM, update architectureConstraints to account for this. Change-Id: If072b0f3c6d92b631c1d0cae71336e5293f7ab08 Signed-off-by: Alexander Bengtsson --- ethosu/regor/architecture/ethosu55/ethos_u55_constraints.cpp | 2 +- ethosu/regor/architecture/ethosu85/ethos_u85_constraints.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ethosu/regor/architecture/ethosu55/ethos_u55_constraints.cpp b/ethosu/regor/architecture/ethosu55/ethos_u55_constraints.cpp index 021959a2..da197be9 100644 --- a/ethosu/regor/architecture/ethosu55/ethos_u55_constraints.cpp +++ b/ethosu/regor/architecture/ethosu55/ethos_u55_constraints.cpp @@ -114,7 +114,7 @@ bool EthosU55Constraints::SupportsFusedRescale(OpType opType, TensorUsage tensor } else if ( npuOp == EthosU55NpuOp::ReduceSum ) { - return globalScale; + return globalScale && isUnitScale; } } else if ( tensorUsage == TensorUsage::OFM ) diff --git a/ethosu/regor/architecture/ethosu85/ethos_u85_constraints.cpp b/ethosu/regor/architecture/ethosu85/ethos_u85_constraints.cpp index 6ab78def..7988eb91 100644 --- a/ethosu/regor/architecture/ethosu85/ethos_u85_constraints.cpp +++ b/ethosu/regor/architecture/ethosu85/ethos_u85_constraints.cpp @@ -132,7 +132,7 @@ bool EthosU85Constraints::SupportsFusedRescale(OpType opType, TensorUsage tensor } else if ( npuOp == EthosU85NpuOp::ReduceSum ) { - return globalScale; + return globalScale && isUnitScale; } } else if ( tensorUsage == TensorUsage::OFM ) -- GitLab