Skip to content

Commit bb3254e

Browse files
committed
move to extras
1 parent 1cc6072 commit bb3254e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+647
-1661
lines changed

.github/workflows/sdist.yml

Lines changed: 0 additions & 98 deletions
This file was deleted.

.github/workflows/test.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,8 @@ jobs:
103103
steps:
104104
- name: Checkout
105105
uses: actions/checkout@v2
106+
with:
107+
sparse-checkout: examples/mlir_python_extras.ipynb
106108

107109
- name: Setup Python
108110
uses: actions/setup-python@v4
@@ -116,7 +118,7 @@ jobs:
116118
pip install jupyter
117119
sed -i.bak 's/OUTPUT_TIMEOUT = 10/OUTPUT_TIMEOUT = 100/g' \
118120
$(python -c 'import site; print(site.getsitepackages()[0])')/jupyter_client/runapp.py
119-
BRANCH=${{ github.ref_name }} jupyter run examples/mlir_python_utils.ipynb
121+
BRANCH=${{ github.ref_name }} jupyter run examples/mlir_python_extras.ipynb
120122
121123
mlir-bindings-aarch64:
122124

.github/workflows/test_pypi.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
2323
- uses: actions/upload-artifact@v3
2424
with:
25-
path: ./wheelhouse/mlir_python_utils*.whl
25+
path: ./wheelhouse/mlir_python_extras*.whl
2626

2727
build_sdist:
2828
name: Build source distribution

README.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# mlir-python-utils
1+
# mlir-python-extras
22

33
The missing pieces (as far as boilerplate reduction goes) of the MLIR python bindings.
44

@@ -77,7 +77,7 @@ The few main features/affordances:
7777
1. `region_op`s (like `@func` above)
7878
\
7979
 
