Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[microTVM] Add microTVM Template Projects to tlcpack pip Package #9309

Merged
merged 11 commits into from
Nov 1, 2021

Conversation

mehrdadh
Copy link
Member

This PR:

  • adds Zephyr/Arduino template projects to TVM build
  • changes microTVM test and tutorials to use template directory from TVM build which makes it compatible to run using both TVM build from repository and tlcpack pip package.
  • Adds microtvm template directories to setup.py

This PR is currently waiting on #9274 and #9289 to merge.

cc @areusch @leandron

class MicroTVMTemplateProject(enum.Enum):
ZEPHYR = "zephyr"
ARDUINO = "arduino"
CRT = "crt"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @mehrdadh Could you please elaborate why CRT is considered to be a Template Project?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's located here. We used this CRT host template project for CRT tests and also tutorials.

@mehrdadh
Copy link
Member Author

@junrushao1994 this PR is a step towards adding microtvm project API to pip package. Please take a look when you have time. thanks!

@mehrdadh
Copy link
Member Author

@leandron just a friendly reminder about this PR. thanks!

Copy link
Contributor

@leandron leandron left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@leandron leandron merged commit 54019b9 into apache:main Nov 1, 2021
Copy link
Contributor

@areusch areusch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mehrdadh a couple comments, can address in a follow-on if they merit changes

list(
APPEND
ARDUINO_FILE_COPY_JOBS
"apps/microtvm/arduino/template_project microtvm_api_server.py -> arduino"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we not copy the whole template_project?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we could. the only file that we don't need there is the README file.

version_output.replace("\n", "").replace("\r", "").replace(":", "").lower().split(" ")
)
full_version = version_output[version_output.index("version") + 1].split(".")
full_version = re.findall("version: ([\.0-9]*)", version_output.lower())
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: should add r" string prefix (see https://docs.python.org/3/reference/lexical_analysis.html#string-and-bytes-literals regarding backslashes)

@leandron
Copy link
Contributor

leandron commented Nov 1, 2021

@mehrdadh a couple comments, can address in a follow-on if they merit changes

Sorry I merged it because I thought it was only pending on me. Can we push fixes on follow up PRs?

@mehrdadh
Copy link
Member Author

mehrdadh commented Nov 1, 2021

@leandron I will send a patch.

@mehrdadh mehrdadh deleted the add_micro_libs branch November 1, 2021 17:24
ylc pushed a commit to ylc/tvm that referenced this pull request Jan 7, 2022
…che#9309)

* zephyr lib fixed

* restructure

* readme

* add arduino

* add project template to setup.py

* fix lint

* fix tutorial

* address comments from PR9274
ylc pushed a commit to ylc/tvm that referenced this pull request Jan 13, 2022
…che#9309)

* zephyr lib fixed

* restructure

* readme

* add arduino

* add project template to setup.py

* fix lint

* fix tutorial

* address comments from PR9274
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants