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

[Bugfix][AutoScheduler] Strictly select impl using plevel #6956

Merged
merged 2 commits into from
Nov 24, 2020
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 python/tvm/relay/backend/compile_engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import numpy as np
import tvm
from tvm import te, autotvm
from tvm.ir.transform import PassContext
from tvm.runtime import Object
from tvm.support import libinfo
from tvm.target import Target
Expand Down Expand Up @@ -287,7 +288,10 @@ def lower_call(call, inputs, target):
env.tracing = False
reenable_tracing = True

if not is_dyn:
# check if auto_scheduler is enabled, and use pevel to select the implementation if so
use_auto_scheduler = PassContext.current().config.get("relay.backend.use_auto_scheduler", False)

if not is_dyn and not use_auto_scheduler:
best_impl, outputs = select_implementation(op, call.attrs, inputs, ret_type, target)
else:
# TODO(@icemelon9): Allow tvm to generate multiple kernels for dynamic shapes.
Expand Down