This is an archive of the discontinued LLVM Phabricator instance.

[MLIR][Shape] Lower `shape.shape_of` to standard dialect
ClosedPublic

Authored by frgossen on Jun 18 2020, 7:50 AM.

Details

Summary

Lower shape.shape_of to standard dialect.
This lowering supports statically and dynamically shaped tensors.
Support for unranked tensors will be added soon.

Diff Detail

Event Timeline

frgossen created this revision.Jun 18 2020, 7:50 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 18 2020, 7:50 AM
rriddle added inline comments.Jun 18 2020, 10:02 AM
mlir/lib/Conversion/ShapeToStandard/ShapeToStandard.cpp
55

nit: Remove this newline.

herhut accepted this revision.Jun 19 2020, 2:05 AM
herhut added inline comments.
mlir/lib/Conversion/ShapeToStandard/ShapeToStandard.cpp
76

The lowering for unranked tensors will need a look, so it will be target scf. How about splitting this pattern in two and make this one fail early for unranked?

This revision is now accepted and ready to land.Jun 19 2020, 2:05 AM
frgossen updated this revision to Diff 272078.Jun 19 2020, 7:59 AM
frgossen marked 2 inline comments as done.

Address comments

This revision was automatically updated to reflect the committed changes.