areusch commented on a change in pull request #8708:
URL: https://github.com/apache/tvm/pull/8708#discussion_r687398855
##########
File path: apps/microtvm/arduino/example_project/src/model.c
##########
@@ -33,6 +30,7 @@ tvm_workspace_t app_workspace;
// Blink code for debugging purposes
void TVMPlatformAbort(tvm_crt_error_t error) {
+ TVMLogf("TVMPlatformAbort: %08x\n", error);
Review comment:
nit: suggest 0x%08x
##########
File path: apps/microtvm/arduino/template_project/microtvm_api_server.py
##########
@@ -201,6 +200,10 @@ def _template_model_header(self, source_dir, metadata):
with open(source_dir / "model.h", "r") as f:
model_h_template = Template(f.read())
+ # The structure of the "memory" key depends on the style -
+ # only style="full-model" works with AOT, so we'll check that
+ assert metadata["style"] == "full-model"
Review comment:
can you add an explanatory note with the assert error:
```
assert metadata["style"] == "full-model", "when generating AOT, expect only
full-model Model Library Format"
##########
File path: apps/microtvm/arduino/template_project/microtvm_api_server.py
##########
@@ -282,6 +258,55 @@ def _convert_imports(self, project_dir, source_dir):
with filename.open("w") as file:
file.writelines(lines)
+ # Most of the files we used to be able to point to directly are under
"src/standalone_crt/include/".
+ # Howver, crt_config.h lives under "src/standalone_crt/crt_config/", and
more exceptions might
+ # be added in the future.
+ POSSIBLE_BASE_PATHS = ["src/standalone_crt/include/",
"src/standalone_crt/crt_config/"]
+
+ """Takes a single #include path, and returns the new location
Review comment:
to document `_find_modified_include_path`, per pystyleguide, place this
docstring as the first indented line after `def
_find_modified_include_path(self, project_dir, file_path, include_path):`. Also
be sure to section this according to pystyleguide :
https://numpydoc.readthedocs.io/en/latest/format.html#short-summary
can you also fix for the other functions?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]