This is an archive of the discontinued LLVM Phabricator instance.

[mlir][vector] Fix double rank reducing folding bug
ClosedPublic

Authored by antiagainst on Sep 30 2022, 12:31 PM.

Details

Summary

In https://reviews.llvm.org/D133883, we changed the
FoldExtractSliceIntoTransferRead pattern from requiring
full identity map to minor identity map. This effectively
allows rank reducing vector.transfer_read ops. However,
the logic for checking tensor.extract_slice rank reducing
still looks at the vector rank, which now could be smaller
than the tensor.extract_slice's output tensor rank.
It ends up we can have incorrect index cacluation after
folding due to this double rank reducing behavior.

Diff Detail

Event Timeline

antiagainst created this revision.Sep 30 2022, 12:31 PM
Herald added a project: Restricted Project. · View Herald Transcript
antiagainst requested review of this revision.Sep 30 2022, 12:31 PM
ThomasRaoux accepted this revision.Sep 30 2022, 1:44 PM
This revision is now accepted and ready to land.Sep 30 2022, 1:44 PM
This revision was automatically updated to reflect the committed changes.