Skip to content

Commit

Permalink
Dont sink when insert_slice
Browse files Browse the repository at this point in the history
Signed-off-by: Ian Wood <ianwood2024@u.northwestern.edu>
  • Loading branch information
IanWood1 authored and MaheshRavishankar committed Dec 18, 2024
1 parent 9c039e6 commit f6c9d1d
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,10 @@ void BubbleUpExpandShapesPass::runOnOperation() {
if (auto consumerLinalgOp = dyn_cast<linalg::LinalgOp>(consumer)) {
return isa<linalg::GenericOp>(consumerLinalgOp) &&
llvm::all_of(consumerLinalgOp.getIteratorTypesArray(),
linalg::isParallelIterator);
linalg::isParallelIterator) &&
!llvm::any_of(consumerLinalgOp->getUsers(), [](Operation *op) {
return llvm::isa<tensor::InsertSliceOp>(op);
});
}
// Fuse in all other cases.
return true;
Expand Down

0 comments on commit f6c9d1d

Please sign in to comment.