Skip to content

Commit 37865ee

Browse files
committed
Final bugfixes for working VWW model
1 parent f917628 commit 37865ee

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

python/tvm/topi/arm_cpu/qnn.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ def qnn_conv2d(attrs, inputs, out_type):
262262
# Make a few checks to unpack the function arguments and ensure it was called with the right
263263
# arguments. Note that unlike most schedules, qnn_conv2d does not use a wrapper.
264264
assert len(inputs) == 11
265-
assert not any(get_const_tuple(attrs.paddding))
265+
assert not any(get_const_tuple(attrs.padding))
266266

267267
data, kernel, _izp, _kzp, _iscale, _kscale, bias, scale = inputs[0:8]
268268
_, height, width, in_channels = get_const_tuple(data.shape)
@@ -339,7 +339,7 @@ def qnn_depthwise_conv2d(attrs, inputs, out_type):
339339
"""
340340

341341
assert len(inputs) == 11
342-
assert not any(get_const_tuple(attrs.paddding))
342+
assert not any(get_const_tuple(attrs.padding))
343343
data, kernel, _izp, _kzp, _iscale, _kscale, bias, scale = inputs[0:8]
344344
_, _, height, width = get_const_tuple(data.shape)
345345
_, out_channels, kernel_h, kernel_w = get_const_tuple(kernel.shape)
@@ -473,7 +473,7 @@ def qnn_unrolled_depthwise_conv2d(attrs, inputs, out_type):
473473
"""
474474

475475
assert len(inputs) == 11
476-
assert not any(get_const_tuple(attrs.paddding))
476+
assert not any(get_const_tuple(attrs.padding))
477477
y_stride, x_stride = get_const_tuple(attrs.strides)
478478
assert y_stride == x_stride == 1
479479

python/tvm/topi/arm_cpu/qnn_alter_op.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,8 +116,8 @@ def alter_conv2d_layout(attrs, inputs, _tinfos, _out_type):
116116
)
117117

118118
# If possible, modify depthwise ops to take as input NCHW instead.
119-
#if is_depthwise and prev_ops_match(op.args[0], ("cast", "qnn.requantize", "add", "qnn.conv2d")):
120-
# op = _alter_depthwise_conv2d_layout(op)
119+
if is_depthwise and prev_ops_match(op.args[0], ("cast", "qnn.requantize", "add", "qnn.conv2d")):
120+
op = _alter_depthwise_conv2d_layout(op)
121121

122122
return op
123123

0 commit comments

Comments
 (0)