Commit e920c099 by Lianmin Zheng Committed by Tianqi Chen

[AUTOTVM] Support multiple targets load in tophub (#1803)

parent ad4c142b
...@@ -51,22 +51,25 @@ def context(target, extra_files=None): ...@@ -51,22 +51,25 @@ def context(target, extra_files=None):
Parameters Parameters
---------- ----------
target: Target target: Target or List of Target
The compilation target The compilation target
extra_files: list of str, optional extra_files: list of str, optional
Extra log files to load Extra log files to load
""" """
best_context = ApplyHistoryBest([]) best_context = ApplyHistoryBest([])
if isinstance(target, str): targets = target if isinstance(target, (list, tuple)) else [target]
target = _target.create(target)
for tgt in targets:
if isinstance(tgt, str):
tgt = _target.create(tgt)
possible_names = [] possible_names = []
for opt in target.options: for opt in tgt.options:
if opt.startswith("-device"): if opt.startswith("-device"):
device = _alias(opt[8:]) device = _alias(opt[8:])
possible_names.append(device) possible_names.append(device)
possible_names.append(target.target_name) possible_names.append(tgt.target_name)
all_packages = list(PACKAGE_VERSION.keys()) all_packages = list(PACKAGE_VERSION.keys())
for name in possible_names: for name in possible_names:
......
...@@ -22,12 +22,20 @@ from mxnet.model import load_checkpoint ...@@ -22,12 +22,20 @@ from mxnet.model import load_checkpoint
###################################################################### ######################################################################
# Set the parameters here # Preliminary and Set parameters
# ----------------------- # ------------------------------
# We should build TVM with sort support, in TVM root directory
#
# .. code-block:: bash
#
# echo "set(USE_SORT ON)" > config.mk
# make -j8
#
# .. note:: # .. note::
# #
# Currently we support compiling SSD on CPU only. # Currently we support compiling SSD on CPU only.
# GPU support is in progress. # GPU support is in progress.
#
model_name = "ssd_resnet50_512" model_name = "ssd_resnet50_512"
model_file = "%s.zip" % model_name model_file = "%s.zip" % model_name
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment