[Mlir-commits] [mlir] [MLIR][Python] fix getOwner (PR #165053)

Maksim Levental llvmlistbot at llvm.org
Fri Oct 24 15:58:07 PDT 2025


https://github.com/makslevental created https://github.com/llvm/llvm-project/pull/165053

None

>From 1faa5e28f6b5dfce9aa64e3cf42645a05f4bfbf8 Mon Sep 17 00:00:00 2001
From: Maksim Levental <maksim.levental at gmail.com>
Date: Fri, 24 Oct 2025 15:57:53 -0700
Subject: [PATCH] [MLIR][Python] fix getOwner

---
 mlir/lib/Bindings/Python/IRCore.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mlir/lib/Bindings/Python/IRCore.cpp b/mlir/lib/Bindings/Python/IRCore.cpp
index 06d0256e6287b..cda4fe19c16f8 100644
--- a/mlir/lib/Bindings/Python/IRCore.cpp
+++ b/mlir/lib/Bindings/Python/IRCore.cpp
@@ -598,7 +598,7 @@ class PyOpOperand {
 public:
   PyOpOperand(MlirOpOperand opOperand) : opOperand(opOperand) {}
 
-  PyOpView getOwner() {
+  nb::typed<nb::object, PyOpView> getOwner() {
     MlirOperation owner = mlirOpOperandGetOwner(opOperand);
     PyMlirContextRef context =
         PyMlirContext::forContext(mlirOperationGetContext(owner));



More information about the Mlir-commits mailing list