[Mlir-commits] [mlir] [mlir][bufferization] `MaterializeInDestinationOp`: Support memref destinations (PR #68074)

Matthias Springer llvmlistbot at llvm.org
Fri Oct 6 03:35:20 PDT 2023


================
@@ -172,7 +172,7 @@ func.func @materialize_in_destination_aliasing(%t: tensor<?xf32>, %p1: index, %p
   %dest = tensor.extract_slice %t[%p2][5][1] : tensor<?xf32> to tensor<5xf32>
   // CHECK: bufferization.materialize_in_destination
   // CHECK-SAME: {__inplace_operands_attr__ = ["true", "true"]}
-  %r = bufferization.materialize_in_destination %src in %dest : tensor<5xf32>
+  %r = bufferization.materialize_in_destination %src in %dest : (tensor<5xf32>, tensor<5xf32>) -> tensor<5xf32>
----------------
matthias-springer wrote:

This is because the result is optional. In case of a `memref`, there is no result (like `linalg.generic`). TableGen helpers such as `AllTypesMatch` etc. do not work with that. I could write the printer/parser in C++ though, then we could stay with the original syntax.

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


More information about the Mlir-commits mailing list