[Mlir-commits] [mlir] [mlir][linalg] Extend elementwise (PR #124661)
Rolf Morel
llvmlistbot at llvm.org
Mon Feb 3 06:25:39 PST 2025
================
@@ -551,6 +551,122 @@ def BroadcastOp : LinalgStructuredBase_Op<"broadcast", [
let hasCanonicalizer = 1;
}
+//===----------------------------------------------------------------------===//
+// Op definition for ElementwiseOp
+//===----------------------------------------------------------------------===//
+def ElementwiseOp : LinalgStructuredBase_Op<"elementwise", [
+ AttrSizedOperandSegments]> {
+ let summary = [{ Performs element-wise operation }];
+ let description = [{
+ Linalg op form which performs element-wise computation.
+
+ The attribute `kind` describes the operation (e.g. add, exp). The operation
+ kind can be any elementwise nary (e.g. unary, binary) operation.
+
+ Affine-maps for operands and result are required to be provided by the user
+ when transpose and/or broadcast is needed on any operand. When a map is not
----------------
rolfmorel wrote:
nit: when _a_ transpose ...
https://github.com/llvm/llvm-project/pull/124661
More information about the Mlir-commits
mailing list