Skip to content

[microTVM][Arduino] Cleanup template directory#9289

Merged
areusch merged 4 commits into
apache:mainfrom
mehrdadh:arduino_restructure
Oct 21, 2021
Merged

[microTVM][Arduino] Cleanup template directory#9289
areusch merged 4 commits into
apache:mainfrom
mehrdadh:arduino_restructure

Conversation

@mehrdadh

Copy link
Copy Markdown
Member

This PR restructures the template project for Arduino as part of adding Arduino to TVM package efforts.

@mehrdadh

Copy link
Copy Markdown
Member Author

cc @gromero @guberti @areusch

@areusch

areusch commented Oct 18, 2021

Copy link
Copy Markdown
Contributor

@guberti @gromero can you take a look when you get a minute?

@gromero gromero 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 LGTM. Just a nit in README.md. Check if it's missing something please. Thanks!

Comment thread apps/microtvm/arduino/README.md Outdated
Comment thread apps/microtvm/arduino/template_project/microtvm_api_server.py
@gromero

gromero commented Oct 18, 2021

Copy link
Copy Markdown
Contributor

@mehrdadh BTW, I found out that the following fixes are needed in Arduino while reviewing your changes, but naturally your changes are independent. I'll submit them later today:

Author: Gustavo Romero <gustavo.romero@linaro.org>
Date:   Mon Oct 18 21:25:26 2021 +0000

    Fix Arduino

diff --git a/apps/microtvm/arduino/template_project/microtvm_api_server.py b/apps/microtvm/arduino/template_project/microtvm_api_server.py
index 3d25d0bca..85263137f 100644
--- a/apps/microtvm/arduino/template_project/microtvm_api_server.py
+++ b/apps/microtvm/arduino/template_project/microtvm_api_server.py
@@ -152,7 +152,9 @@ class Handler(server.ProjectAPIHandler):
         return server.ServerInfo(
             platform_name="arduino",
             is_template=IS_TEMPLATE,
-            model_library_format_path=MODEL_LIBRARY_FORMAT_PATH,
+            model_library_format_path=""
+            if IS_TEMPLATE
+            else MODEL_LIBRARY_FORMAT_PATH,
             project_options=PROJECT_OPTIONS,
         )
 
@@ -352,7 +354,7 @@ class Handler(server.ProjectAPIHandler):
 
         # Unpack the MLF and copy the relevant files
         metadata = self._disassemble_mlf(model_library_format_path, source_dir)
-        shutil.copy2(model_library_format_path, source_dir / "model")
+        shutil.copy2(model_library_format_path, project_dir / MODEL_LIBRARY_FORMAT_RELPATH)
 
         # For AOT, template model.h with metadata to minimize space usage
         if options["project_type"] == "example_project":

@mehrdadh

mehrdadh commented Oct 18, 2021

Copy link
Copy Markdown
Member Author

@gromero thanks for the review! PTAL.

@gromero gromero 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.

Thanks @mehrdadh LGTM!

@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.

thanks @mehrdadh !

@areusch areusch merged commit e62075d into apache:main Oct 21, 2021
@mehrdadh mehrdadh deleted the arduino_restructure branch October 21, 2021 17:16
ylc pushed a commit to ylc/tvm that referenced this pull request Jan 7, 2022
* restructure

* readme

* fix readme

* trigger
ylc pushed a commit to ylc/tvm that referenced this pull request Jan 13, 2022
* restructure

* readme

* fix readme

* trigger
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.

3 participants