[Mlir-commits] [mlir] [MLIR][Python] Support Python-defined rewrite patterns (PR #162699)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Thu Oct 9 09:56:33 PDT 2025


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/rewrite.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
--- rewrite.py	2025-10-09 16:03:10.000000 +0000
+++ rewrite.py	2025-10-09 16:55:59.854164 +0000
@@ -16,10 +16,11 @@
 def run(f):
     log("\nTEST:", f.__name__)
     f()
     gc.collect()
     assert Context._get_live_count() == 0
+
 
 # CHECK-LABEL: TEST: testRewritePattern
 @run
 def testRewritePattern():
     def to_muli(op, rewriter, pattern):

``````````

</details>


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


More information about the Mlir-commits mailing list