From 411326cfe25fb72482a1ac9fc89f7b26930b2a9d Mon Sep 17 00:00:00 2001 From: Max Bergfelt Date: Tue, 17 Jun 2025 10:23:33 +0200 Subject: [PATCH] MLBEDSW-10896: Add int64 type for Add operator Changed to allow int64 type for Add as the cast operator which supports int64 output (with reinterpret cast) is converted to an Add. Change-Id: I1b84a5fd34e8f258588a2bd7f6603d36c5ff0e88 Signed-off-by: Max Bergfelt --- .../regor/architecture/ethosu55/ethos_u55_constraints.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ethosu/regor/architecture/ethosu55/ethos_u55_constraints.cpp b/ethosu/regor/architecture/ethosu55/ethos_u55_constraints.cpp index 6b3a1456..8543c36b 100644 --- a/ethosu/regor/architecture/ethosu55/ethos_u55_constraints.cpp +++ b/ethosu/regor/architecture/ethosu55/ethos_u55_constraints.cpp @@ -188,6 +188,7 @@ bool EthosU55Constraints::SupportsRescale(DataType fromType, DataType toType) } +static const std::array s_validAddOfmTypes = {DataType::UInt8, DataType::Int8, DataType::Int16, DataType::Int32, DataType::Int64}; static const std::array s_validAddMulTypes = {DataType::UInt8, DataType::Int8, DataType::Int16, DataType::Int32}; static const std::array s_validMaxAbsTypes = {DataType::UInt8, DataType::Int8, DataType::Int16, DataType::Int32}; static const std::array s_validClzShlTypes = {DataType::Int32}; @@ -242,6 +243,11 @@ bool EthosU55Constraints::SupportedDtypes(OpType opType, DataType ifmType, DataT switch ( opType ) { case OpType::Add: + { + ifmTypes = s_validAddMulTypes; + ofmTypes = s_validAddOfmTypes; + } + break; case OpType::Sub: case OpType::Mul: { -- GitLab