[mlir] Add ElementwiseMappable trait and apply it to std elementwise ops.
This patch adds an `ElementwiseMappable` trait as discussed in the RFC here: https://llvm.discourse.group/t/rfc-std-elementwise-ops-on-tensors/2113/23 This trait can power a number of transformations and analyses. A subsequent patch adds a convert-elementwise-to-linalg pass exhibits how this trait allows writing generic transformations. See https://reviews.llvm.org/D90354 for that patch. This trait slightly changes some verifier messages, but the diagnostics are usually about as good. I fiddled with the ordering of the trait in the .td file trait lists to minimize the changes here. Differential Revision: https://reviews.llvm.org/D90731
Loading
Please sign in to comment