[Mlir-commits] [mlir] [MLIR][Python] Support dialect conversion in python bindings (PR #177782)
Maksim Levental
llvmlistbot at llvm.org
Sun Jan 25 15:20:18 PST 2026
================
@@ -539,7 +811,37 @@ void populateRewriteSubmodule(nb::module_ &m) {
},
"op"_a, "set"_a,
"Applies the given patterns to the given op by a fast walk-based "
- "driver.");
+ "driver.")
+ .def(
+ "apply_partial_conversion",
+ [](PyOperationBase &op, PyConversionTarget &target,
+ PyFrozenRewritePatternSet &set,
+ std::optional<PyConversionConfig> config) {
+ if (!config) {
+ config.emplace(PyConversionConfig());
+ }
----------------
makslevental wrote:
nit:
```suggestion
if (!config)
config.emplace(PyConversionConfig());
```
https://github.com/llvm/llvm-project/pull/177782
More information about the Mlir-commits
mailing list