[mlir][python] expose operation.block (#145088)

Expose `operation-getBlock()` in python.
This commit is contained in:
Maksim Levental
2025-06-20 14:34:43 -05:00
committed by GitHub
parent affcc5e728
commit 227f759644

View File

@@ -3385,6 +3385,7 @@ void mlir::python::populateIRCore(nb::module_ &m) {
.def(MLIR_PYTHON_CAPI_FACTORY_ATTR, &PyOperation::createFromCapsule)
.def_prop_ro("operation", [](nb::object self) { return self; })
.def_prop_ro("opview", &PyOperation::createOpView)
.def_prop_ro("block", &PyOperation::getBlock)
.def_prop_ro(
"successors",
[](PyOperationBase &self) {