Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinthesun committed Jun 3, 2019
1 parent 395408f commit 0a6a274
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions topi/python/topi/x86/conv2d.py
Original file line number Diff line number Diff line change
Expand Up @@ -419,13 +419,14 @@ def _alter_conv2d_layout(attrs, inputs, tinfo, F):
# only optimize for NCHW
if layout != 'NCHW':
return None
if groups != 1 and not is_depthwise:
return None

assert attrs["kernel_layout"] == "OIHW"
kshape = get_const_tuple(kernel.shape)
is_depthwise = groups == kshape[0] and kshape[1] == 1

if groups != 1 and not is_depthwise:
return None

dispatch_ctx = autotvm.task.DispatchContext.current
target = tvm.target.current_target()
# query schedule and fallback if necessary
Expand Down

0 comments on commit 0a6a274

Please sign in to comment.