diff --git a/ethosu/regor/architecture/ethosu55/ethos_u55.cpp b/ethosu/regor/architecture/ethosu55/ethos_u55.cpp index f9d30105e7ee59e89e500880f1d174d511faa924..d92b74e7c0e01f8ee627305ad83b8c4acea34ab5 100644 --- a/ethosu/regor/architecture/ethosu55/ethos_u55.cpp +++ b/ethosu/regor/architecture/ethosu55/ethos_u55.cpp @@ -275,7 +275,7 @@ Flags ArchEthosU55::SupportedWeightFormat(OpType) bool ArchEthosU55::UseAvgPoolNop(OpType type) { - return IsActivation(type) || type == OpType::Quantize || type == OpType::MemoryCopy; + return IsActivation(type) || type == OpType::Quantize || type == OpType::MemoryCopy || type == OpType::Reverse; } static bool ChooseKernelMethod(const Shape &ifmShape, int ifmBits, const Kernel *kernel) diff --git a/ethosu/regor/architecture/ethosu55/ethos_u55_constraints.cpp b/ethosu/regor/architecture/ethosu55/ethos_u55_constraints.cpp index 5849e0be313f810703ca9fdbae928d4cb6a18f82..47817262aee4e7aa154c523301defa0982197b28 100644 --- a/ethosu/regor/architecture/ethosu55/ethos_u55_constraints.cpp +++ b/ethosu/regor/architecture/ethosu55/ethos_u55_constraints.cpp @@ -258,6 +258,12 @@ bool EthosU55Constraints::SupportedDtypes(OpType opType, DataType ifmType, DataT } } break; + case OpType::Reverse: + { + validIfmTypes = {DataType::UInt8, DataType::Int8, DataType::Int16}; + validOfmTypes = {DataType::UInt8, DataType::Int8, DataType::Int16}; + } + break; default: assert(false && "Unkown elementwise type"); break; diff --git a/ethosu/regor/tflite/tflite_supported_operators_u55.cpp b/ethosu/regor/tflite/tflite_supported_operators_u55.cpp index 1c9fdc3c5e536eb72e1bffabee249da4dfe90978..56a53d089ae50bd688fc7e67d296cddd1441a31b 100644 --- a/ethosu/regor/tflite/tflite_supported_operators_u55.cpp +++ b/ethosu/regor/tflite/tflite_supported_operators_u55.cpp @@ -216,7 +216,7 @@ bool TfLiteSupportedOperatorsU55::ConstraintResize(const Operation *op) bool TfLiteSupportedOperatorsU55::ConstraintReverse(const Operation *op) { - if ( op->Type() != OpType::Reverse && op->Type() != OpType::ReverseV2 ) + if ( op->Type() != OpType::ReverseV2 ) { return true; }