diff --git a/include/xten/Dialect/XTenNN/IR/XTenNNOps.td b/include/xten/Dialect/XTenNN/IR/XTenNNOps.td index b15519d5..3a43d375 100644 --- a/include/xten/Dialect/XTenNN/IR/XTenNNOps.td +++ b/include/xten/Dialect/XTenNN/IR/XTenNNOps.td @@ -562,4 +562,21 @@ def XtenNN_ConvTransposeOp: XTenNN_Op<"ConvTranspose",[Pure, TosaExtension]> { let assemblyFormat = [{ operands attr-dict `:` functional-type(operands, results) }]; } +def XtenNN_ReduceMeanOp: XTenNN_Op<"reduce_mean", [Pure, TosaExtension]> { + let summary = "Reduce Mean operation"; + let description = [{ + This operation is equivalent to `onnx.ReduceMean` and computes the mean of + the input tensor's elements along the provided axes. + }]; + let arguments = (ins + AnyRankedTensor:$input, + DenseI64ArrayAttr:$axes, + I64Attr:$keepdims + ); + let results = (outs + AnyRankedTensor:$output + ); + let assemblyFormat = [{ operands attr-dict `:` functional-type(operands, results) }]; +} + #endif // XTENNN_OPS