This is an archive of the discontinued LLVM Phabricator instance.

[mlir] Add folding for tensor inputs and memref.cast in linalg.tiled_loop.
ClosedPublic

Authored by pifon2a on Apr 28 2021, 5:17 AM.

Details

Summary

Tensor inputs, if not used in the body of TiledLoopOp, can be removed.
memref::CastOp can be folded into TiledLoopOp as well.

Diff Detail

Event Timeline

pifon2a created this revision.Apr 28 2021, 5:17 AM
pifon2a requested review of this revision.Apr 28 2021, 5:17 AM
nicolasvasilache accepted this revision.Apr 28 2021, 5:31 AM
This revision is now accepted and ready to land.Apr 28 2021, 5:31 AM
This revision was landed with ongoing or failed builds.Apr 28 2021, 5:36 AM
This revision was automatically updated to reflect the committed changes.
gysit added a subscriber: gysit.Apr 28 2021, 5:49 AM

LGTM!

mlir/lib/Dialect/Linalg/IR/LinalgOps.cpp
179

nit: I think auto should be avoided in these two cases. Exceptions are dyn_cast/cast and long types such as iterators.

2123

I believe this is redundant?