[Mlir-commits] [mlir] [mlir][python] Add `walk` method to PyOperationBase (PR #87962)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Sun Apr 7 23:08:44 PDT 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 6fd3677fb4f4e806f2efa43bfa814aaf063c506c...77b9bbf120f5cead085fe642412a5ea3550009d2 mlir/test/python/ir/operation.py
``````````
</details>
<details>
<summary>
View the diff from darker here.
</summary>
``````````diff
--- operation.py 2024-04-08 06:02:52.000000 +0000
+++ operation.py 2024-04-08 06:08:14.610857 +0000
@@ -1014,10 +1014,11 @@
# CHECK: op_with_source_name: "test.foo"() : () -> () loc("my-source-string":1:1)
print(
f"op_with_source_name: {o.get_asm(enable_debug_info=True, use_local_scope=True)}"
)
+
# CHECK-LABEL: TEST: testOpWalk
@run
def testOpWalk():
ctx = Context()
ctx.allow_unregistered_dialects = True
@@ -1027,11 +1028,11 @@
func.func @f() {
func.return
}
}
""",
- ctx,
+ ctx,
)
callback = lambda op: print(op.name)
# Test post-order walk (default).
# CHECK-NEXT: Post-order
# CHECK-NEXT: func.return
``````````
</details>
https://github.com/llvm/llvm-project/pull/87962
More information about the Mlir-commits
mailing list