llvm-capstone/mlir/lib/Bindings/Python
Stella Laurenzo 310c9496d8 Re-engineer MLIR python build support.
* Implements all of the discussed features:
  - Links against common CAPI libraries that are self contained.
  - Stops using the 'python/' directory at the root for everything, opening the namespace up for multiple projects to embed the MLIR python API.
  - Separates declaration of sources (py and C++) needed to build the extension from building, allowing external projects to build custom assemblies from core parts of the API.
  - Makes the core python API relocatable (i.e. it could be embedded as something like 'npcomp.ir', 'npcomp.dialects', etc). Still a bit more to do to make it truly isolated but the main structural reset is done.
  - When building statically, installed python packages are completely self contained, suitable for direct setup and upload to PyPi, et al.
  - Lets external projects assemble their own CAPI common runtime library that all extensions use. No more possibilities for TypeID issues.
  - Begins modularizing the API so that external projects that just include a piece pay only for what they use.
* I also rolled in a re-organization of the native libraries that matches how I was packaging these out of tree and is a better layering (i.e. all libraries go into a nested _mlir_libs package). There is some further cleanup that I resisted since it would have required source changes that I'd rather do in a followup once everything stabilizes.
* Note that I made a somewhat odd choice in choosing to recompile all extensions for each project they are included into (as opposed to compiling once and just linking). While not leveraged yet, this will let us set definitions controlling the namespacing of the extensions so that they can be made to not conflict across projects (with preprocessor definitions).
* This will be a relatively substantial breaking change for downstreams. I will handle the npcomp migration and will coordinate with the circt folks before landing. We should stage this and make sure it isn't causing problems before landing.
* Fixed a couple of absolute imports that were causing issues.

Differential Revision: https://reviews.llvm.org/D106520
2021-07-27 15:54:58 +00:00
..
Conversions Re-engineer MLIR python build support. 2021-07-27 15:54:58 +00:00
Transforms Re-engineer MLIR python build support. 2021-07-27 15:54:58 +00: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
DialectLinalg.cpp [mlir][linalg] Remove the StructuredOp capture mechanism. 2021-06-28 07:57:40 +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
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
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
Globals.h [mlir][Python] Return and accept OpView for all functions. 2020-11-03 22:48:34 -08:00
GPUPasses.cpp [mlir][python] Add basic python support for GPU dialect and passes 2021-04-28 14:52:28 +00: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