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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to