Adds MLIR C-API for marshaling Python capsules.
authorStella Laurenzo <stellaraccident@gmail.com>
Mon, 28 Sep 2020 16:08:09 +0000 (09:08 -0700)
committerStella Laurenzo <stellaraccident@gmail.com>
Tue, 29 Sep 2020 17:48:53 +0000 (10:48 -0700)
commit543922cd3630ca3a1e06a6a946d148bc0e22e720
tree16fbbe25d9d6032744e1adee242a2a6f72948ba6
parent6d193ba3337e40be297c88ff8088d6cade3d5838
Adds MLIR C-API for marshaling Python capsules.

* Providing stable, C-accessible definitions for bridging MLIR Python<->C APIs, we eliminate inter-extension dependencies (i.e. they can all share a diamond dependency on the MLIR C-API).
* Just provides accessors for context and module right now.
* Needed in NPComp in ~a week or so for high level Torch APIs.

Differential Revision: https://reviews.llvm.org/D88426
mlir/include/mlir-c/Bindings/Python/Interop.h [new file with mode: 0644]
mlir/include/mlir-c/IR.h
mlir/lib/Bindings/Python/IRModules.cpp
mlir/lib/Bindings/Python/IRModules.h
mlir/test/Bindings/Python/context_lifecycle.py
mlir/test/Bindings/Python/ir_module.py