Skip to content

Commit

Permalink
Merge branch 'main' of github.com:tum-ei-eda/mlonmcu into main
Browse files Browse the repository at this point in the history
  • Loading branch information
PhilippvK committed Jul 9, 2024
2 parents 3d852e6 + 1453be4 commit 605fd23
Show file tree
Hide file tree
Showing 5 changed files with 85 additions and 51 deletions.
11 changes: 11 additions & 0 deletions .github/workflows/demo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,15 @@ jobs:
matrix:
python-version: ["3.10"]
steps:
- name: Maximize build space
uses: easimon/maximize-build-space@master
with:
root-reserve-mb: 16384
temp-reserve-mb: 8192
remove-dotnet: 'true'
remove-android: 'true'
remove-haskell: 'true'
remove-codeql: 'true'
- uses: actions/checkout@v3
with:
submodules: recursive
Expand Down Expand Up @@ -90,6 +99,8 @@ jobs:
run: |
source .venv/bin/activate
mlonmcu setup -H home/ -v
- name: Check Disk
run: df
- name: Install environment-specific Python packages
run: |
source .venv/bin/activate
Expand Down
79 changes: 34 additions & 45 deletions CITATION.cff
Original file line number Diff line number Diff line change
@@ -1,51 +1,40 @@
# This CITATION.cff file was generated with cffinit.
# Visit https://bit.ly/cffinit to generate yours today!

cff-version: 1.2.0
title: 'MLonMCU: TinyML Benchmarking with Fast Retargeting'
message: >-
If you use this software in publications, please
cite it as below.
type: software
message: If you use this software, please cite both the article from preferred-citation and the software itself.
authors:
- given-names: Philipp
name-particle: van
family-names: Kempen
email: [email protected]
affiliation: Technical University of Munich
orcid: 'https://orcid.org/0000-0002-1135-8070'
- family-names: "Stahl"
given-names: "Rafael"
email: [email protected]
affiliation: Technical University of Munich
- family-names: "Müller-Gritschneder"
given-names: "Daniel"
email: [email protected]
affiliation: Technical University of Munich
- family-names: "Schlichtmann"
given-names: "Ulf"
email: [email protected]
affiliation: Technical University of Munich
- family-names: van Kempen
given-names: Philipp
- family-names: Stahl
given-names: Rafael
- family-names: Mueller-Gritschneder
given-names: Daniel
title: 'MLonMCU: TinyML Benchmarking with Fast Retargeting'
version: v0.2.0
repository-code: 'https://github.com/tum-ei-eda/mlonmcu'
url: 'https://tum-ei-eda.github.io/mlonmcu/'
repository-artifact: 'https://pypi.org/project/mlonmcu/'
abstract: >-
While there exist many ways to deploy machine
learning models on microcontrollers, it is
non-trivial to choose the optimal combination of
frameworks and targets for a given application.
Thus, automating the end-to-end benchmarking flow
is of high relevance nowadays. A tool called
MLonMCU is proposed in this paper and demonstrated
by benchmarking the state-of-the-art TinyML
frameworks TFLite for Microcontrollers and TVM
effortlessly with large number of configurations in
a low amount of time.
keywords:
- TinyML
- neural networks
- microcontrollers
license: Apache-2.0
commit: TODO
version: v0.2.0
date-released: '2022-10-13'
license: Apache-2.0
preferred-citation:
authors:
- family-names: van Kempen
given-names: Philipp
- family-names: Stahl
given-names: Rafael
- family-names: Mueller-Gritschneder
given-names: Daniel
- family-names: Schlichtmann
given-names: Ulf
title: 'MLonMCU: TinyML Benchmarking with Fast Retargeting'
doi: 10.1145/3615338.3618128
url: https://doi.org/10.1145/3615338.3618128
type: conference-paper
pages: 32–36
year: '2024'
isbn: '9798400703379'
collection-title: Proceedings of the 2023 Workshop on Compilers, Deployment, and Tooling for Edge AI
conference:
name: CODAI '23
publisher:
name: Association for Computing Machinery
address: New York, NY, USA

