diff --git a/mlir/include/mlir/Dialect/Linalg/IR/LinalgInterfaces.td b/mlir/include/mlir/Dialect/Linalg/IR/LinalgInterfaces.td --- a/mlir/include/mlir/Dialect/Linalg/IR/LinalgInterfaces.td +++ b/mlir/include/mlir/Dialect/Linalg/IR/LinalgInterfaces.td @@ -410,6 +410,19 @@ return &this->getOperation()->getOpOperand(getNumInputs() + i); }] >, + InterfaceMethod< + /*desc=*/[{ + Set the `i`-th output operand. + }], + /*retTy=*/"void", + /*methodName=*/"setOutputOperand", + /*args=*/(ins "int64_t":$i, "Value":$value), + /*methodBody=*/"", + /*defaultImplementation=*/[{ + assert(i >= 0 && i < getNumOutputs()); + this->getOperation()->setOperand(getNumInputs() + i, value); + }] + >, InterfaceMethod< /*desc=*/[{ Return the subset of output operands that are of buffer type.