Skip to content

Commit

Permalink
[AutoScheduler] Querying and sampling in task extraction (apache#7571)
Browse files Browse the repository at this point in the history
* [AutoScheduler] Query in task extraction

* trigger ci
  • Loading branch information
comaniac authored and trevor-m committed May 11, 2021
1 parent b1c17f1 commit 8cf6f9c
Showing 1 changed file with 5 additions and 4 deletions.
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

0 comments on commit 8cf6f9c

Please sign in to comment.