[Mlir-commits] [mlir] [MLIR][Python] Expose TransformOpInterface and MemoryEffectsOpInterface (PR #176920)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Tue Jan 20 05:00:17 PST 2026


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 origin/main...HEAD mlir/test/python/dialects/transform_op_interface.py mlir/python/mlir/_mlir_libs/__init__.py
``````````

:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:

</details>

<details>
<summary>
View the diff from darker here.
</summary>

``````````diff
--- test/python/dialects/transform_op_interface.py	2026-01-20 12:55:56.000000 +0000
+++ test/python/dialects/transform_op_interface.py	2026-01-20 12:59:48.737521 +0000
@@ -3,11 +3,17 @@
 from contextlib import contextmanager
 
 from mlir import ir
 from mlir.ir import TypeAttr, F32Type, UnitAttr
 from mlir.dialects import transform, irdl, func
-from mlir.dialects.transform import AnyOpType, AnyValueType, AnyParamType, structured, interpreter
+from mlir.dialects.transform import (
+    AnyOpType,
+    AnyValueType,
+    AnyParamType,
+    structured,
+    interpreter,
+)
 
 from mlir.dialects._ods_common import get_op_result_or_value, get_op_results_or_values
 
 
 def run(emit_schedule):
@@ -43,13 +49,11 @@
 # Payload used by all tests
 def emit_payload():
     payload_module = ir.Module.create()
     with ir.InsertionPoint(payload_module.body):
 
-        @func.FuncOp.from_py_func(
-            F32Type.get(), F32Type.get(), results=[F32Type.get()]
-        )
+        @func.FuncOp.from_py_func(F32Type.get(), F32Type.get(), results=[F32Type.get()])
         def name_of_func(a, b):
             func.ReturnOp([b])
 
     return payload_module
 

``````````

</details>


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


More information about the Mlir-commits mailing list