diff options
Diffstat (limited to 'mlir/lib/Bindings/Python/IRModule.h')
-rw-r--r-- | mlir/lib/Bindings/Python/IRModule.h | 19 |
1 files changed, 1 insertions, 18 deletions
diff --git a/mlir/lib/Bindings/Python/IRModule.h b/mlir/lib/Bindings/Python/IRModule.h index 04164b7..79b7e0c 100644 --- a/mlir/lib/Bindings/Python/IRModule.h +++ b/mlir/lib/Bindings/Python/IRModule.h @@ -176,19 +176,8 @@ public: static PyMlirContext *createNewContextForInit(); /// Returns a context reference for the singleton PyMlirContext wrapper for - /// the given context. It is only valid to call this on an MlirContext that - /// is already owned by the Python bindings. Typically this will be because - /// it came in some fashion from createNewContextForInit(). However, it - /// is also possible to explicitly transfer ownership of an existing - /// MlirContext to the Python bindings via stealExternalContext(). + /// the given context. static PyMlirContextRef forContext(MlirContext context); - - /// Explicitly takes ownership of an MlirContext that must not already be - /// known to the Python bindings. Once done, the life-cycle of the context - /// will be controlled by the Python bindings, and it will be destroyed - /// when the reference count goes to zero. - static PyMlirContextRef stealExternalContext(MlirContext context); - ~PyMlirContext(); /// Accesses the underlying MlirContext. @@ -617,12 +606,6 @@ public: forOperation(PyMlirContextRef contextRef, MlirOperation operation, pybind11::object parentKeepAlive = pybind11::object()); - /// Explicitly takes ownership of an operation that must not already be known - /// to the Python bindings. Once done, the life-cycle of the operation - /// will be controlled by the Python bindings. - static PyOperationRef stealExternalOperation(PyMlirContextRef contextRef, - MlirOperation operation); - /// Creates a detached operation. The operation must not be associated with /// any existing live operation. static PyOperationRef |