diff --git a/ethosu/regor/tflite/tflite_supported_operators_u55.cpp b/ethosu/regor/tflite/tflite_supported_operators_u55.cpp index b8d3b77bc5d9c52d6d55b1fabd2c1941409d7051..156f46eee51fbec5d4fdd04806be95c916f16287 100644 --- a/ethosu/regor/tflite/tflite_supported_operators_u55.cpp +++ b/ethosu/regor/tflite/tflite_supported_operators_u55.cpp @@ -101,7 +101,6 @@ TfLiteSupportedOperatorsU55::TfLiteSupportedOperatorsU55(IArchitectureConstraint &TfLiteSupportedOperatorsU55::Constraint32bitOps, &TfLiteSupportedOperatorsU55::ConstraintArgMaxDepth, &TfLiteSupportedOperatorsU55::ConstraintArgMaxAxis, - &TfLiteSupportedOperatorsU55::ConstraintArgMaxOverflow, // TODO: Remove after MLBEDSW-9758: TOSA MaxPool decomp &TfLiteSupportedOperatorsU55::ConstraintKernelStride, &TfLiteSupportedOperatorsU55::ConstraintUnrolledKernelStride, &TfLiteSupportedOperatorsU55::ConstraintMatmul, @@ -429,28 +428,6 @@ bool TfLiteSupportedOperatorsU55::ConstraintArgMaxAxis(const Operation *op) return true; } -// TODO: Remove this constraint when MLBEDSW-9758: decomposition for max pooling has been implemented. -bool TfLiteSupportedOperatorsU55::ConstraintArgMaxOverflow(const Operation *op) -{ - if ( op->Type() != OpType::ArgMax ) - { - return true; - } - auto ifmConn = op->Input(TensorUsage::IFM); - assert(ifmConn); - static constexpr int maxProd = 1 << 16; - const auto &ifmShape = ifmConn->shape; - int w = ifmShape.Size() > 1 ? ifmShape.Width() : 1; - int h = ifmShape.Size() > 2 ? ifmShape.Height() : 1; - if ( w * h > maxProd ) - { - Failure(op, fmt::format("ifmShape: ({}), W * H = {}", ifmShape.ToString(), ifmShape.ElementsWH()), - "The product of IFM width and height must be less than 65536"); - return false; - } - return true; -} - bool TfLiteSupportedOperatorsU55::ConstraintKernelStride(const Operation *op) { const auto kernel = op->Kernel(); diff --git a/ethosu/regor/tflite/tflite_supported_operators_u55.hpp b/ethosu/regor/tflite/tflite_supported_operators_u55.hpp index fe855925121025ef634165b5bb6b59199a3abef2..7e20d316307dcf907693767151d7202528c55fa0 100644 --- a/ethosu/regor/tflite/tflite_supported_operators_u55.hpp +++ b/ethosu/regor/tflite/tflite_supported_operators_u55.hpp @@ -48,7 +48,6 @@ private: bool ConstraintMatmul(const Operation *op); bool ConstraintArgMaxDepth(const Operation *op); bool ConstraintArgMaxAxis(const Operation *op); - bool ConstraintArgMaxOverflow(const Operation *op); // TODO: Remove after MLBEDSW-9758: TOSA MaxPool decomp bool ConstraintTranspose(const Operation *op); bool ConstraintResize(const Operation *op); };