diff --git a/mlir/lib/Dialect/Linalg/IR/LinalgOps.cpp b/mlir/lib/Dialect/Linalg/IR/LinalgOps.cpp --- a/mlir/lib/Dialect/Linalg/IR/LinalgOps.cpp +++ b/mlir/lib/Dialect/Linalg/IR/LinalgOps.cpp @@ -1453,7 +1453,8 @@ template static void printCommonStructuredOpParts(OpAsmPrinter &p, NamedStructuredOpType op) { - p << " ins(" << op.inputs() << " : " << op.inputs().getTypes() << ")"; + if (!op.inputs().empty()) + p << " ins(" << op.inputs() << " : " << op.inputs().getTypes() << ")"; if (!op.output_buffers().empty()) p << " outs(" << op.output_buffers() << " : " << op.output_buffers().getTypes() << ")";