diff options
| author | Stella Laurenzo <stellaraccident@gmail.com> | 2021-08-23 20:01:07 -0700 |
|---|---|---|
| committer | Stella Laurenzo <stellaraccident@gmail.com> | 2021-08-30 22:18:43 -0700 |
| commit | f05ff4f7570ca009f22f5e2fe8c6361f28faaa8a (patch) | |
| tree | e5c1bbdb97011cad557bb2926884ff7fe31dbcad /mlir/lib/Bindings/Python/MainModule.cpp | |
| parent | 3419e85b15e35e4b5b4d0cd8153fdbe0958e80c7 (diff) | |
[mlir][python] Apply py::module_local() to all classes.
* This allows multiple MLIR-API embedding downstreams to co-exist in the same process.
* I believe this is the last thing needed to enable isolated embedding.
Differential Revision: https://reviews.llvm.org/D108605
Diffstat (limited to 'mlir/lib/Bindings/Python/MainModule.cpp')
| -rw-r--r-- | mlir/lib/Bindings/Python/MainModule.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mlir/lib/Bindings/Python/MainModule.cpp b/mlir/lib/Bindings/Python/MainModule.cpp index 073ac90375a3..cbade532e8ed 100644 --- a/mlir/lib/Bindings/Python/MainModule.cpp +++ b/mlir/lib/Bindings/Python/MainModule.cpp @@ -26,7 +26,7 @@ using namespace mlir::python; PYBIND11_MODULE(_mlir, m) { m.doc() = "MLIR Python Native Extension"; - py::class_<PyGlobals>(m, "_Globals") + py::class_<PyGlobals>(m, "_Globals", py::module_local()) .def_property("dialect_search_modules", &PyGlobals::getDialectSearchPrefixes, &PyGlobals::setDialectSearchPrefixes) |
