llvm-project/mlir/lib/Bindings/Python
Stella Laurenzo 2607209b3f Remove libMLIRPublicAPI DSO.
libMLIRPublicAPI.so came into existence early when the Python and C-API were being co-developed because the Python extensions need a single DSO which exports the C-API to link against. It really should never have been exported as a mondo library in the first place, which has caused no end of problems in different linking modes, etc (i.e. the CAPI tests depended on it).

This patch does a mechanical move that:

* Makes the C-API tests link directly to their respective libraries.
* Creates a libMLIRPythonCAPI as part of the Python bindings which assemble to exact DSO that they need.

This has the effect that the C-API is no longer monolithic and can be subset and used piecemeal in a modular fashion, which is necessary for downstreams to only pay for what they use. There are additional, more fundamental changes planned for how the Python API is assembled which should make it more out of tree friendly, but this minimal first step is necessary to break the fragile dependency between the C-API and Python API.

Downstream actions required:

* If using the C-API and linking against MLIRPublicAPI, you must instead link against its constituent components. As a reference, the Python API dependencies are in lib/Bindings/Python/CMakeLists.txt and approximate the full set of dependencies available.
* If you have a Python API project that was previously linking against MLIRPublicAPI (i.e. to add its own C-API DSO), you will want to `s/MLIRPublicAPI/MLIRPythonCAPI/` and all should be as it was. There are larger changes coming in this area but this part is incremental.

Reviewed By: mehdi_amini

Differential Revision: https://reviews.llvm.org/D106369
2021-07-20 17:58:28 -07:00
..
Conversions Remove libMLIRPublicAPI DSO. 2021-07-20 17:58:28 -07:00
Transforms Remove libMLIRPublicAPI DSO. 2021-07-20 17:58:28 -07:00
AllPassesRegistration.cpp [mlir][python] Provide "all passes" registration module in Python 2021-05-26 15:14:57 -07:00
AsyncPasses.cpp [mlir][python] Add python support for async dialect and passes. 2021-04-28 14:52:27 +00:00
CMakeLists.txt Remove libMLIRPublicAPI DSO. 2021-07-20 17:58:28 -07:00
DialectLinalg.cpp [mlir][linalg] Remove the StructuredOp capture mechanism. 2021-06-28 07:57:40 +00:00
DialectSparseTensor.cpp [mlir][Python] Upstream the PybindAdaptors.h helpers and use it to implement sparse_tensor.encoding. 2021-05-10 17:15:43 +00:00
Dialects.h [mlir][Python] Upstream the PybindAdaptors.h helpers and use it to implement sparse_tensor.encoding. 2021-05-10 17:15:43 +00:00
ExecutionEngine.cpp [MLIR] Execution engine python binding support for shared libraries 2021-06-12 05:46:38 +05:30
ExecutionEngine.h Add basic JIT Python Bindings 2021-03-03 18:19:40 +00:00
GPUPasses.cpp [mlir][python] Add basic python support for GPU dialect and passes 2021-04-28 14:52:28 +00:00
Globals.h [mlir][Python] Return and accept OpView for all functions. 2020-11-03 22:48:34 -08:00
IRAffine.cpp [mlir][linalg][python] Add attribute support to the OpDSL. 2021-06-24 09:40:32 +00:00
IRAttributes.cpp [mlir] Move PyConcreteAttribute to header. NFC. 2021-04-22 16:11:59 +02:00
IRCore.cpp [MLIR] [Python] Add `owner` to PyValue and fix its parent reference 2021-07-14 20:32:43 -07:00
IRModule.cpp [mlir] Split out Python bindings entry point into a separate file 2021-04-29 11:18:25 +02:00
IRModule.h [mlir][python] Add `destroy` method to PyOperation. 2021-04-28 19:30:05 -06:00
IRTypes.cpp [mlir][Python] Finish adding RankedTensorType support for encoding. 2021-05-10 20:39:16 +00:00
LinalgPasses.cpp [mlir] Register Linalg passes in C API and Python Bindings 2021-03-27 09:57:56 +01:00
MainModule.cpp [mlir][Python] Upstream the PybindAdaptors.h helpers and use it to implement sparse_tensor.encoding. 2021-05-10 17:15:43 +00:00
Pass.cpp [mlir][python] Add simple debugging and printing helpers 2021-04-16 13:47:46 +00:00
Pass.h Add basic Python bindings for the PassManager and bind libTransforms 2020-11-10 19:55:21 +00:00
PybindUtils.cpp Add initial python bindings for attributes. 2020-08-23 22:16:23 -07:00
PybindUtils.h [mlir] Support setting operand values in C and Python APIs. 2021-04-27 20:17:47 -06:00
SparseTensorPasses.cpp [mlir][sparse][capi][python] add sparse tensor passes 2021-05-12 16:40:50 -07:00