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

[TVMC] use target_host when it is set #6855

Merged
merged 7 commits into from
Dec 1, 2020
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
6 changes: 3 additions & 3 deletions python/tvm/driver/tvmc/compiler.py
Original file line number Diff line number Diff line change
@@ -178,18 +178,18 @@ def compile_model(
mod = common.convert_graph_layout(mod, alter_layout)

tvm_target = common.target_from_cli(target)
target_host = target_host or ""
target_host = tvm_target if not target_host else target_host

if tuning_records and os.path.exists(tuning_records):
logger.debug("tuning records file provided: %s", tuning_records)
with autotvm.apply_history_best(tuning_records):
with tvm.transform.PassContext(opt_level=3):
logger.debug("building relay graph with tuning records")
graph_module = relay.build(mod, tvm_target, params=params, target_host=tvm_target)
graph_module = relay.build(mod, tvm_target, params=params, target_host=target_host)
else:
with tvm.transform.PassContext(opt_level=3):
logger.debug("building relay graph (no tuning records provided)")
graph_module = relay.build(mod, tvm_target, params=params, target_host=tvm_target)
graph_module = relay.build(mod, tvm_target, params=params, target_host=target_host)

# Generate output dump files with sources
dump_code = dump_code or []