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
31ba0139
Commit
31ba0139
authored
May 05, 2019
by
masahi
Committed by
Wuwei Lin
May 05, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[ROCm] Fix dense autotvm template registration (#3136)
* Fix rocm dense autotvm template * suppres lint warning
parent
094fc680
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
6 deletions
+8
-6
topi/python/topi/cuda/__init__.py
+1
-0
topi/python/topi/rocm/dense.py
+7
-6
No files found.
topi/python/topi/cuda/__init__.py
View file @
31ba0139
...
...
@@ -11,6 +11,7 @@ from .group_conv2d_nchw import schedule_conv2d_nchw_cuda
from
.reduction
import
schedule_reduce
from
.softmax
import
schedule_softmax
from
.injective
import
schedule_injective
,
schedule_elemwise
,
schedule_broadcast
from
.dense
import
schedule_dense
from
.pooling
import
schedule_pool
,
schedule_global_pool
from
.extern
import
schedule_extern
from
.nn
import
schedule_lrn
,
schedule_l2_normalize
...
...
topi/python/topi/rocm/dense.py
View file @
31ba0139
...
...
@@ -14,18 +14,19 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
# pylint: disable=invalid-name, unused-variable
# pylint: disable=invalid-name, unused-variable
, unused-argument
"""Schedule for dense operator"""
from
__future__
import
absolute_import
as
_abs
import
tvm
from
tvm
import
autotvm
from
tvm.contrib
import
rocblas
import
topi
from
..nn.dense
import
dense
,
dense_default
from
..
import
tag
from
..
import
generic
@
dense.register
(
"rocm
"
)
def
dense_rocm
(
data
,
weight
,
bias
=
None
,
out_dtype
=
None
):
@
autotvm.register_topi_compute
(
dense
,
"rocm"
,
"direct
"
)
def
dense_rocm
(
cfg
,
data
,
weight
,
bias
=
None
,
out_dtype
=
None
):
"""Dense operator for rocm backend.
Parameters
...
...
@@ -67,8 +68,8 @@ def dense_rocm(data, weight, bias=None, out_dtype=None):
return
dense_default
(
data
,
weight
,
bias
,
out_dtype
)
@
generic.schedule_dense.register
([
"rocm"
]
)
def
schedule_dense
(
outs
):
@
autotvm.register_topi_schedule
(
generic
.
schedule_dense
,
"rocm"
,
"direct"
)
def
schedule_dense
(
cfg
,
outs
):
"""Schedule for dense operator.
Parameters
...
...
@@ -85,4 +86,4 @@ def schedule_dense(outs):
target
=
tvm
.
target
.
current_target
()
if
target
.
target_name
==
"rocm"
and
"rocblas"
in
target
.
libs
:
return
generic
.
schedule_extern
(
outs
)
return
topi
.
cuda
.
schedule_dense
(
outs
)
return
topi
.
cuda
.
schedule_dense
(
cfg
,
outs
)
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