Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MLIR][TilingInterface] Extend consumer fusion for multi-use of producer shared by terminator ops #110105

Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions mlir/lib/Dialect/SCF/Transforms/TileUsingInterface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1488,8 +1488,6 @@ static FailureOr<OpOperand *> getConsumerFromUses(Value val,
Operation *consumerOp = opOperand.getOwner();
if (isa<scf::YieldOp, tensor::ParallelInsertSliceOp>(consumerOp))
continue;
if (operand && *operand != opOperand)
return failure();
// TODO: We have to init result of consumer before scf.for, use
Abhishek-Varma marked this conversation as resolved.
Show resolved Hide resolved
// DestinationStyleOpInterface to get result shape from init for now.
// Add support for other op such as op has InferTypeOpInterface.
Expand All @@ -1501,7 +1499,9 @@ static FailureOr<OpOperand *> getConsumerFromUses(Value val,
operand = &opOperand;
}

return operand;
if (operand)
return operand;
return failure();
}

/// Find the perfectly nested loops outside of given loop(included) sorted from
Expand Down
Loading