[Mlir-commits] [mlir] [mlir] Declare promised interfaces for all dialects (PR #78368)

Benjamin Kramer llvmlistbot at llvm.org
Mon Mar 18 10:42:14 PDT 2024


d0k wrote:

> > it also makes it impossible to mix and match bufferization interface implementations, which users actually do.
> 
> What does this means?

Right now you can use parts of bufferization. Like bufferizing my custom dialect but don't bufferize all of the other MLIR dialects (which comes with its own assumptions on Tensors and MemRefs). After this change you're forced to load all the bufferization interfaces for all the ops, which breaks this use case.

> > but the bufferization dialect changes seem to be fundamentally incompatible with MLIR's design and tightly couple things that shouldn't be coupled.
> 
> Can you clarify where do you see a coupling right now?

It couples Tensor to Bufferization and to Transform dialect. While technically this can be made a header-only dependency (right now it's not), I really dislike this from a design standpoint. MLIR is meant to be used as parts and now there's a dependency between dialects that are meant to be independent. I like the intention of making interfaces less fragile to use, but the point of having the external interfaces in the first place is allowing us to have weaker coupling.

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


More information about the Mlir-commits mailing list