[Mlir-commits] [mlir] [mlir][linalg] Add mixed precision folding pattern in vectorize_children_and_apply_patterns TD Op (PR #148684)
Rolf Morel
llvmlistbot at llvm.org
Wed Jul 16 09:14:02 PDT 2025
rolfmorel wrote:
Here's my drive-by suggestion (which could be done in a follow-up PR as there isn't really anything wrong with the current PR, seeing as it keeps to an existing way of adding more patterns):
Merge `transform.structured.vectorize_children_and_apply_patterns` into `transform.structured.vectorize` modifying the latter to have (something like) the following syntax:
```
`transform.structured.vectorize`
(`children_of`)?
$target
(`vectorize_nd_extract`)?
(`flatten_1d_depthwise_conv`)?
oilist(`vector_sizes` custom<DynamicIndexList>($vector_sizes, $static_vector_sizes, $scalable_sizes))
(`with_patterns` $with_patterns)? attr-dict `:` functional-type(operands, results)
```
where we could choose that the `children_of` UnitAttr cannot be specified alongside `vector_sizes`.
`$with_patterns` would be an optional region where users could hook in their (TD-exposed) patterns, so as to make sure they run in the same rewriting fixpoint. In case we want to have that certain patterns are on by default (e.g. `transform.apply_patterns.vector.multi_reduction_to_contract` and `transform.apply_patterns.vector.multi_reduction_to_contract_patterns`) we could even go so far as to add
```
(`without_patterns` $without_patterns)?
```
where you specify that these certain "without" patterns _shouldn't_ be added.
Just my two cents.
https://github.com/llvm/llvm-project/pull/148684
More information about the Mlir-commits
mailing list