llvm-capstone/mlir/cmake/modules
Stella Laurenzo e31c77b182 [mlir][python] Reorganize MLIR python into namespace packages.
* Only leaf packages are non-namespace packages. This allows most of the top levels to be split into different directories or deployment packages. In the previous state, the presence of __init__.py files at each level meant that the entire tree could only ever exist in one physical directory on the path.
* This changes the API usage slightly: `import mlir` will no longer do a deep import of `mlir.ir`, etc. This may necessitate some client code changes.
* Dialect gen code was restructured so that the user is responsible for providing the `my_dialect.py` file, which then must import its peer `_my_dialect_ops_gen`. This gives complete control of the dialect namespace to the user instead of to tablegen code, allowing further dialect-specific python APIs.
* Correspondingly, the previous extension modules `_my_dialect.py` are now `_my_dialect_ops_ext.py`.
* Now that the `linalg` namespace is open, moved the `linalg_opdsl` tool into it.
* This may require some corresponding downstream adjustments to npcomp, circt, et al:
  * Probably some shallow imports need to be converted to deep imports (i.e. not `import mlir` brings in the world).
  * Each tablegen generated dialect now needs an explicit `foo.py` which does a `from ._foo_ops_gen import *`. This is similar to the way that generated code operates in the C++ world.
  * If providing dialect op extensions, those need to be moved from `_foo.py` -> `_foo_ops_ext.py`.

Differential Revision: https://reviews.llvm.org/D98096
2021-03-08 23:01:34 -08:00
..
AddMLIR.cmake [MLIR] [CMake] Support building MLIR standalone 2021-02-02 13:10:21 -06:00
AddMLIRPythonExtension.cmake [mlir][python] Reorganize MLIR python into namespace packages. 2021-03-08 23:01:34 -08:00
CMakeLists.txt [mlir] Make translation libraries available through MLIRConfig.cmake 2020-05-28 17:39:07 +02:00
MLIRConfig.cmake.in [mlir] Make translation libraries available through MLIRConfig.cmake 2020-05-28 17:39:07 +02:00
MLIRDetectPythonEnv.cmake [mlir] use STATUS instead of CHECK_* in MLIRDetectPythonEnv.cmake 2020-11-25 00:09:33 +01:00