[Mlir-commits] [mlir] [MLIR][Transform][Python] transform.foreach wrapper and .owner OpViews (PR #172228)

Maksim Levental llvmlistbot at llvm.org
Mon Jan 26 09:57:07 PST 2026


================
@@ -4646,15 +4646,15 @@ void mlir::python::populateIRCore(nb::module_ &m) {
           kDumpDocstring)
       .def_prop_ro(
           "owner",
-          [](PyValue &self) -> nb::object {
+          [](PyValue &self) -> nb::typed<nb::object, PyOpView> {
----------------
makslevental wrote:

Note you'll have to add `#include <nanobind/stl/variant.h>` to  [mlir/Bindings/Python/Nanobind.h](https://github.com/rolfmorel/llvm-project/blob/187e28fab265164a556bc70753f1de8e467ee876/mlir/include/mlir/Bindings/Python/Nanobind.h#L32)

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


More information about the Mlir-commits mailing list