[Mlir-commits] [mlir] [vector][mlir] Canonicalize to shape_cast where possible (PR #140583)
Oleksandr Alex Zinenko
llvmlistbot at llvm.org
Tue Dec 16 07:41:54 PST 2025
ftynse wrote:
A brief summary of the call:
- There is consensus that patterns rewriting `extract` and `broadcast` to `shape_cast` belong to canonicalization. These can be factored out into a new PR and merged following the usual procedure.
- There is no consensus on `transpose` to `shape_cast` rewriting.
- A specific request is to show why it is undesirable to canonicalize in the other direction, that is, rewrite `shape_cast` into `transpose`. Alternatively, show where having `shape_cast` instead of transpose is beneficial.
- The pattern itself may make sense as part of converting vector to LLVM dialect so it doesn't just sit there.
- We will follow up separately on a collaborative definition of what makes something a canonicalization. Specifically, it was raised that, from systems perspective, it may not be desirable to have rewrites between two equivalent forms without deeming one of those directions canonical.
https://github.com/llvm/llvm-project/pull/140583
More information about the Mlir-commits
mailing list