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/25 22:05:38 UTC

[GitHub] [tvm] PhilippvK commented on a diff in pull request #12525: [TVMC] Allow selecting a subset of tasks to be used in `tvmc tune`

PhilippvK commented on code in PR #12525:
URL: https://github.com/apache/tvm/pull/12525#discussion_r955459257


##########
python/tvm/driver/tvmc/autotuner.py:
##########
@@ -453,7 +518,37 @@ def tune_model(
             hardware_params=hardware_params,
             include_simple_tasks=include_simple_tasks,
         )
+    else:
+        tasks = autotvm_get_tuning_tasks(
+            mod=mod,
+            params=params,
+            target=target,
+            alter_layout=desired_layout,
+        )
+
+    # Filter extracted tasks by provided user expression
+    if tasks_filter:
+        tasks, do_list = filter_tasks(tasks, tasks_filter)
+        if do_list:
+            print("Available Tasks for tuning:")
+            print(
+                "\n".join(
+                    [
+                        "  {}. {}".format(
+                            i, task if len(str(task)) < 100 else str(task)[:97] + "..."

Review Comment:
   Sorry, but I do not get the question… This truncates the string representation of each task to 100 characters which is typically enough for AutoTVM task to show the operator name and input shape.
   
   Or do you mean what would happen in a situation where `list` as well as a filter expression is passed by the user?



-- 
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