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
3770368f
Commit
3770368f
authored
Jun 10, 2019
by
hlu1
Committed by
Lianmin Zheng
Jun 11, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Autotvm] Support override (#3292)
parent
d43aab07
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
python/tvm/autotvm/task/topi_integration.py
+4
-4
No files found.
python/tvm/autotvm/task/topi_integration.py
View file @
3770368f
...
@@ -284,7 +284,7 @@ class TaskExtractEnv:
...
@@ -284,7 +284,7 @@ class TaskExtractEnv:
return
TaskExtractEnv
.
current
return
TaskExtractEnv
.
current
def
register_topi_compute
(
topi_compute
,
target_keys
,
template_keys
,
func
=
None
):
def
register_topi_compute
(
topi_compute
,
target_keys
,
template_keys
,
func
=
None
,
override
=
False
):
"""Register a tunable template for a topi compute function.
"""Register a tunable template for a topi compute function.
After the registration, this topi compute will become a configuration dispatcher. It uses
After the registration, this topi compute will become a configuration dispatcher. It uses
...
@@ -333,7 +333,7 @@ def register_topi_compute(topi_compute, target_keys, template_keys, func=None):
...
@@ -333,7 +333,7 @@ def register_topi_compute(topi_compute, target_keys, template_keys, func=None):
config_dispatcher
=
_REGISTERED_DISPATCHER
[
target_key
][
topi_compute
]
config_dispatcher
=
_REGISTERED_DISPATCHER
[
target_key
][
topi_compute
]
@config_dispatcher.register
(
template_keys
)
@config_dispatcher.register
(
template_keys
,
override
=
override
)
def
template_call
(
cfg
,
*
args
,
**
kwargs
):
def
template_call
(
cfg
,
*
args
,
**
kwargs
):
"""call the topi func and attach workload to compute node"""
"""call the topi func and attach workload to compute node"""
assert
not
kwargs
,
"Do not support kwargs in template function call"
assert
not
kwargs
,
"Do not support kwargs in template function call"
...
@@ -372,7 +372,7 @@ def register_topi_compute(topi_compute, target_keys, template_keys, func=None):
...
@@ -372,7 +372,7 @@ def register_topi_compute(topi_compute, target_keys, template_keys, func=None):
return
_decorator
return
_decorator
def
register_topi_schedule
(
topi_schedule
,
target_keys
,
template_keys
,
func
=
None
):
def
register_topi_schedule
(
topi_schedule
,
target_keys
,
template_keys
,
func
=
None
,
override
=
False
):
"""Register a tunable template for a topi schedule function.
"""Register a tunable template for a topi schedule function.
After the registration. This topi schedule will become a configuration dispatcher. It dispatches
After the registration. This topi schedule will become a configuration dispatcher. It dispatches
...
@@ -438,7 +438,7 @@ def register_topi_schedule(topi_schedule, target_keys, template_keys, func=None)
...
@@ -438,7 +438,7 @@ def register_topi_schedule(topi_schedule, target_keys, template_keys, func=None)
config_dispatcher
=
_REGISTERED_DISPATCHER
[
target_key
][
topi_schedule
]
config_dispatcher
=
_REGISTERED_DISPATCHER
[
target_key
][
topi_schedule
]
@config_dispatcher.register
(
template_keys
)
@config_dispatcher.register
(
template_keys
,
override
=
override
)
def
template_call
(
cfg
,
outs
,
*
args
,
**
kwargs
):
def
template_call
(
cfg
,
outs
,
*
args
,
**
kwargs
):
"""call the schedule func"""
"""call the schedule func"""
if
f
==
topi_schedule
.
fdefault
:
if
f
==
topi_schedule
.
fdefault
:
...
...
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