[Mlir-commits] [mlir] [MLIR][Python] Support Python-defined passes in MLIR (PR #156000)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Mon Sep 8 01:10:30 PDT 2025
PragmaTwice wrote:
Hi, merging is done via https://github.com/llvm/llvm-project/pull/156000/commits/e565ffbcbde97f8f7b09b935a3a546451be17e99. Thank you for your review and code : ) Now changes of this PR is mostly the same as #157369 except:
- in the test python file, we demonstrate two ways of constructing a pass callable: both `def some_pass(op)` and `class SomePass: def __call__(op)`.
- `pass.py` is renamed to `python_pass.py` to align with the method name `pm.add_python_pass(..)`.
- `callback.clone` remains required than optional (can be `nullptr`) since the cloned `userData` can be uninitialized if clone function is not provided.
https://github.com/llvm/llvm-project/pull/156000
More information about the Mlir-commits
mailing list