[Mlir-commits] [mlir] [mlir] Re-land Loosen restrictions on folding dynamic reshapes (PR #142827)
Ian Wood
llvmlistbot at llvm.org
Fri Jun 13 10:09:22 PDT 2025
IanWood1 wrote:
I'd argue `tensor.collapse_shape %op [] : tensor<?x?x?xf32> into tensor<f32>` is better simply because its the status quo (not a very good reason). The current implementation ensures the invariant that `size(reassociation) == rank(source)` but the other ensures `num_elems(reassociation) == rank(dst)` but I'm not sure which is more important.
Also, @AGindinson my bad with the incorrect test I added. I forgot an empty reassociation is the correct representation for scalar reshapes.
https://github.com/llvm/llvm-project/pull/142827
More information about the Mlir-commits
mailing list