[Mlir-commits] [mlir] [vector][mlir] Canonicalize to shape_cast where possible (PR #140583)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Mon Nov 3 16:52:25 PST 2025


MaheshRavishankar wrote:

Thank you @banach-space for summarizing the discussion. I think I vehemently agree with this 

> Ultimately, this PR is about agreeing on the canonical form. My view remains that operations not requiring data movement should canonicalise to vector.shape_cast, which helps solidify its semantics and keeps the model consistent. However, in the absence of a clear technical criterion (“energy function”) for preferring one form over another, much of this comes down to preference.

> Both Diego and I support this change, but there is still disagreement on whether it qualifies as canonical (***). @ftynse 's talk on “Normal Forms for MLIR” from last week (****) offers a promising direction, but we’ll likely need to wait for Alex to implement it and propose an RFC. While that means progress here may pause for now, this discussion has helped clarify the underlying principles.

Specifically

> However, in the absence of a clear technical criterion (“energy function”) for preferring one form over another, much of this comes down to preference.

is a nice formulation of the problem. 



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


More information about the Mlir-commits mailing list