Remove output number restriction in flatbuffer importer
CallOnce op and other resource operators can have zero output.
PiperOrigin-RevId: 379396505
Change-Id: I450677fc4174558adde474b09e346a8f2a67dea9
diff --git a/tensorflow/compiler/mlir/lite/flatbuffer_import.cc b/tensorflow/compiler/mlir/lite/flatbuffer_import.cc
index fe8f88c..f06170f 100644
--- a/tensorflow/compiler/mlir/lite/flatbuffer_import.cc
+++ b/tensorflow/compiler/mlir/lite/flatbuffer_import.cc
@@ -653,11 +653,6 @@
llvm::SmallVector<Value, 4> operands;
llvm::SmallVector<mlir::Type, 2> outputTypes;
- if (op.outputs.empty()) {
- auto err = errors::InvalidArgument("operator with no outputs");
- return emitError(loc, err.ToString()), err;
- }
-
const tflite::OperatorCodeT& op_code = *op_codes.at(op.opcode_index);
TF_ASSIGN_OR_RETURN(const std::string op_name, GetMlirOpName(op, op_code));