This is an archive of the discontinued LLVM Phabricator instance.

[mlir][linalg][bufferize] Support tensor.generate
ClosedPublic

Authored by springerm on Jan 20 2022, 3:47 AM.

Details

Summary

This is mostly a copy of the existing tensor.generate bufferization. Once TensorInterfaceImpl.cpp is moved to the tensor dialect, the existing rewrite pattern can be deleted.

Diff Detail

Event Timeline

springerm created this revision.Jan 20 2022, 3:47 AM
springerm requested review of this revision.Jan 20 2022, 3:47 AM
nicolasvasilache requested changes to this revision.Jan 24 2022, 1:49 AM

Summary of offline discussion: this is propagating a bad lowering that jumps abtraction gaps too quickly and also decides to introduce parallel semantics.
In the longer run there should be a memref.generate of something similar so that bufferization is simple and orthogonal from lowering to loops.
Note that linalg.generic with index semantics would be a better abstraction here.

For now we can just hook into existing code and add TODOs + warnings that this will need to be deprecated.

This revision now requires changes to proceed.Jan 24 2022, 1:49 AM
This revision is now accepted and ready to land.Jan 25 2022, 12:53 AM
This revision was landed with ongoing or failed builds.Jan 25 2022, 5:19 AM
This revision was automatically updated to reflect the committed changes.