Skip to content

Conversation

@tkarna
Copy link
Contributor

@tkarna tkarna commented Nov 3, 2025

Expose missing boolean arguments in VectorizeChildrenAndApplyPatternsOp Python bindings.

@llvmbot
Copy link
Member

llvmbot commented Nov 3, 2025

@llvm/pr-subscribers-mlir

Author: Tuomas Kärnä (tkarna)

Changes

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 --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

@tkarna
Copy link
Contributor Author

tkarna commented Nov 3, 2025

FYI @adam-smnk @rolfmorel

@tkarna tkarna force-pushed the tkarna/vectorize-children-py-bindings branch from be45ab4 to d9c457e Compare November 3, 2025 09:07
@rolfmorel rolfmorel merged commit 718818a into llvm:main Nov 4, 2025
10 checks passed
@tkarna tkarna deleted the tkarna/vectorize-children-py-bindings branch November 4, 2025 21:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

mlir:python MLIR Python bindings mlir

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants