[Mlir-commits] [mlir] [mlir][linalg] Expose getPreservedProducerResults method from ElementwiseOpFusion file (PR #73850)
Amir Bishara
llvmlistbot at llvm.org
Wed Nov 29 23:58:15 PST 2023
================
@@ -493,6 +493,8 @@ LogicalResult dropUnitDims(RewriterBase &rewriter, GenericOp genericOp,
struct ElementwiseOpFusionResult {
Operation *fusedOp;
llvm::DenseMap<Value, Value> replacements;
+ static llvm::SmallDenseSet<int>
----------------
amirBish wrote:
I think this is one of the examples. However, in the code above this is not the only check.
For example if one of the inits/output operands is being used within the payload Its suited result would also be preserved.
So, changing the logic that you're deciding about which producer's results to preserve, may change my precondition of applying the fusion or not
https://github.com/llvm/llvm-project/pull/73850
More information about the Mlir-commits
mailing list