[all-commits] [llvm/llvm-project] 85185b: First pass on MLIR python context lifetime managem...
Stella Laurenzo via All-commits
all-commits at lists.llvm.org
Fri Sep 18 12:18:36 PDT 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: 85185b61b6371c29111611b8e3ac8d06403542c8
https://github.com/llvm/llvm-project/commit/85185b61b6371c29111611b8e3ac8d06403542c8
Author: Stella Laurenzo <stellaraccident at gmail.com>
Date: 2020-09-18 (Fri, 18 Sep 2020)
Changed paths:
M mlir/include/mlir-c/IR.h
M mlir/lib/Bindings/Python/IRModules.cpp
M mlir/lib/Bindings/Python/IRModules.h
M mlir/lib/CAPI/IR/IR.cpp
A mlir/test/Bindings/Python/context_lifecycle.py
Log Message:
-----------
First pass on MLIR python context lifetime management.
* Per thread https://llvm.discourse.group/t/revisiting-ownership-and-lifetime-in-the-python-bindings/1769
* Reworks contexts so it is always possible to get back to a py::object that holds the reference count for an arbitrary MlirContext.
* Retrofits some of the base classes to automatically take a reference to the context, elimintating keep_alives.
* More needs to be done, as discussed, when moving on to the operations/blocks/regions.
Differential Revision: https://reviews.llvm.org/D87886
More information about the All-commits
mailing list