diff --git a/ethosu/regor/compiler/scheduler_decompose.cpp b/ethosu/regor/compiler/scheduler_decompose.cpp index cd20398710d4fe079ec2939322bea9e1baece4dc..19e7b64dd8d226abb8fcbd367de7fce207d0376b 100644 --- a/ethosu/regor/compiler/scheduler_decompose.cpp +++ b/ethosu/regor/compiler/scheduler_decompose.cpp @@ -270,6 +270,7 @@ bool CanDecompose(Architecture *, const SchedulerOperation *schedOp) if ( schedOp->Type() == OpType::AvgPool ) return true; if ( schedOp->Type() == OpType::MaxPool ) return true; if ( schedOp->Type() == OpType::Resize ) return true; + if ( schedOp->Type() == OpType::FullyConnected ) return true; return false; } diff --git a/ethosu/regor/compiler/scheduler_packing.cpp b/ethosu/regor/compiler/scheduler_packing.cpp index 9d0e651cc6e3baf7da28e26c4bc82ef1ecaa384d..8d341976b2f1272c1f4784ee821c8def31da79d2 100644 --- a/ethosu/regor/compiler/scheduler_packing.cpp +++ b/ethosu/regor/compiler/scheduler_packing.cpp @@ -738,6 +738,8 @@ std::vector> SchedulerPacking::DecomposeSche switch ( op->Type() ) { + case OpType::FullyConnected: + [[fallthrough]]; case OpType::Conv2D: result = DecomposeConv2D(_arch, std::move(op)); break; diff --git a/ethosu/regor/tflite/tflite_supported_operators.cpp b/ethosu/regor/tflite/tflite_supported_operators.cpp index 1618a396267b0fbf29ab9aed09d3ae332d341c84..3e5f505c7d6e6baf1062f2f29b788e5f830d5eea 100644 --- a/ethosu/regor/tflite/tflite_supported_operators.cpp +++ b/ethosu/regor/tflite/tflite_supported_operators.cpp @@ -207,18 +207,6 @@ bool TfLiteSupportedOperators::ConstraintFCWeightShape(const Operation *op) return false; } - // IC and OC must be smaller than 2^16 - // TODO MLBEDSW-10739: Decompose FullyConnected - if ( shape[0] > (1 << 16) ) - { - Failure(op, fmt::format("Output channels: {}", shape[0]), "Output channels must be less than 2^16"); - return false; - } - if ( shape[-1] > (1 << 16) ) - { - Failure(op, fmt::format("Input channels: {}", shape[-1]), "Input channels must be less than 2^16"); - return false; - } return true; }