guberti commented on code in PR #12818:
URL: https://github.com/apache/tvm/pull/12818#discussion_r976833788
##########
python/tvm/micro/project_api/server.py:
##########
@@ -759,6 +779,68 @@ def write_with_timeout(fd, data, timeout_sec): # pylint:
disable=invalid-name
return num_written
+def default_project_options(**kw) -> typing.List[ProjectOption]:
+ """Get default Project Options
+
+ Attributes of any default option can be updated. Here is an example
+ when attribute `optional` from `verbose` option needs to be updates:
+
+ default_project_options(verbose={"optional": ["build"]})
+
+ This will update the `optional` attribute of `verbose` ProjectOption
+ to be `["build"]`.
+
+ Returns
+ -------
+ options: List[ProjectOption]
+ A list of default ProjectOption with modifications.
+ """
+ options = [
+ ProjectOption(
+ "verbose",
+ optional=["generate_project"],
+ type="bool",
+ help="Run build with verbose output.",
+ ),
+ ProjectOption(
+ "project_type",
+ required=["generate_project"],
+ type="str",
+ help="Type of project to generate.",
+ ),
+ ProjectOption(
+ "board",
+ required=["generate_project"],
+ type="str",
+ help="Name of the board to build for.",
Review Comment:
Ah, forgot about that. Makes sense!
--
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]