This is an archive of the discontinued LLVM Phabricator instance.

[mlir][Linalg] Bufferize the region of LinalgOps as well.
ClosedPublic

Authored by mravishankar on Dec 7 2021, 11:24 PM.

Details

Summary

The region of linalg.generic might contain tensor operations. For
example, current lowering of gather uses a tensor.extract in the
body of the LinalgOp. Bufferize the ops within a LinalgOp region
as well to catch such cases.

Diff Detail

Event Timeline

mravishankar created this revision.Dec 7 2021, 11:24 PM
mravishankar requested review of this revision.Dec 7 2021, 11:24 PM
springerm accepted this revision.Dec 8 2021, 4:28 PM
springerm added inline comments.
mlir/lib/Dialect/Linalg/ComprehensiveBufferize/LinalgInterfaceImpl.cpp
97

The name of this function is bit unfortunate. Operation::getBlock returns the surrounding block, but this function returns the nested block.

This revision is now accepted and ready to land.Dec 8 2021, 4:28 PM
This revision was landed with ongoing or failed builds.Dec 8 2021, 10:36 PM
This revision was automatically updated to reflect the committed changes.