[Mlir-commits] [mlir] [MLIR][Python] Support Python-defined passes in MLIR (PR #156000)
Rolf Morel
llvmlistbot at llvm.org
Mon Sep 1 07:53:56 PDT 2025
================
@@ -139,4 +139,5 @@ NB_MODULE(_mlir, m) {
auto passModule =
m.def_submodule("passmanager", "MLIR Pass Management Bindings");
populatePassManagerSubmodule(passModule);
+ populatePassSubmodule(passModule);
----------------
rolfmorel wrote:
Given that [PEP8 recommends putting appending a underscore in case of names of arguments / attributes clashing with reserved keywords](https://peps.python.org/pep-0008/#function-and-method-arguments:~:text=If%20a%20function%20argument%E2%80%99s%20name%20clashes%20with%20a%20reserved%20keyword%2C%20it%20is%20generally%20better%20to%20append%20a%20single%20trailing%20underscore%20rather%20than%20use%20an%20abbreviation%20or%20spelling%20corruption.%20Thus%20class_%20is%20better%20than%20clss.%20(Perhaps%20better%20is%20to%20avoid%20such%20clashes%20by%20using%20a%20synonym.)), I feel `mlir.pass_.Pass` is an option as it is not _too_ surprising for me personally.
https://github.com/llvm/llvm-project/pull/156000
More information about the Mlir-commits
mailing list