This is an archive of the discontinued LLVM Phabricator instance.

[mlir] Does not bubble up extract slice when it is rank-reducing.

Authored by okkwon on Apr 22 2022, 10:59 AM.



The bubble up logic was written by assuming the slice operation is
always a normal slice that outputs a tensor with the same rank.

Diff Detail

Event Timeline

okkwon created this revision.Apr 22 2022, 10:59 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 22 2022, 10:59 AM
okkwon requested review of this revision.Apr 22 2022, 10:59 AM
mravishankar accepted this revision.Apr 22 2022, 11:02 AM

Small suggestion, otherwise looks good!


You can just check if the sliceop is rank reducing by using sliceOp.getType().getRank() != sliceOp.getSourceType().getRank().

This revision is now accepted and ready to land.Apr 22 2022, 11:02 AM
okkwon updated this revision to Diff 424568.Apr 22 2022, 12:18 PM

address the comment

Thanks Mahesh. Much cleaner!

okkwon marked an inline comment as done.Apr 22 2022, 12:18 PM
This revision was landed with ongoing or failed builds.Apr 22 2022, 12:25 PM
This revision was automatically updated to reflect the committed changes.