[Mlir-commits] [mlir] [MLIR][Python] Support dialect conversion in python bindings (PR #177782)

Maksim Levental llvmlistbot at llvm.org
Sun Jan 25 15:09:16 PST 2026


================
@@ -337,6 +504,12 @@ void populateRewriteSubmodule(nb::module_ &m) {
       .value("DISABLED", PyGreedySimplifyRegionLevel::DISABLED)
       .value("NORMAL", PyGreedySimplifyRegionLevel::NORMAL)
       .value("AGGRESSIVE", PyGreedySimplifyRegionLevel::AGGRESSIVE);
+
+  nb::enum_<PyDialectConversionFoldingMode>(m, "DialectConversionFoldingMode")
+      .value("NEVER", PyDialectConversionFoldingMode::Never)
+      .value("BEFORE_PATTERNS", PyDialectConversionFoldingMode::BeforePatterns)
+      .value("AFTER_PATTERNS", PyDialectConversionFoldingMode::AfterPatterns);
----------------
makslevental wrote:

man i really hate the C all-caps-yelling-at-you convention 🤦 but i guess we should stick with it? i kind of would prefer these names were just the same as they are in cpp....

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


More information about the Mlir-commits mailing list