This is an archive of the discontinued LLVM Phabricator instance.

[MLIR] Lower `shape.reduce` to `scf.for` only when argument is `tensor<?xindex>`
ClosedPublic

Authored by frgossen on Jul 16 2020, 5:41 AM.

Details

Summary

To make it clear when shape error values cannot occur the shape operations can
operate on extent tensors. This change updates the lowering for shape.reduce
accordingly.

Depends On D83943

Diff Detail

Event Timeline

frgossen created this revision.Jul 16 2020, 5:41 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 16 2020, 5:41 AM
herhut accepted this revision.Jul 16 2020, 6:13 AM

Thanks for cleaning this up!

mlir/lib/Conversion/ShapeToSCF/ShapeToSCF.cpp
146

Can we keep this as partial conversion? Otherwise the pass cannot be applied to inputs that contain other dialects, which sometimes is nice to do.

This revision is now accepted and ready to land.Jul 16 2020, 6:13 AM
frgossen updated this revision to Diff 278456.Jul 16 2020, 6:47 AM
frgossen marked an inline comment as done.

Partial conversion

This revision was automatically updated to reflect the committed changes.