Skip to content

Commit a07e80c

Browse files
qedawkinsGroverkss
authored andcommitted
[mlir] Fix condition for fusability in consumer fusion API
1 parent b358f21 commit a07e80c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

mlir/lib/Dialect/SCF/Transforms/TileUsingInterface.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1710,7 +1710,8 @@ static FailureOr<OpOperand *> getConsumerFromLoopUses(RewriterBase &rewriter,
17101710
for (OpOperand &opOperand : val.getUses()) {
17111711
Operation *consumerOp = opOperand.getOwner();
17121712
// Step 1. Check if the user is tilable.
1713-
if (!isa<TilingInterface, DestinationStyleOpInterface>(consumerOp)) {
1713+
if (!isa<TilingInterface>(consumerOp) ||
1714+
!isa<DestinationStyleOpInterface>(consumerOp)) {
17141715
// TODO: We have to init result of consumer before scf.for, use
17151716
// DestinationStyleOpInterface to get result shape from init for now. Add
17161717
// support for other op such as op has InferTypeOpInterface.

0 commit comments

Comments
 (0)