Page MenuHomePhabricator

[mlir] Require std.alloc() ops to have canonical layout during LLVM lowering.
ClosedPublic

Authored by csigg on Nov 16 2020, 2:42 AM.

Details

Summary

The current code allows strided layouts, but the number of elements allocated is ambiguous. It could be either the number of elements in the shape (the current implementation), or the amount of elements required to not index out-of-bounds with the given maps (which would require evaluating the layout map).

If we require the canonical layouts, the two will be the same.

Diff Detail

Event Timeline

csigg created this revision.Nov 16 2020, 2:42 AM
Herald added a project: Restricted Project. · View Herald Transcript
csigg requested review of this revision.Nov 16 2020, 2:42 AM
nicolasvasilache accepted this revision.Nov 16 2020, 3:02 AM
This revision is now accepted and ready to land.Nov 16 2020, 3:02 AM
ftynse accepted this revision.Nov 16 2020, 5:01 AM

[mlir] Require std.alloc() ops to have canonical layout during LLVM lowering.

Do you mean identity layout? I thought the strided form to be canonical otherwise?