Page MenuHomePhabricator

[mlir] Fix subview verifier.

Authored by nicolasvasilache on Jan 24 2021, 12:28 PM.



The subview verifier in the rank-reduced case is plainly skipping verification
when the resulting type is a memref with empty affine map. This is generally incorrect.

Instead, form the actual expected rank-reduced MemRefType that takes into account the projections of 1's dimensions. Then, check the canonicalized expected rank-reduced type against the canonicalized candidate type.

Diff Detail

Event Timeline

nicolasvasilache requested review of this revision.Jan 24 2021, 12:28 PM
Herald added a project: Restricted Project. · View Herald TranscriptJan 24 2021, 12:28 PM
ftynse accepted this revision.Jan 25 2021, 1:24 AM
ftynse added inline comments.

Overly eager replacement?

This revision is now accepted and ready to land.Jan 25 2021, 1:24 AM
This revision was automatically updated to reflect the committed changes.