This is an archive of the discontinued LLVM Phabricator instance.

[mlir][bufferization] Add TensorCopyInsertion pass
ClosedPublic

Authored by springerm on May 27 2022, 3:14 PM.

Details

Summary

This pass runs the One-Shot Analysis to find out which tensor OpOperands must bufferize out-of-place. It then rewrites those tensor OpOperands to explicit allocations with a copy in the form of bufferization.alloc_tensor. The resulting IR can then be bufferized without having to care about read-after-write conflicts.

This change makes it possible to connect One-Shot Analysis to other bufferizations such as the sparse compiler.

Depends On D126572

Diff Detail

Event Timeline

springerm created this revision.May 27 2022, 3:14 PM
springerm requested review of this revision.May 27 2022, 3:14 PM
aartbik accepted this revision.May 27 2022, 3:25 PM
This revision is now accepted and ready to land.May 27 2022, 3:25 PM
This revision was landed with ongoing or failed builds.Jun 9 2022, 12:56 PM
This revision was automatically updated to reflect the committed changes.