Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[microTVM] Fix test_autotune to support schedules with no tuning space #12484

Merged
merged 1 commit into from
Aug 19, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion tests/micro/common/test_autotune.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,11 @@ def test_kws_autotune_workflow(platform, board, tmp_path):

str_logs = str_io_logs.getvalue().rstrip().split("\n")
logs = list(map(json.loads, str_logs))
assert len(logs) == 1 * TUNING_RUNS_PER_OPERATOR # One operator

# Some tuning tasks don't have any config space, and will only be run once
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) <= len(logs) <= len(tasks) * TUNING_RUNS_PER_OPERATOR

# Check we tested both operators
op_names = list(map(lambda x: x["input"][1], logs))
Expand Down