Support multiple functions in Python frontend
Open
python frontend
- Dominant language
- MLIR
- Stars
- 906
- Forks
- 171
- Avg merge
- 4d 12h
- Merged PRs (30d)
- 32
Description
Currently, the frontend primarily relies on a decorator that captures a single function.
```python
@heir.compile()
def foo():
# ....
```
There seem to be (at least) two ways to achieve multiple function support:
* have multiple decorated functions and use global state to collect all the functions
* use a ContextManager:
```python
with heir.compile():
def foo():
# ....
def bar():
# ....
```
I'm currently leaning towards the latter version, but since there's plenty of C++-side work that needs to be done first to fully support this, we have some time to decide.
Contributor guide
Assessment
This issue has not been assessed yet.