This is an archive of the discontinued LLVM Phabricator instance.

[mlir][Linalg] Fix subview size used within Linalg Tiling pass.
AbandonedPublic

Authored by mravishankar on Aug 11 2020, 2:03 PM.

Details

Summary

The subview size for a tiled dimension is currently minimum of :

  • tile size
  • size of the base operand along that dimension - offset along that dimension. A third value is also to be considered :
  • size of the base operand along that dimension

    The actual subview size should be a minum of all the three. Without this when size of the base operand along that dimension is smaller than the tile size used the subview size is unnecessarily large. This causes issues when using the size of the subview to allocate buffer used during promotion of subviews.

Diff Detail

Event Timeline

mravishankar created this revision.Aug 11 2020, 2:03 PM
mravishankar requested review of this revision.Aug 11 2020, 2:03 PM
mravishankar added a reviewer: bondhugula.

Updating the patch with some changes to make sure that the allocation size bound computation works with addition of the affine.min operation

bondhugula added inline comments.Aug 18 2020, 5:39 AM
mlir/lib/Dialect/Affine/Utils/Utils.cpp
181

Missing doc comment.

182–186

You can just do if (... = value.getDefiningOp<AffineMinOp>()).

bondhugula resigned from this revision.Aug 19 2020, 3:45 PM
mravishankar abandoned this revision.Oct 12 2020, 10:11 PM