[Mlir-commits] [mlir] [MLIR][Python] Add missing peel_front argument to LoopPeelOp's extension class (PR #81424)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Sun Feb 11 10:05:09 PST 2024


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-mlir

Author: Rolf Morel (rolfmorel)

<details>
<summary>Changes</summary>

While PR 74015 added support for peeling an iteration from the front of a loop, it did not update the (non-automatically generated) part of the Python interface that exposes the op.

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


1 Files Affected:

- (modified) mlir/python/mlir/dialects/transform/loop.py (+6) 


``````````diff
diff --git a/mlir/python/mlir/dialects/transform/loop.py b/mlir/python/mlir/dialects/transform/loop.py
index 3bdd9ca3b22f07..c4770b1c4067e4 100644
--- a/mlir/python/mlir/dialects/transform/loop.py
+++ b/mlir/python/mlir/dialects/transform/loop.py
@@ -55,6 +55,7 @@ def __init__(
         remainder_loop_type: Type,
         target: Union[Operation, Value],
         *,
+        peel_front: Union[bool, BoolAttr] = False,
         fail_if_already_divisible: Union[bool, BoolAttr] = False,
         ip=None,
         loc=None,
@@ -63,6 +64,11 @@ def __init__(
             main_loop_type,
             remainder_loop_type,
             _get_op_result_or_value(target),
+            peel_front=(
+                peel_front
+                if isinstance(peel_front, BoolAttr)
+                else BoolAttr.get(peel_front)
+            ),
             fail_if_already_divisible=(
                 fail_if_already_divisible
                 if isinstance(fail_if_already_divisible, BoolAttr)

``````````

</details>


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


More information about the Mlir-commits mailing list