Skip to content

Conversation

@mehrdadh
Copy link
Member

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

@mehrdadh
Copy link
Member Author

cc @gromero @guberti @areusch

@areusch
Copy link
Contributor

areusch commented Oct 18, 2021

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

Copy link
Contributor

@gromero gromero left a comment

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!

@gromero
Copy link
Contributor

gromero commented Oct 18, 2021

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

mehrdadh commented Oct 18, 2021

@gromero thanks for the review! PTAL.

Copy link
Contributor

@gromero gromero left a comment

Choose a reason for hiding this comment

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

Thanks @mehrdadh LGTM!

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.

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