38 changes: 37 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,11 @@
[![GitHub license](https://img.shields.io/github/license/tum-ei-eda/mlonmcu.svg)](https://github.com/tum-ei-eda/mlonmcu/blob/main/LICENSE)

[![cicd workflow](https://github.com/tum-ei-eda/mlonmcu/actions/workflows/cicd.yml/badge.svg)](https://github.com/tum-ei-eda/mlonmcu/actions/workflows/cicd.yml)
[![lint workflow](https://github.com/tum-ei-eda/mlonmcu/actions/workflows/style.yml/badge.svg)](https://github.com/tum-ei-eda/mlonmcu/actions/workflows/style.yml)
[![demo workflow](https://github.com/tum-ei-eda/mlonmcu/actions/workflows/demo.yml/badge.svg)](https://github.com/tum-ei-eda/mlonmcu/actions/workflows/demo.yml)
[![container workflow](https://github.com/tum-ei-eda/mlonmcu/actions/workflows/container.yml/badge.svg)](https://github.com/tum-ei-eda/mlonmcu/actions/workflows/container.yml)
[![bench workflow](https://github.com/tum-ei-eda/mlonmcu/actions/workflows/bench.yml/badge.svg)](https://github.com/tum-ei-eda/mlonmcu/actions/workflows/bench.yml)


This project contains research code related to the deployment of inference or learning applications on tiny micro-controllers.


Expand Down Expand Up @@ -133,6 +134,14 @@ with mlonmcu.context.MlonMcuContext() as context:
pass
```

## List of interesting MLonMCU forks

- MINRES TGC support: https://github.com/Minres/mlonmcu/tree/develop

## List of existing MLonMCU extensions/plugins

- ABC Example Plugin: coming soon!
- MINRES TGC Support: coming soon!

## Development

Expand Down Expand Up @@ -162,6 +171,33 @@ Regarding coding style, it is recommended to run `black` before every commit. Th

- Came up with MLonMCU Python package

## Publications

- **MLonMCU: TinyML Benchmarking with Fast Retargeting** ([https://dl.acm.org/doi/10.1145/3637543.3652878](https://dl.acm.org/doi/abs/10.1145/3615338.3618128))

*CODAI '23: Proceedings of the 2023 Workshop on Compilers, Deployment, and Tooling for Edge AI*

BibTeX

```bibtex
@inproceedings{10.1145/3615338.3618128,
author = {van Kempen, Philipp and Stahl, Rafael and Mueller-Gritschneder, Daniel and Schlichtmann, Ulf},
title = {MLonMCU: TinyML Benchmarking with Fast Retargeting},
year = {2024},
isbn = {9798400703379},
publisher = {Association for Computing Machinery},
address = {New York, NY, USA},
url = {https://doi.org/10.1145/3615338.3618128},
doi = {10.1145/3615338.3618128},
abstract = {While there exist many ways to deploy machine learning models on microcontrollers, it is non-trivial to choose the optimal combination of frameworks and targets for a given application. Thus, automating the end-to-end benchmarking flow is of high relevance nowadays. A tool called MLonMCU is proposed in this paper and demonstrated by benchmarking the state-of-the-art TinyML frameworks TFLite for Microcontrollers and TVM effortlessly with a large number of configurations in a low amount of time.},
booktitle = {Proceedings of the 2023 Workshop on Compilers, Deployment, and Tooling for Edge AI},
pages = {32–36},
numpages = {5},
keywords = {TinyML, neural networks, microcontrollers},
location = {Hamburg, Germany},
series = {CODAI '23}
}
```

### Other
This package was created with Cookiecutter_ and the `audreyr/cookiecutter-pypackage`_ project template. However most of the templates was manually changed to be in Markdown instead of reStructuredText.
Expand Down
6 changes: 2 additions & 4 deletions mlonmcu/flow/tvm/backend/tvmc_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,8 @@ def get_pass_config_tvmc_args(pass_config):


def get_disabled_pass_tvmc_args(disabled_passes):
args = []
for item in disabled_passes:
args.extend(["--disabled-pass", item])
return args
arg = ",".join(disabled_passes)
return ["--disabled-pass", arg]


def get_input_shapes_tvmc_args(input_shapes):
Expand Down
2 changes: 1 addition & 1 deletion resources/templates/default.yml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ platforms:
# validate: true
# List of supported targets in the environment
targets:
default: etiss_pulpino
default: etiss
etiss_pulpino:
enabled: true
features:
Expand Down

0 comments on commit 605fd23

Please sign in to comment.