Skip to content

Commit

Permalink
[TVMC] Add size of task space to tvmc tune --tasks output
Browse files Browse the repository at this point in the history
  • Loading branch information
PhilippvK committed Oct 18, 2022
1 parent c9db997 commit 1e7d121
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions python/tvm/driver/tvmc/autotuner.py
Original file line number Diff line number Diff line change
Expand Up @@ -355,16 +355,17 @@ def filter_tasks(

def print_task_list(tasks, enable_autoscheduler):
print("Available Tasks for tuning:")

def _trunc_helper(text, length):
return text if len(text) < length else text[: length - 3] + "..."

print(
"\n".join(
[
" {}. {}".format(
i,
task.desc
if enable_autoscheduler
else task
if len(str(task.desc if enable_autoscheduler else task)) < 100
else str(task.desc if enable_autoscheduler else task)[:97] + "...",
" {}. {}".format(i, _trunc_helper(task.desc, 100))
if enable_autoscheduler
else " {}. {} (len={})".format(
i, _trunc_helper(str(task), 100), len(task.config_space)
)
for i, task in enumerate(tasks)
]
Expand Down

0 comments on commit 1e7d121

Please sign in to comment.