aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp
diff options
context:
space:
mode:
authorStella Laurenzo <stellaraccident@gmail.com>2021-03-05 18:00:16 -0800
committerStella Laurenzo <stellaraccident@gmail.com>2021-03-08 23:01:34 -0800
commite31c77b1827fa4dd3511f21af11cfab18ecf6d38 (patch)
tree5f8055350940c8958d1d09dc84deaf0f872c7b93 /lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp
parent4c3d759d001950dc3fa0bd721707085c295f6e20 (diff)
downloadllvm-e31c77b1827fa4dd3511f21af11cfab18ecf6d38.zip
llvm-e31c77b1827fa4dd3511f21af11cfab18ecf6d38.tar.gz
llvm-e31c77b1827fa4dd3511f21af11cfab18ecf6d38.tar.bz2
[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
Diffstat (limited to 'lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp')
0 files changed, 0 insertions, 0 deletions