[Mlir-commits] [mlir] [MLIR][Python] fix getOwner to return (typed) nb::object instead of abstract PyOpView (PR #165053)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Sat Oct 25 10:43:49 PDT 2025
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-mlir
Author: Maksim Levental (makslevental)
<details>
<summary>Changes</summary>
---
Full diff: https://github.com/llvm/llvm-project/pull/165053.diff
1 Files Affected:
- (modified) mlir/lib/Bindings/Python/IRCore.cpp (+1-1)
``````````diff
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));
``````````
</details>
https://github.com/llvm/llvm-project/pull/165053
More information about the Mlir-commits
mailing list