-
Notifications
You must be signed in to change notification settings - Fork 3.8k
[microTVM][Arduino] Cleanup template directory #9289
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
Conversation
gromero
left a comment
There was a problem hiding this 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!
|
@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": |
|
@gromero thanks for the review! PTAL. |
gromero
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @mehrdadh LGTM!
areusch
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks @mehrdadh !
* restructure * readme * fix readme * trigger
* restructure * readme * fix readme * trigger
This PR restructures the template project for Arduino as part of adding Arduino to TVM package efforts.