Page MenuHomePhabricator

[mlir] Expose MemRef layout in Python bindings

Authored by ftynse on Jan 8 2021, 6:25 AM.



This wasn't possible before because there was no support for affine expressions
as maps. Now that this support is available, provide the mechanism for
constructing maps with a layout and inspecting it.

Rework the get method on MemRefType in Python to avoid needing an explicit
memory space or layout map. Remove the get_num_maps, it is too low-level,
using the length of the now-avaiable pseudo-list of layout maps is more

Depends On D94297

Diff Detail

Event Timeline

ftynse created this revision.Jan 8 2021, 6:25 AM
ftynse requested review of this revision.Jan 8 2021, 6:25 AM
mehdi_amini accepted this revision.Jan 8 2021, 5:26 PM
This revision is now accepted and ready to land.Jan 8 2021, 5:26 PM
This revision was landed with ongoing or failed builds.Jan 11 2021, 10:57 AM
This revision was automatically updated to reflect the committed changes.