Skip to content

Commit

Permalink
Fix alter layout x86
Browse files Browse the repository at this point in the history
  • Loading branch information
wweic committed Oct 1, 2019
1 parent d2a0712 commit 7d8784b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions topi/python/topi/x86/conv2d_alter_op.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,12 @@ def _alter_conv2d_layout(attrs, inputs, tinfo, F):
ic_bn, oc_bn = cfg["tile_ic"].size[-1], cfg["tile_oc"].size[-1]
new_attrs[layout_name] = 'NCHW%dc' % ic_bn
new_attrs['out_layout'] = 'NCHW%dc' % oc_bn

# Remove attached compilation target because conv2d_NCHWc needs to create
# a conv2d_nchwc op and target is not one of conv2d's parameters.
if "target" in new_attrs:
del new_attrs["target"]

new_data = tvm.placeholder((batch_size, in_channel//ic_bn, height, width, ic_bn),
dtype=data_dtype)

Expand Down

0 comments on commit 7d8784b

Please sign in to comment.