Skip to content
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
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