Skip to content

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

Merged
leandron merged 11 commits into
apache:mainfrom
mehrdadh:add_micro_libs
Nov 1, 2021
Merged

[microTVM] Add microTVM Template Projects to tlcpack pip Package#9309
leandron merged 11 commits into
apache:mainfrom
mehrdadh:add_micro_libs

Conversation

@mehrdadh

Copy link
Copy Markdown
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

Comment thread python/tvm/micro/build.py
class MicroTVMTemplateProject(enum.Enum):
ZEPHYR = "zephyr"
ARDUINO = "arduino"
CRT = "crt"

Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Member Author

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

@leandron leandron left a comment

Copy link
Copy Markdown
Contributor

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

@areusch areusch left a comment

Copy link
Copy Markdown
Contributor

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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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

leandron commented Nov 1, 2021

Copy link
Copy Markdown
Contributor

@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

mehrdadh commented Nov 1, 2021

Copy link
Copy Markdown
Member Author

@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