This is an archive of the discontinued LLVM Phabricator instance.

[mlir] detensorize: don't accidentally convert function entry blocks
ClosedPublic

Authored by ftynse on Apr 22 2023, 2:02 AM.

Details

Summary

In the Linalg detensorize pass, dialect conversion could accidentally
trigger signature conversion of the function entry block after inlining
the body of a Linalg generic into it. Such a conversion is not desirable
because it would break the internal validity of the function op, that is
futhermore not supposed to be detensorized at the boundary. Mitigate
this by creating a dummy (empty) entry block so Linalg operations are
never inlined into it and the conversion is never triggered.

Closes #62249.

Diff Detail

Event Timeline

ftynse created this revision.Apr 22 2023, 2:02 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 22 2023, 2:02 AM
ftynse requested review of this revision.Apr 22 2023, 2:02 AM
silvas accepted this revision.Apr 24 2023, 10:06 AM

Thanks! This makes sense to me :)

This revision is now accepted and ready to land.Apr 24 2023, 10:06 AM