1 Commits

Author SHA1 Message Date
Rolf Morel
94cf80d6fd
[MLIR][Linalg] Pattern to fold AddOp to accumulation via contraction op's dest (#110514)
Replaces a linalg.add with one operand the single user of a contraction,
which has a zero-filled, "identity-mapped" destination and is dominated
by the `other` operand, by the contraction with `other` as its dest.

Benefits include elision of an elementwise op, namely the linalg.add,
and removing a tensor.empty as a destination which is likely to require
an allocation upon bufferization.
2024-10-03 12:22:57 +02:00