[Mlir-commits] [mlir] [mlir][vector] Add vector.transpose with unit-dim to vector.shape_cast pattern (PR #72105)

Quinn Dawkins llvmlistbot at llvm.org
Wed Nov 22 17:01:31 PST 2023


qedawkins wrote:

The way I'm thinking about transpose is that in addition to moving data, it does a structured transformation of the metadata (type). Shape cast asserts no data movement, but is relatively unstructured in terms of how the metadata is being transformed. I might be conflating layers of the stack too much with this, but there is a reason we wouldn't opt to canonicalize a `linalg.transpose` of just unit dimensions as a `tensor.reshape`; it makes it hard to compare iteration spaces of neighboring linalg ops. We might opt to do that rewrite as an optimization later on though.

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


More information about the Mlir-commits mailing list