[Mlir-commits] [mlir] [mlir][linalg] do not break outs from block argument (PR #73572)

Okwan Kwon llvmlistbot at llvm.org
Tue Nov 28 16:03:21 PST 2023


okkwon wrote:

> We never had a proper discussion of "out" tensor operands in the MLIR community. From a bufferization perspective it is often important that tensor destinations do not change. To make sure that data ends up in the correct buffer. Since this is a bufferization-specific concern, we should ideally not impose such a constraint on op design and rewrite patterns. I've been thinking of using `bufferization.materialize_in_destination` more widely instead...
> 
> Destination style is also using for tiling, but I don't have a clear understanding of how it is used there at the moment.

I'd like to see a separate type, e.g., `tensorref`, to encapsulate tensor buffer just like `iree.hal.buffer` for the outermost wrapper function, which import and export tensors from/to it.

Bufferization might be too late, or some users prefer working on tensors instead of `memref`, so another data reference type for tensor sounds making sense to me.



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


More information about the Mlir-commits mailing list