80-
1. These are decorators around ops (bindings for MLIR operations) that have regions (e.g., [in_parallel](https://github.com/makslevental/mlir-python-utils/blob/a9885db18096a610d29a26293396d860d40ad213/mlir_utils/dialects/ext/scf.py#L185)).
80+
1. These are decorators around ops (bindings for MLIR operations) that have regions (e.g., [in_parallel](https://github.com/makslevental/mlir-python-extras/blob/a9885db18096a610d29a26293396d860d40ad213/mlir_extras/dialects/ext/scf.py#L185)).
8181
They turn decorated functions, by executing them "eagerly", into an instance of such an op, e.g.,
8282
```python
8383
@func
@@ -87,7 +87,7 @@ The few main features/affordances:
8787
becomes `func.func @foo(%arg0: i32) { }`; if the region carrying op produces a result, the identifier for the python function (`foo`) becomes the corresponding `ir.Value` of the result (if the op doesn't produce a result then the identifier becomes the corresponding `ir.OpView`).
8888
\
8989
\
90-
See [mlir_utils.util.op_region_builder](https://github.com/makslevental/mlir-python-utils/blob/a9885db18096a610d29a26293396d860d40ad213/mlir_utils/util.py#L123) for details.
90+
See [mlir_extras.util.op_region_builder](https://github.com/makslevental/mlir-python-extras/blob/a9885db18096a610d29a26293396d860d40ad213/mlir_extras/util.py#L123) for details.
9191
\
9292
 
9393
2. `@canonicalize` (like `@canonicalize(using=scf)` above)
@@ -96,16 +96,16 @@ The few main features/affordances:
9696
1. These are decorators that **rewrite the python AST**. They transform a select few forms (basically only `if`s) into a more "canonical" form, in order to more easily map to MLIR. If that scares you, fear not; they are not essential and all target MLIR can still be mapped to without using them (by using the slightly more verbose `region_op`).
9797
\
9898
\
99-
See [mlir_utils.ast.canonicalize](https://github.com/makslevental/mlir-python-utils/blob/a9885db18096a610d29a26293396d860d40ad213/mlir_utils/ast/canonicalize.py) for details.
99+
See [mlir_extras.ast.canonicalize](https://github.com/makslevental/mlir-python-extras/blob/a9885db18096a610d29a26293396d860d40ad213/mlir_extras/ast/canonicalize.py) for details.
100100
\
101101
 
102-
3. `mlir_utils.types` (like `T.memref(K, K, T.i64)` above)
102+
3. `mlir_extras.types` (like `T.memref(K, K, T.i64)` above)
103103
\
104104
 
105-
1. These are just convenient wrappers around upstream type constructors. Note, because MLIR types are uniqued to a `ir.Context`, these are all actually functions that return the type (yes, even `T.i64`, which uses [`__getattr__` on the module](https://github.com/makslevental/mlir-python-utils/blob/2ca62e9c1540b1624c302bc9efb4666ff5d1c133/mlir_utils/types.py#L98)).
105+
1. These are just convenient wrappers around upstream type constructors. Note, because MLIR types are uniqued to a `ir.Context`, these are all actually functions that return the type (yes, even `T.i64`, which uses [`__getattr__` on the module](https://github.com/makslevental/mlir-python-extras/blob/2ca62e9c1540b1624c302bc9efb4666ff5d1c133/mlir_extras/types.py#L98)).
106106
\
107107
\
108-
See [mlir_utils.types](https://github.com/makslevental/mlir-python-utils/blob/a9885db18096a610d29a26293396d860d40ad213/mlir_utils/types.py) for details.
108+
See [mlir_extras.types](https://github.com/makslevental/mlir-python-extras/blob/a9885db18096a610d29a26293396d860d40ad213/mlir_extras/types.py) for details.
109109
\
110110
 
111111
4. `Pipeline()`
@@ -114,8 +114,8 @@ The few main features/affordances:
114114
1. This is just a (generated) wrapper around available **upstream** passes; it can be used to build pass pipelines (by `str(Pipeline())`). It is mainly convenient with IDEs/editors that will tab-complete the available methods on the `Pipeline` class (which correspond to passes), Note, if your host bindings don't register some upstream passes, then this will generate "illegal" pass pipelines.
115115
\
116116
\
117-
See [mlir_utils._configuration.generate_pass_pipeline.py](https://github.com/makslevental/mlir-python-utils/blob/a9885db18096a610d29a26293396d860d40ad213/mlir_utils/_configuration/generate_pass_pipeline.py) for details on generation
118-
[mlir_utils.runtime.passes.py](https://github.com/makslevental/mlir-python-utils/blob/a9885db18096a610d29a26293396d860d40ad213/mlir_utils/runtime/passes.py#L80) for the passes themselves.
117+
See [mlir_extras._configuration.generate_pass_pipeline.py](https://github.com/makslevental/mlir-python-extras/blob/a9885db18096a610d29a26293396d860d40ad213/mlir_extras/_configuration/generate_pass_pipeline.py) for details on generation
118+
[mlir_extras.runtime.passes.py](https://github.com/makslevental/mlir-python-extras/blob/a9885db18096a610d29a26293396d860d40ad213/mlir_extras/runtime/passes.py#L80) for the passes themselves.
119119
\
120120
 
121121

@@ -133,7 +133,7 @@ Practically speaking that means you need to have *some* package installed that i
133133
So
134134

135135
```shell
136-
$ YOUR_HOST_MLIR_PYTHON_PACKAGE_PREFIX=<YOUR_HOST_MLIR_PYTHON_PACKAGE_PREFIX> pip install git+https://github.com/makslevental/mlir-python-utils
136+
$ YOUR_HOST_MLIR_PYTHON_PACKAGE_PREFIX=<YOUR_HOST_MLIR_PYTHON_PACKAGE_PREFIX> pip install git+https://github.com/makslevental/mlir-python-extras
137137
```
138138

139139
where `YOUR_HOST_MLIR_PYTHON_PACKAGE_PREFIX` is (as it says) the package prefix for your chosen host bindings.
@@ -148,7 +148,7 @@ $ pip install mlir-python-bindings -f https://makslevental.github.io/wheels/
148148
and then
149149

150150
```shell
151-
$ pip install git+https://github.com/makslevental/mlir-python-utils
151+
$ pip install git+https://github.com/makslevental/mlir-python-extras
152152
```
153153

154154
## Examples/Demo

0 commit comments

Comments
 (0)