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

[AutoScheduler] Querying and sampling in task extraction #7571

Merged
merged 2 commits into from
Mar 4, 2021
Merged
Changes from 1 commit
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
9 changes: 5 additions & 4 deletions python/tvm/auto_scheduler/relay_integration.py
Original file line number Diff line number Diff line change
Expand Up @@ -283,10 +283,13 @@ def auto_schedule_topi(outs):
key = register_workload_tensors(dag.workload_key(), io_tensors)
target = tvm.target.Target.current()

dispatch_ctx = DispatchContext.current
state = dispatch_ctx.query(target, key, has_complex_op, dag)
schedule = None

env = TracingEnvironment.current
if env is None:
# in the final build mode
state = DispatchContext.current.query(target, key, has_complex_op, dag)
if state is None:
return None

Expand All @@ -303,8 +306,6 @@ def auto_schedule_topi(outs):
LayoutRewriteOption.get_target_default(target, True) != LayoutRewriteOption.NO_REWRITE
and has_layout_free
):
dispatch_ctx = DispatchContext.current
state = dispatch_ctx.query(target, key, has_complex_op, dag)
if state is None:
return None

Expand All @@ -316,7 +317,7 @@ def auto_schedule_topi(outs):
else:
raise ValueError("Invalid tracing mode: " + env.tracing_mode)

return None
return schedule


def tensor_no_check_call(self, *indices):
Expand Down