[Mlir-commits] [mlir] [mlir][bufferization] Convert tensor enconding -> memref layout (PR #161166)

Andrei Golubev llvmlistbot at llvm.org
Mon Sep 29 03:20:07 PDT 2025


andrey-golubev wrote:

There are a couple of things that I don't like and perhaps we can sort them out during review:
* I don't like the test in C++, but it seems somewhat necessary, since I need to patch the dialect registry to use custom encoding / layout are used:
https://github.com/llvm/llvm-project/pull/161166/files#diff-992dd79e0fd3edebb88acda5a05cf9b10aee6186e04ace2cb4b88f0adb196b44R95-R99
  * Can we update dialect registry within a pass (generally, this is not great but I don't have any good option thus far anyway)? Perhaps I could have a test bufferization pass instead that does this prior to calling `bufferizeOp`.
* Having to patch AllocTensorOp. In general, I think the fact that it doesn't go through TensorLikeType::getBufferType() is an oversight. For the sake of the test, however, I'd rather use my own test operations (such as `TestCreateTensorOp` and alike) but Test dialect is **not** available in unit tests right now (I need to make a CMake dependency, and perhaps this also ruins the conceptual idea of these tests?)

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


More information about the Mlir-commits mailing list