[Mlir-commits] [mlir] [MLIR][Linalg][Transform] Expose more args in VectorizeChildren[...] op's Python bindings (PR #166134)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Mon Nov 3 00:48:39 PST 2025


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-mlir

Author: Tuomas Kärnä (tkarna)

<details>
<summary>Changes</summary>

Expose missing boolean arguments in `VectorizeChildrenAndApplyPatternsOp` Python bindings.

---
Full diff: https://github.com/llvm/llvm-project/pull/166134.diff


2 Files Affected:

- (modified) mlir/python/mlir/dialects/transform/structured.py (+4) 
- (modified) mlir/test/python/dialects/transform_structured_ext.py (+8) 


``````````diff
diff --git a/mlir/python/mlir/dialects/transform/structured.py b/mlir/python/mlir/dialects/transform/structured.py
index 14c7380e432f0..d9ab504f0de54 100644
--- a/mlir/python/mlir/dialects/transform/structured.py
+++ b/mlir/python/mlir/dialects/transform/structured.py
@@ -713,6 +713,8 @@ def __init__(
         disable_transfer_permutation_map_lowering_patterns: bool = False,
         vectorize_nd_extract: bool = False,
         vectorize_padding: bool = False,
+        flatten_1d_depthwise_conv: bool = False,
+        fold_type_extensions_into_contract: bool = False,
         loc=None,
         ip=None,
     ):
@@ -722,8 +724,10 @@ def __init__(
             target,
             disable_multi_reduction_to_contract_patterns=disable_multi_reduction_to_contract_patterns,
             disable_transfer_permutation_map_lowering_patterns=disable_transfer_permutation_map_lowering_patterns,
+            flatten_1d_depthwise_conv=flatten_1d_depthwise_conv,
             vectorize_nd_extract=vectorize_nd_extract,
             vectorize_padding=vectorize_padding,
+            fold_type_extensions_into_contract=fold_type_extensions_into_contract,
             loc=loc,
             ip=ip,
         )
diff --git a/mlir/test/python/dialects/transform_structured_ext.py b/mlir/test/python/dialects/transform_structured_ext.py
index d6b70dc9d1978..68a61fd0291d2 100644
--- a/mlir/test/python/dialects/transform_structured_ext.py
+++ b/mlir/test/python/dialects/transform_structured_ext.py
@@ -627,6 +627,8 @@ def testVectorizeChildrenAndApplyPatternsAllAttrs(target):
         disable_transfer_permutation_map_lowering_patterns=True,
         vectorize_nd_extract=True,
         vectorize_padding=True,
+        flatten_1d_depthwise_conv=True,
+        fold_type_extensions_into_contract=True,
     )
     # CHECK-LABEL: TEST: testVectorizeChildrenAndApplyPatternsAllAttrs
     # CHECK: transform.sequence
@@ -635,6 +637,8 @@ def testVectorizeChildrenAndApplyPatternsAllAttrs(target):
     # CHECK-SAME: disable_transfer_permutation_map_lowering_patterns
     # CHECK-SAME: vectorize_nd_extract
     # CHECK-SAME: vectorize_padding
+    # CHECK-SAME: flatten_1d_depthwise_conv
+    # CHECK-SAME: fold_type_extensions_into_contract
 
 
 @run
@@ -646,6 +650,8 @@ def testVectorizeChildrenAndApplyPatternsNoAttrs(target):
         disable_transfer_permutation_map_lowering_patterns=False,
         vectorize_nd_extract=False,
         vectorize_padding=False,
+        flatten_1d_depthwise_conv=False,
+        fold_type_extensions_into_contract=False,
     )
     # CHECK-LABEL: TEST: testVectorizeChildrenAndApplyPatternsNoAttrs
     # CHECK: transform.sequence
@@ -654,6 +660,8 @@ def testVectorizeChildrenAndApplyPatternsNoAttrs(target):
     # CHECK-NOT: disable_transfer_permutation_map_lowering_patterns
     # CHECK-NOT: vectorize_nd_extract
     # CHECK-NOT: vectorize_padding
+    # CHECK-NOT: flatten_1d_depthwise_conv
+    # CHECK-NOT: fold_type_extensions_into_contract
 
 
 @run

``````````

</details>


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


More information about the Mlir-commits mailing list