Skip to content

Commit

Permalink
fixed depthwise conv2d padding
Browse files Browse the repository at this point in the history
  • Loading branch information
Wheest committed Dec 22, 2020
1 parent 39bf9de commit f574452
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions python/tvm/topi/nn/depthwise_conv2d.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,10 @@
"out_filter",
"hkernel",
"wkernel",
"hpad",
"wpad",
"padt",
"padb",
"padl",
"padr",
"hstride",
"wstride",
],
Expand All @@ -51,7 +53,7 @@ def _get_workload(data, kernel, stride, padding, out_dtype):
_, in_channel, height, width = [x.value for x in data.shape]
channel, channel_multiplier, kh, kw = [x.value for x in kernel.shape]
out_channel = channel * channel_multiplier
HPAD, WPAD, _, _ = get_pad_tuple(padding, kernel)
pt, pl, pb, pr = get_pad_tuple(padding, kernel)
if isinstance(stride, (tuple, list)):
HSTR, WSTR = stride
else:
Expand All @@ -71,8 +73,10 @@ def _get_workload(data, kernel, stride, padding, out_dtype):
out_channel,
kh,
kw,
HPAD,
WPAD,
pt,
pl,
pb,
pr
HSTR,
WSTR,
)
Expand Down

0 comments on commit f574452

Please sign in to comment.