Page MenuHomePhabricator

[mlir][linalg][bufferize][NFC] Call `bufferize` on all bufferizable ops

Authored by springerm on Nov 16 2021, 9:54 PM.



Call this function even on ops that do not have tensor OpOperands/OpResults.

Depends On D114055

Diff Detail

Event Timeline

springerm created this revision.Nov 16 2021, 9:54 PM
springerm requested review of this revision.Nov 16 2021, 9:54 PM
This revision is now accepted and ready to land.Nov 17 2021, 12:21 AM

It isn't obvious to me that this is NFC?

It isn't obvious to me that this is NFC?

For the current interface implementations, this change is NFC. Before this change, it was guaranteed that the bufferize method was never called on ops that do not need bufferization (because they have no tensor results/operands). After this change, bufferize is called for every bufferizable op. If there is no work to do, the interface method simply returns success. This is in preparation of changing the way that operations are traversed in one of the subsequent commits.

I'll update the commit message when landing this change.

Note, I may change this back to the original behavior again later. This change is mostly to keep the commits small during an overall larger refactoring.