You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by GitBox <gi...@apache.org> on 2022/08/17 19:29:52 UTC

[GitHub] [tvm] mkatanbaf opened a new pull request, #12479: [MicroTVM] expose project options in autotuning

mkatanbaf opened a new pull request, #12479:
URL: https://github.com/apache/tvm/pull/12479

   This PR exposes the project options for autotuning jobs and allows users to select options such as stack size.
   


-- 
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: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [tvm] mehrdadh merged pull request #12479: [MicroTVM] expose project options in autotuning

Posted by GitBox <gi...@apache.org>.
mehrdadh merged PR #12479:
URL: https://github.com/apache/tvm/pull/12479


-- 
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: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [tvm] mkatanbaf commented on pull request #12479: [MicroTVM] expose project options in autotuning

Posted by GitBox <gi...@apache.org>.
mkatanbaf commented on PR #12479:
URL: https://github.com/apache/tvm/pull/12479#issuecomment-1218517428

   @tvm-bot rerun


-- 
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: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [tvm] guberti commented on a diff in pull request #12479: [MicroTVM] expose project options in autotuning

Posted by GitBox <gi...@apache.org>.
guberti commented on code in PR #12479:
URL: https://github.com/apache/tvm/pull/12479#discussion_r948764254


##########
python/tvm/micro/testing/evaluation.py:
##########
@@ -32,20 +32,30 @@
 
 
 def tune_model(
-    platform, board, target, mod, params, num_trials, tuner_cls=tvm.autotvm.tuner.GATuner
+    platform,
+    board,
+    target,
+    mod,
+    params,
+    num_trials,
+    tuner_cls=tvm.autotvm.tuner.GATuner,
+    options=None,

Review Comment:
   nit: this argument is called `project_options` (instead of just `options`) in the `evaluate_model` function below. Can we standardize this argument across both 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: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [tvm] guberti commented on a diff in pull request #12479: [MicroTVM] expose project options in autotuning

Posted by GitBox <gi...@apache.org>.
guberti commented on code in PR #12479:
URL: https://github.com/apache/tvm/pull/12479#discussion_r948805670


##########
python/tvm/micro/testing/evaluation.py:
##########
@@ -32,20 +32,29 @@
 
 
 def tune_model(
-    platform, board, target, mod, params, num_trials, tuner_cls=tvm.autotvm.tuner.GATuner
+    platform,
+    board,
+    target,
+    mod,
+    params,
+    num_trials,
+    tuner_cls=tvm.autotvm.tuner.GATuner,
+    project_options=None,
 ):
     """Autotunes a model with microTVM and returns a StringIO with the tuning logs"""
     with tvm.transform.PassContext(opt_level=3, config={"tir.disable_vectorize": True}):
         tasks = tvm.autotvm.task.extract_from_program(mod["main"], {}, target)
     assert len(tasks) > 0
     assert isinstance(params, dict)
 
+    project_options = {
+        **(project_options if project_options is not None else {}),

Review Comment:
   Two more nits about this change:
   1. In `tune_model`, the `project_options` are inserted **above** where `project_type` is specified, meaning _`project_options` cannot be used to override the `project_type` parameter_. This differs from the implementation in `create_aot_session`, where they are inserted **below** and thus **can** override this parameter. We should one behavior and stick with it - I weakly prefer allowing us to override `project_type`.
   2. This code can be rewritten as:
   ```suggestion
           **(project_options or {}),
   ```



-- 
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: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [tvm] mehrdadh commented on pull request #12479: [MicroTVM] expose project options in autotuning

Posted by GitBox <gi...@apache.org>.
mehrdadh commented on PR #12479:
URL: https://github.com/apache/tvm/pull/12479#issuecomment-1222639354

   LGTM, thanks @mkatanbaf!


-- 
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: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [tvm] mkatanbaf commented on a diff in pull request #12479: [MicroTVM] expose project options in autotuning

Posted by GitBox <gi...@apache.org>.
mkatanbaf commented on code in PR #12479:
URL: https://github.com/apache/tvm/pull/12479#discussion_r948822307


##########
python/tvm/micro/testing/evaluation.py:
##########
@@ -32,20 +32,29 @@
 
 
 def tune_model(
-    platform, board, target, mod, params, num_trials, tuner_cls=tvm.autotvm.tuner.GATuner
+    platform,
+    board,
+    target,
+    mod,
+    params,
+    num_trials,
+    tuner_cls=tvm.autotvm.tuner.GATuner,
+    project_options=None,
 ):
     """Autotunes a model with microTVM and returns a StringIO with the tuning logs"""
     with tvm.transform.PassContext(opt_level=3, config={"tir.disable_vectorize": True}):
         tasks = tvm.autotvm.task.extract_from_program(mod["main"], {}, target)
     assert len(tasks) > 0
     assert isinstance(params, dict)
 
+    project_options = {
+        **(project_options if project_options is not None else {}),

Review Comment:
   Thanks for the comments. I weakly preferred not allowing to overwrite the project type, but in the interest of sticking with one behavior, I followed the implementation in _create_aot_session_ .



-- 
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: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org