Skip to content

Commit fccf8cc

Browse files
IanWood1keshavvinayak01
authored andcommitted
[Dispatch] Fix return in multiuse fusion (iree-org#21536)
Use `continue` instead of `return` because the consumer can still be fused with other producers even if one is a bit extend/truncate. From iree-org#21524 (comment) Signed-off-by: Ian Wood <[email protected]> Signed-off-by: keshavvinayak01 <[email protected]>
1 parent 3748970 commit fccf8cc

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

compiler/src/iree/compiler/DispatchCreation/FuseMultiUseElementwiseProducer.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -202,14 +202,14 @@ static FailureOr<unsigned> fuseMultiUseProducers(
202202
// by cloning the producer instead of multi-use fusion.
203203
if (!options.intraDispatch &&
204204
IREE::LinalgExt::isBitExtendOp(producer)) {
205-
return;
205+
continue;
206206
}
207207

208208
// 8. Skip bit-truncate-like `producer` ops as we would rather fuse
209209
// these operations with their producers.
210210
if (!options.intraDispatch &&
211211
IREE::LinalgExt::isBitTruncateOp(producer)) {
212-
return;
212+
continue;
213213
}
214214

215215
// 9. All uses from `producer` -> `consumer` need to be fusable.
@@ -225,8 +225,9 @@ static FailureOr<unsigned> fuseMultiUseProducers(
225225
fusableProducer = producer;
226226
break;
227227
}
228-
if (!fusableProducer)
228+
if (!fusableProducer) {
229229
return;
230+
}
230231

231232
// If the `genericOp` is already part of a fusion group, just add the
232233
// the `fusableProducer` to the same group.

0 commit comments

Comments
 (0)