Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
tic
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wenyuanbo
tic
Commits
e920c099
Commit
e920c099
authored
Oct 03, 2018
by
Lianmin Zheng
Committed by
Tianqi Chen
Oct 03, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[AUTOTVM] Support multiple targets load in tophub (#1803)
parent
ad4c142b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
33 additions
and
22 deletions
+33
-22
python/tvm/autotvm/tophub.py
+23
-20
tutorials/nnvm/deploy_ssd.py
+10
-2
No files found.
python/tvm/autotvm/tophub.py
View file @
e920c099
...
...
@@ -51,32 +51,35 @@ def context(target, extra_files=None):
Parameters
----------
target: Target
target: Target
or List of Target
The compilation target
extra_files: list of str, optional
Extra log files to load
"""
best_context
=
ApplyHistoryBest
([])
if
isinstance
(
target
,
str
):
target
=
_target
.
create
(
target
)
possible_names
=
[]
for
opt
in
target
.
options
:
if
opt
.
startswith
(
"-device"
):
device
=
_alias
(
opt
[
8
:])
possible_names
.
append
(
device
)
possible_names
.
append
(
target
.
target_name
)
all_packages
=
list
(
PACKAGE_VERSION
.
keys
())
for
name
in
possible_names
:
name
=
_alias
(
name
)
if
name
in
all_packages
:
check_backend
(
name
)
filename
=
"
%
s_
%
s.log"
%
(
name
,
PACKAGE_VERSION
[
name
])
best_context
.
load
(
os
.
path
.
join
(
AUTOTVM_TOPHUB_ROOT_PATH
,
filename
))
break
# only load one file to avoid some fallback template mismatch problem
targets
=
target
if
isinstance
(
target
,
(
list
,
tuple
))
else
[
target
]
for
tgt
in
targets
:
if
isinstance
(
tgt
,
str
):
tgt
=
_target
.
create
(
tgt
)
possible_names
=
[]
for
opt
in
tgt
.
options
:
if
opt
.
startswith
(
"-device"
):
device
=
_alias
(
opt
[
8
:])
possible_names
.
append
(
device
)
possible_names
.
append
(
tgt
.
target_name
)
all_packages
=
list
(
PACKAGE_VERSION
.
keys
())
for
name
in
possible_names
:
name
=
_alias
(
name
)
if
name
in
all_packages
:
check_backend
(
name
)
filename
=
"
%
s_
%
s.log"
%
(
name
,
PACKAGE_VERSION
[
name
])
best_context
.
load
(
os
.
path
.
join
(
AUTOTVM_TOPHUB_ROOT_PATH
,
filename
))
break
# only load one file to avoid some fallback template mismatch problem
if
extra_files
:
for
filename
in
extra_files
:
...
...
tutorials/nnvm/deploy_ssd.py
View file @
e920c099
...
...
@@ -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::
#
# Currently we support compiling SSD on CPU only.
# GPU support is in progress.
#
model_name
=
"ssd_resnet50_512"
model_file
=
"
%
s.zip"
%
model_name
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment