[MLIR][Linalg] Change destination logic in `bubbleUpPackOpThroughGenericOp`.
In `bubbleUpPackOpThroughGenericOp`, we replaced the init operands with a new `tensor.empty` if the operation was a pure element-wise op. This behaviour is not wrong but not ideal because we "break" the original use-def-chain of the output operand by materializing a new `tensor.empty`. We should use `tensor.empty` as a destination *only* if the initial init operand was already a `tensor.empty`, as we do in `PushDownUnpack`. Reviewed By: hanchung Differential Revision: https://reviews.llvm.org/D149250
Loading
Please register or sign in to comment