Skip to content
Merged
Show file tree
Hide file tree
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
1 change: 0 additions & 1 deletion python/tvm/driver/tvmc/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ def convert_graph_layout(mod, desired_layout):
)


# TODO In a separate PR, eliminate the duplicated code here and in compiler.py (@leandron)
def target_from_cli(target):
"""
Create a tvm.target.Target instance from a
Expand Down
11 changes: 1 addition & 10 deletions python/tvm/driver/tvmc/compiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,16 +177,7 @@ def compile_model(
if alter_layout:
mod = common.convert_graph_layout(mod, alter_layout)

# Handle the case in which target is a path to a JSON file.
if os.path.exists(target):
with open(target) as target_file:
logger.info("using target input from file: %s", target)
target = "".join(target_file.readlines())

# TODO(@leandron) We don't have an API to collect a list of supported
# targets yet
logger.debug("creating target from input: %s", target)
tvm_target = tvm.target.Target(target)
tvm_target = common.target_from_cli(target)
target_host = target_host or ""

if tuning_records and os.path.exists(tuning_records):
Expand Down