[Mlir-commits] [mlir] [MLIR][Python] Add structured.fuseop to generator. (PR #120601)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Thu Dec 19 08:32:22 PST 2024
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {darker}-->
:warning: Python code formatter, darker found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
darker --check --diff -r 3eca15cbb9888a992749ddd24f0fb666dad733bf...dd7406b21c30e98b86c39a07ab4c99cd4b1f7dda mlir/python/mlir/dialects/transform/structured.py mlir/test/python/dialects/transform_structured_ext.py
``````````
</details>
<details>
<summary>
View the diff from darker here.
</summary>
``````````diff
--- python/mlir/dialects/transform/structured.py 2024-12-19 16:28:31.000000 +0000
+++ python/mlir/dialects/transform/structured.py 2024-12-19 16:31:51.820681 +0000
@@ -137,10 +137,11 @@
containing_op,
loc=loc,
ip=ip,
)
+
@_ods_cext.register_operation(_Dialect, replace=True)
class FuseOp(FuseOp):
"""Specialization for FuseOp class."""
@overload
@@ -169,13 +170,11 @@
num_loops = sum(v if v == 0 else 1 for v in sizes)
if isinstance(loop_types_or_target, (Operation, Value, OpView)):
loop_types = [transform.AnyOpType.get()] * num_loops
target = loop_types_or_target
- assert (
- target_or_none is None
- ), "Cannot construct FuseOp with two targets."
+ assert target_or_none is None, "Cannot construct FuseOp with two targets."
else:
loop_types = (
([loop_types_or_target] * num_loops)
if isinstance(loop_types_or_target, Type)
else loop_types_or_target
``````````
</details>
https://github.com/llvm/llvm-project/pull/120601
More information about the Mlir-commits
mailing list