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
acc7bd85
Commit
acc7bd85
authored
Jan 24, 2019
by
eqy
Committed by
Yizhi Liu
Jan 24, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[AUTOTVM] typo (#2478)
* [AUTOTVM] typo * trigger CI
parent
f397fead
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
12 deletions
+12
-12
python/tvm/autotvm/task/topi_integration.py
+12
-12
No files found.
python/tvm/autotvm/task/topi_integration.py
View file @
acc7bd85
...
...
@@ -17,7 +17,7 @@ from .task import args_to_workload, dispatcher, register
from
..util
import
get_const_tuple
# A table that records all registered dispatcher for all targets
_REGISTE
D_DISPATHC
ER
=
{
_REGISTE
RED_DISPATCH
ER
=
{
}
...
...
@@ -210,7 +210,7 @@ class TaskExtractEnv:
def
register_topi_compute
(
topi_compute
,
target_keys
,
template_keys
,
func
=
None
):
"""Register a tunable template for a topi compute function.
After the registration
. T
his topi compute will become a configuration dispatcher. It uses
After the registration
, t
his topi compute will become a configuration dispatcher. It uses
all its argument as workload and dispatches configurations according to the input workload.
It also stores this "workload" to its final ComputeOp, which can be used to reconstruct
...
...
@@ -243,18 +243,18 @@ def register_topi_compute(topi_compute, target_keys, template_keys, func=None):
def
_decorator
(
f
):
targets
=
[
target_keys
]
if
isinstance
(
target_keys
,
str
)
else
target_keys
for
target_key
in
targets
:
if
target_key
not
in
_REGISTE
D_DISPATHC
ER
:
_REGISTE
D_DISPATHC
ER
[
target_key
]
=
{}
if
topi_compute
not
in
_REGISTE
D_DISPATHC
ER
[
target_key
]:
if
target_key
not
in
_REGISTE
RED_DISPATCH
ER
:
_REGISTE
RED_DISPATCH
ER
[
target_key
]
=
{}
if
topi_compute
not
in
_REGISTE
RED_DISPATCH
ER
[
target_key
]:
@topi_compute.register
(
target_key
)
@dispatcher
def
config_dispatcher
(
*
args
,
**
kwargs
):
"""override topi call as a config dispatcher"""
assert
not
kwargs
,
"Do not support kwargs in template function call"
return
args_to_workload
(
args
,
topi_compute
)
_REGISTE
D_DISPATHC
ER
[
target_key
][
topi_compute
]
=
config_dispatcher
_REGISTE
RED_DISPATCH
ER
[
target_key
][
topi_compute
]
=
config_dispatcher
config_dispatcher
=
_REGISTE
D_DISPATHC
ER
[
target_key
][
topi_compute
]
config_dispatcher
=
_REGISTE
RED_DISPATCH
ER
[
target_key
][
topi_compute
]
@config_dispatcher.register
(
template_keys
)
def
template_call
(
cfg
,
*
args
,
**
kwargs
):
...
...
@@ -331,9 +331,9 @@ def register_topi_schedule(topi_schedule, target_keys, template_keys, func=None)
def
_decorator
(
f
):
targets
=
[
target_keys
]
if
isinstance
(
target_keys
,
str
)
else
target_keys
for
target_key
in
targets
:
if
target_key
not
in
_REGISTE
D_DISPATHC
ER
:
_REGISTE
D_DISPATHC
ER
[
target_key
]
=
{}
if
topi_schedule
not
in
_REGISTE
D_DISPATHC
ER
[
target_key
]:
if
target_key
not
in
_REGISTE
RED_DISPATCH
ER
:
_REGISTE
RED_DISPATCH
ER
[
target_key
]
=
{}
if
topi_schedule
not
in
_REGISTE
RED_DISPATCH
ER
[
target_key
]:
@topi_schedule.register
(
target_key
)
@dispatcher
def
config_dispatcher
(
outs
,
*
args
,
**
kwargs
):
...
...
@@ -357,9 +357,9 @@ def register_topi_schedule(topi_schedule, target_keys, template_keys, func=None)
return
args_to_workload
(
workload
)
_REGISTE
D_DISPATHC
ER
[
target_key
][
topi_schedule
]
=
config_dispatcher
_REGISTE
RED_DISPATCH
ER
[
target_key
][
topi_schedule
]
=
config_dispatcher
config_dispatcher
=
_REGISTE
D_DISPATHC
ER
[
target_key
][
topi_schedule
]
config_dispatcher
=
_REGISTE
RED_DISPATCH
ER
[
target_key
][
topi_schedule
]
@config_dispatcher.register
(
template_keys
)
def
template_call
(
cfg
,
outs
,
*
args
,
**
kwargs
):
...
...
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