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
94359722
Commit
94359722
authored
Oct 05, 2017
by
Leyuan Wang
Committed by
Tianqi Chen
Oct 05, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
conv2d adjusted to fix different workloads (#511)
parent
2f4a5ad9
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
11 deletions
+11
-11
topi/python/topi/cuda/conv2d_nchw.py
+11
-11
No files found.
topi/python/topi/cuda/conv2d_nchw.py
View file @
94359722
#pylint: disable=invalid-name, no-member, too-many-locals, too-many-statements, too-many-arguments
#pylint: disable=invalid-name, no-member, too-many-locals, too-many-statements, too-many-arguments
, too-many-branches
"""Schedule for conv2d_nchw with auto fusion"""
import
tvm
from
..
import
util
...
...
@@ -81,20 +81,20 @@ def conv2d_56_64_128(s, temp, temp_R, temp_S, Filter_S, Out, Out_L, flag):
thread_yz
=
tvm
.
thread_axis
((
0
,
vthread_y
),
"vthread"
,
name
=
"vy"
)
i
,
oc
,
h
,
w
=
s
[
Out
]
.
op
.
axis
w
=
s
[
Out
]
.
fuse
(
h
,
w
)
ow
,
iw
=
s
[
Out
]
.
split
(
w
,
factor
=
num_thread_x
*
vthread_x
)
oh
,
ih
=
s
[
Out
]
.
split
(
h
,
nparts
=
vthread_x
)
w
=
s
[
Out
]
.
fuse
(
ih
,
w
)
ooc
,
ioc
=
s
[
Out
]
.
split
(
oc
,
factor
=
num_thread_y
*
vthread_y
)
o
iw
,
iiw
=
s
[
Out
]
.
split
(
iw
,
nparts
=
v
thread_x
)
o
w
,
iw
=
s
[
Out
]
.
split
(
w
,
factor
=
num_
thread_x
)
oioc
,
iioc
=
s
[
Out
]
.
split
(
ioc
,
nparts
=
vthread_y
)
s
[
Out
]
.
reorder
(
i
,
ooc
,
o
w
,
oioc
,
oiw
,
iioc
,
i
iw
)
s
[
Out
]
.
bind
(
i
i
w
,
thread_x
)
s
[
Out
]
.
reorder
(
i
,
ooc
,
o
h
,
oioc
,
ow
,
iioc
,
iw
)
s
[
Out
]
.
bind
(
iw
,
thread_x
)
s
[
Out
]
.
bind
(
iioc
,
thread_y
)
s
[
Out
]
.
bind
(
o
i
w
,
thread_xz
)
s
[
Out
]
.
bind
(
ow
,
thread_xz
)
s
[
Out
]
.
bind
(
oioc
,
thread_yz
)
s
[
Out
]
.
bind
(
o
w
,
block_x
)
s
[
Out
]
.
bind
(
o
h
,
block_x
)
s
[
Out
]
.
bind
(
ooc
,
block_y
)
s
[
Out_L
]
.
compute_at
(
s
[
Out
],
i
i
w
)
s
[
Out_L
]
.
compute_at
(
s
[
Out
],
iw
)
# schedule Out_L local write
i
,
oc
,
h
,
w
=
s
[
Out_L
]
.
op
.
axis
...
...
@@ -216,7 +216,7 @@ def conv2d_56_64_128(s, temp, temp_R, temp_S, Filter_S, Out, Out_L, flag):
def
conv2d_14_256_256
(
s
,
temp
,
temp_R
,
temp_S
,
Filter
,
Filter_S
,
Out
,
Out_L
):
"""Schedule conv2d for specific feature_in_out_filter pattern"""
if
util
.
get_const_int
(
Filter
.
shape
[
1
])
==
256
:
if
util
.
get_const_int
(
Filter
.
shape
[
0
])
+
util
.
get_const_int
(
Filter
.
shape
[
1
])
<=
768
:
# scheduler params
vthread_x
=
util
.
get_const_int
(
Out
.
shape
[
3
])
num_thread_x
=
64
...
...
@@ -391,7 +391,7 @@ def conv2d_56_64_64(s, Filter, temp_S, Filter_S, Out, Out_L):
s
[
Filter_S
]
.
bind
(
ii
,
thread_y
)
def
schedule_conv2d_small_batch
(
outs
):
"""Create schedule for tensors or return error if batch size is lar
a
ger than 1"""
"""Create schedule for tensors or return error if batch size is larger than 1"""
s
=
tvm
.
create_schedule
([
x
.
op
for
x
in
outs
])
def
schedule
(
temp
,
Filter
,
Output
):
...
...
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