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

Andrei Golubev llvmlistbot at llvm.org
Mon Apr 7 01:26:58 PDT 2025


andrey-golubev wrote:

Ok, so for interface attachment: leave as it is now - dialect initialization would attach tensor-like / memref-like for builtins (so my unawareness turned out to be a good thing, huh). 

> Caveat: Alex noticed that the bufferization dialect isn't a dependency of the actual bufferization.

If in terms of the pass, is it true though? It seems to just be added in the C++ definition of the pass (according to Matthias).

As an aside, should I move:
```cpp
  void getDependentDialects(DialectRegistry &registry) const override {
    registry
        .insert<bufferization::BufferizationDialect, memref::MemRefDialect>();
  }
```
into tablegen though? Is there a strong preference to keep this in C++ (e.g. include dependencies)?

> And improve the op verifiers to check that the operands/results implement the new type interfaces.

My plan so far is to switch over to "MemRefLike" / "TensorLike" in the operands / results. I guess this way we don't need to change much (verification related) as the "signature" would require types to implement the new interfaces?

---
I'll proceed with test restructuring as suggested by Alex for now. Then, I guess, that's about it?

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


More information about the Mlir-commits mailing list