diff --git a/mlir/include/mlir/IR/op_base.td b/mlir/include/mlir/IR/op_base.td index 0c6b45b6adf7..581782ff524d 100644 --- a/mlir/include/mlir/IR/op_base.td +++ b/mlir/include/mlir/IR/op_base.td @@ -162,4 +162,11 @@ class BinaryOp props> : class UnaryOp props> : Op, Operands<[Tensor]>, Results<[Tensor]> { + let builder = [{ + static void build(Builder *builder, OperationState *result, + SSAValue *arg) { + result->addOperands({arg}); + result->types.push_back(arg->getType()); + } + }]; }