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
6e5c65ac
Commit
6e5c65ac
authored
Jan 05, 2019
by
Wuwei Lin
Committed by
Tianqi Chen
Jan 04, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove duplicated functions in relay_integration (#2370)
parent
a42d1e3c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 additions
and
33 deletions
+1
-33
python/tvm/autotvm/task/relay_integration.py
+1
-33
No files found.
python/tvm/autotvm/task/relay_integration.py
View file @
6e5c65ac
...
...
@@ -9,7 +9,7 @@ import warnings
import
logging
from
...
import
t
ensor
,
placeholder
,
t
arget
as
_target
from
...
import
target
as
_target
from
.task
import
create
from
.topi_integration
import
TaskExtractEnv
...
...
@@ -17,38 +17,6 @@ from .topi_integration import TaskExtractEnv
logger
=
logging
.
getLogger
(
'autotvm'
)
def
serialize_args
(
args
):
"""serialize arguments of a topi function to a hashable tuple.
Parameters
----------
args: list of hashable or Tensor
"""
ret
=
[]
for
t
in
args
:
if
isinstance
(
t
,
tensor
.
Tensor
):
ret
.
append
((
'TENSOR'
,
get_const_tuple
(
t
.
shape
),
t
.
dtype
))
else
:
ret
.
append
(
t
)
return
tuple
(
ret
)
def
deserialize_args
(
args
):
"""The inverse function of :code:`serialize_args`.
Parameters
----------
args: list of hashable or Tensor
"""
ret
=
[]
for
t
in
args
:
if
isinstance
(
t
,
tuple
)
and
t
[
0
]
==
'TENSOR'
:
ret
.
append
(
placeholder
(
shape
=
t
[
1
],
dtype
=
t
[
2
]))
else
:
ret
.
append
(
t
)
return
ret
def
extract_from_program
(
func
,
params
,
ops
,
target
,
target_host
=
None
):
""" Extract tuning tasks from a relay program.
...
...
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