This is an archive of the discontinued LLVM Phabricator instance.

[mlir] Move bufferization-related passes to `bufferization` dialect.
ClosedPublic

Authored by pifon2a on Nov 29 2021, 4:37 AM.

Diff Detail

Event Timeline

pifon2a created this revision.Nov 29 2021, 4:37 AM
pifon2a requested review of this revision.Nov 29 2021, 4:37 AM
Herald added a project: Restricted Project. · View Herald TranscriptNov 29 2021, 4:37 AM
pifon2a updated this revision to Diff 390306.Nov 29 2021, 4:42 AM

Update the names of the ops.

pifon2a updated this revision to Diff 390307.Nov 29 2021, 4:45 AM
  1. The first line is used as subject, next lines as comment. #

Update

mehdi_amini added inline comments.Nov 29 2021, 4:20 PM
mlir/lib/Dialect/StandardOps/Transforms/TensorConstantBufferize.cpp
123

Seems like passes like this one stay in the existing dialect?

Looking at these, isn't it hinting at a missing opinterface to hook these into a unique bufferization pass living in the bufferization dialect?

springerm accepted this revision.Nov 29 2021, 4:27 PM

Looks good to me. What about the actual bufferization passes. Like -tensor-bufferize. Will these stay in their respective dialect or are they also getting moved here?

This revision is now accepted and ready to land.Nov 29 2021, 4:27 PM

@mehdi_amini @springerm Yes, the passes like tensor-bufferize will stay in their dialects. It might be possible to reuse BufferizableOpInterface for the "gradual" bufferization instead of using the patterns. I think that this is how these two bufferization approaches will converge in the end.

@mehdi_amini @springerm Yes, the passes like tensor-bufferize will stay in their dialects. It might be possible to reuse BufferizableOpInterface for the "gradual" bufferization instead of using the patterns. I think that this is how these two bufferization approaches will converge in the end.

I am confused by your answer: tensor-buffering isn’t part of the gradual bufferization right now?

@mehdi_amini @springerm Yes, the passes like tensor-bufferize will stay in their dialects. It might be possible to reuse BufferizableOpInterface for the "gradual" bufferization instead of using the patterns. I think that this is how these two bufferization approaches will converge in the end.

I am confused by your answer: tensor-buffering isn’t part of the gradual bufferization right now?

It is a part of gradual bufferization. And the passes for gradual bufferization live in their corresponding dialects. You mentioned that it indicates that there might be an interface missing to just have a single bufferization pass. I agree and I think this interface already exists and it is used in comprehensive bufferization. We might want to reuse it.

@mehdi_amini @springerm Yes, the passes like tensor-bufferize will stay in their dialects. It might be possible to reuse BufferizableOpInterface for the "gradual" bufferization instead of using the patterns. I think that this is how these two bufferization approaches will converge in the end.

I am confused by your answer: tensor-buffering isn’t part of the gradual bufferization right now?

It is a part of gradual bufferization. And the passes for gradual bufferization live in their corresponding dialects. You mentioned that it indicates that there might be an interface missing to just have a single bufferization pass. I agree and I think this interface already exists and it is used in comprehensive bufferization. We might want to reuse it.

Thanks for clarifying!