|
MLIR 22.0.0git
|
#include "mlir/Bindings/Python/IRCore.h"
Public Member Functions | |
| PyModule (PyModule &)=delete | |
| PyModule (PyMlirContext &&)=delete | |
| ~PyModule () | |
| MlirModule | get () |
| Gets the backing MlirModule. | |
| PyModuleRef | getRef () |
| Gets a strong reference to this module. | |
| nanobind::object | getCapsule () |
| Gets a capsule wrapping the void* within the MlirModule. | |
| void | clearMlirModule () |
| Public Member Functions inherited from mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::BaseContextObject | |
| BaseContextObject (PyMlirContextRef ref) | |
| PyMlirContextRef & | getContext () |
| Accesses the context reference. | |
Static Public Member Functions | |
| static PyModuleRef | forModule (MlirModule module) |
| Returns a PyModule reference for the given MlirModule. | |
| static nanobind::object | createFromCapsule (nanobind::object capsule) |
| Creates a PyModule from the MlirModule wrapped by a capsule. | |
|
delete |
References PyModule().
Referenced by createFromCapsule(), PyModule(), and PyModule().
|
delete |
References PyModule().
| mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyModule::~PyModule | ( | ) |
Definition at line 880 of file IRCore.cpp.
References mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::BaseContextObject::BaseContextObject().
|
inline |
Definition at line 567 of file IRCore.h.
Referenced by mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::populateIRCore().
|
static |
Creates a PyModule from the MlirModule wrapped by a capsule.
Note this returns a new object BUT clearMlirModule() must be called to prevent double-frees (of the underlying mlir::Module).
Definition at line 914 of file IRCore.cpp.
References PyModule().
Referenced by mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::populateIRCore().
|
static |
Returns a PyModule reference for the given MlirModule.
This always returns a new object.
Definition at line 889 of file IRCore.cpp.
Referenced by mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::populateIRCore().
|
inline |
Gets the backing MlirModule.
Definition at line 549 of file IRCore.h.
Referenced by mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::populateRewriteSubmodule().
| nb::object mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyModule::getCapsule | ( | ) |
Gets a capsule wrapping the void* within the MlirModule.
Note that the module does not (yet) provide a corresponding factory for constructing from a capsule as that would require uniquing PyModule instances, which is not currently done.
Definition at line 921 of file IRCore.cpp.
Referenced by mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::populateIRCore().
|
inline |