This is an archive of the discontinued LLVM Phabricator instance.

[mlir][tensor] Remove folding of tensor.extract_slice during tiling
ClosedPublic

Authored by ThomasRaoux on Aug 25 2022, 8:33 AM.

Details

Summary

Blindly folding tensor.extract_slice makes the bufferization
transformation harder. This kind of transformation should happen
separately if needed rather than doing it within makeShape that is
called during tiling.
Also removed makeComposedExtractSliceOp as it is not tested outside of
this code.

Diff Detail

Event Timeline

ThomasRaoux created this revision.Aug 25 2022, 8:33 AM
ThomasRaoux requested review of this revision.Aug 25 2022, 8:33 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 25 2022, 8:33 AM
springerm accepted this revision.Aug 25 2022, 8:34 AM
This revision is now accepted and ready to land.Aug 25 2022, 8:34 AM
nicolasvasilache requested changes to this revision.Aug 25 2022, 11:48 AM

This is a symptom of a deeper issue , let's at least check that @pifon2a is not impacted by this.
The deeper issue is being investigated.

This revision now requires changes to proceed.Aug 25 2022, 11:48 AM
pifon2a accepted this revision.Aug 25 2022, 1:56 PM

@nicolasvasilache That's perfect. Without this change, memory promotion is impossible, because the tiling structure is lost. It is the right direction.

Not related to this patch, but it is concerning that the folding being there or not affects bufferization. It seems like a very tight rope to walk to make sure everything works as expected. I totally understand in terms of priority, making the common case work well is most important (so +1 for this to unblock), but will probably become a concern sooner rather than later.

Not related to this patch, but it is concerning that the folding being there or not affects bufferization. It seems like a very tight rope to walk to make sure everything works as expected. I totally understand in terms of priority, making the common case work well is most important (so +1 for this to unblock), but will probably become a concern sooner rather than later.

Yes I agree, Matthias and Nicolas are aware of it. I still think doing the folding during tiling wasn't a great idea anyway (if anything that should be part of canonicalization)

This revision was not accepted when it landed; it landed in state Needs Revision.Aug 26 2022, 7:39 AM
This revision was automatically updated to reflect the committed changes.