[Mlir-commits] [mlir] [MLIR][Python] Support Python-defined passes in MLIR (PR #156000)
Mehdi Amini
llvmlistbot at llvm.org
Mon Sep 8 10:36:55 PDT 2025
joker-eph wrote:
> You can't create re-usable pipelines in Python at all (except as strings).
Sure, but strings count... A lot of things are going through strings as shortcut in python instead of bindings APIs today (for better or worse).
> This PR just maps to Python [already existing functionality available for C users](https://github.com/llvm/llvm-project/blob/main/mlir/test/CAPI/pass.c#L380) (you realize that right...?).
I didn't actually. I see this as a deficiency in the C API though, I don't remember the history there though so I may be missing something, but off-hands I don't see a reason why this should be intrinsically different than the invariants we preserve in the system in general.
I need to look into fixing the C API.
> As this is a general C-API facility of MLIR, I don't see how/why the Python bindings should be doing anything differently here.
The reason why is that in general if we find something that is broken, we aim at addressing it instead of piling more broken things on top of it.
https://github.com/llvm/llvm-project/pull/156000
More information about the Mlir-commits
mailing list