[Mlir-commits] [mlir] [mlir][bufferization] Add tensor-like and memref-like interfaces (PR #134220)

Mehdi Amini llvmlistbot at llvm.org
Thu Apr 3 03:17:13 PDT 2025


joker-eph wrote:

>  So the flow is: users load the dialect 

Well we're talking about the builtin dialect, user never has to load it. Are you talking about something else here?

> Indeed, as we cannot depend on bufferization in builtins, this is done via [external model](https://mlir.llvm.org/docs/Interfaces/#external-models-for-attribute-operation-and-type-interfaces).

Right, but we should never have external interface with a [promise](https://mlir.llvm.org/docs/Interfaces/#external-models-for-attribute-operation-and-type-interfaces) in the first place.
It is interestingly OK here though because the special combination of builtin types (always loaded) and the external interface being attached in the initialization of the pass. This makes it impossible to misuse the pass.
There is still a concern that people using bufferization without reusing the pass as-is will hit silent issues here because the lack of promise won't trigger a failure if they don't attach the model (we should refactor the initialization to be reusable by other bufferization pass using the bufferization infra here I think).


https://github.com/llvm/llvm-project/pull/134220


More information about the Mlir-commits mailing list