[Mlir-commits] [mlir] [mlir][linalg] Add mixed precision folding pattern in vectorize_children_and_apply_patterns TD Op (PR #148684)
Adam Siemieniuk
llvmlistbot at llvm.org
Wed Jul 16 06:16:54 PDT 2025
adam-smnk wrote:
Thanks for the insights.
I'm fine with either approach (extending this op or a separate `apply_pattern` op). Primarily, I'm trying to figure out if there's any bigger picture or rule of thumb for creating/extending transforms.
> I have some concerns about `transform.structured.vectorize_children_and_apply_patterns` in its current form - it represents just one specific collection of patterns, but it's not necessarily the canonical set IMHO.
Fair enough. Sound like this transform doesn't have any particular design vision.
It became sth of a convenient bag of common patterns.
> One concern is that it implicitly applies populateFoldArithExtensionPatterns, which can make it harder to trace or discover when analysing transformations.
In defense of the proposed change, the transform already applies a lot of rewrites. This addition doesn't particularly go against its "design". Furthermore, this extension is optional so, one knows what to expect (with better option naming 😉).
The naming `vector::populateFoldArithExtensionPatterns` itself is a bit misleading. Today, these patterns only fold arith extension ops into `vector.contract`. They specifically aim to undo the decomposition of numerical casting from mixed precision linalg contraction ops. As such, it somewhat fits thematically as this transform already tries to reconstruct contraction by default.
https://github.com/llvm/llvm-project/pull/148684
More information about the Mlir-commits
mailing list