Skip to content

Commit

Permalink
Merge pull request #88 from Xilinx/planzase.add_reduce_mean_op
Browse files Browse the repository at this point in the history
Added Reduce Mean Operation
  • Loading branch information
franciscofd authored Sep 19, 2024
2 parents f521f07 + 97d4c52 commit c0c4447
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions include/xten/Dialect/XTenNN/IR/XTenNNOps.td
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit c0c4447

Please sign in to comment.