[Mlir-commits] [mlir] [mlir][tensor] Fold pack and unpack of empty input tensor (PR #92247)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Wed May 15 11:10:07 PDT 2024


MaheshRavishankar wrote:

> Thanks for the feedback. I'll move it to the folder patterns.
> 
> > Also packs have padding semantics. Those need to be accounted for. I think if there is padding you can't do this transformation
> 
> At first I treated packing on empty as mostly UB but I suppose you could materialize it as a valid initialization of a buffer. I'll make the transform more conservative.

This is where you should add this https://github.com/shark-infra/llvm-project/blob/f44eaa13d0c56630791e6484fa3d86a813fa716c/mlir/lib/Dialect/Tensor/Transforms/EmptyOpPatterns.cpp#L98

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


More information about the Mlir-commits mailing list