the question is quite straightforward
I’d like to construct MLIR in python level and use it in C++ level
- python level
with Context() as ctx:
module = Module.parse(“builtin.module {}”) - C++ level
struct Foo {
Foo(ModuleOp) {
}
};
py::class_(m, “Foo”)
.def(py::init());
what will NotDefinedType be ?
Firstly, NotDefinedType is MlirModule, but it shows mismatched type
Python Module is based on PyModule class which is not available in MLIR api
Secondly, NotDefinedType is py::object and I found below comment in PybindAdaptors.h
/// Casts object <-> MlirModule.
template <>
struct type_caster
it doesn’t look what I want
could anyone help me ?