[Mlir-commits] [mlir] [mlir][bufferization] Fix OneShotBufferize when `defaultMemorySpaceFn` is used (PR #91524)

Matthias Springer llvmlistbot at llvm.org
Mon May 20 03:34:00 PDT 2024


================
@@ -496,7 +501,8 @@ def Bufferization_ToMemrefOp : Bufferization_Op<"to_memref", [
     Pure,
     TypesMatchWith<"type of 'tensor' is the tensor equivalent of 'memref'",
                    "memref", "tensor",
-                   "memref::getTensorTypeFromMemRefType($_self)">
+                   "memref::getTensorTypeFromMemRefType($_self)",
+                   "bufferization::detail::tensorTypesMatchUpToEncoding">
----------------
matthias-springer wrote:

I think you can use `AllShapesMatch` and `AllElementTypesMatch` instead of `tensorTypesMatchUpToEncoding`.

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


More information about the Mlir-commits mailing list