[Mlir-commits] [mlir] [mlir][transform] Add support for transform.param pad multiples in `PadOp` (PR #90755)

Oleksandr Alex Zinenko llvmlistbot at llvm.org
Fri May 3 01:24:34 PDT 2024


================
@@ -373,10 +373,11 @@ class PadOp(PadOp):
     def __init__(
         self,
         target: Union[Operation, OpView, Value],
+        pad_to_multiple_of: Optional[Union[DynamicIndexList, ArrayAttr]] = None,
         *,
         padding_values: Optional[Union[ArrayAttr, Sequence[Attribute]]] = None,
         padding_dimensions: OptionalIntList = None,
-        pad_to_multiple_of: OptionalIntList = None,
+        static_pad_to_multiple_of: OptionalIntList = None,
----------------
ftynse wrote:

I don't think we should take a separate `static_pad_to_multiple_of` in Python, we don't do that in C++ builders and take mixed values instead. This exposes unnecessary implementation detail of the operation. In fact, we can already provide a list of python integers into `pad_to_multiple_of`, we just need to forward that correctly in the body.

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


More information about the Mlir-commits mailing list