Skip to content

Commit

Permalink
Dont sink when insert_slice
Browse files Browse the repository at this point in the history
  • Loading branch information
IanWood1 committed Nov 13, 2024
1 parent 7bd88a7 commit b9ba438
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,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 b9ba438

Please sign in to comment.