This is an archive of the discontinued LLVM Phabricator instance.

[MLIR][Shape] Lower `shape.get_extent` to `std.dim` when possible
ClosedPublic

Authored by frgossen on Jun 26 2020, 5:03 AM.

Details

Summary

When the shape is derived from a tensor argument the shape extent can be derived
directly from that tensor with std.dim.
This lowering pattern circumvents the necessity to materialize the shape in
memory.

Diff Detail

Event Timeline

frgossen created this revision.Jun 26 2020, 5:03 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 26 2020, 5:03 AM
herhut accepted this revision.Jun 26 2020, 5:13 AM

Neat!

This revision is now accepted and ready to land.Jun 26 2020, 5:13 AM
This revision was automatically updated to reflect the committed changes.