Skip to content

Commit 612a06b

Browse files
committed
fixed qlinearconv conversion for freeze_params=True
1 parent c7db0eb commit 612a06b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

python/tvm/relay/frontend/onnx.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3720,12 +3720,14 @@ def _impl_v10(cls, inputs, attr, params):
37203720
if attr["auto_pad"] in ("SAME_UPPER", "SAME_LOWER"):
37213721
# Warning: Convolution does not yet support dynamic shapes,
37223722
# one will need to run dynamic_to_static on this model after import
3723+
zp = fold_constant(x_zero_point), "Zero point expected to be a constant"
3724+
assert isinstance(zp, relay.Constant)
37233725
data = autopad(
37243726
data,
37253727
attr.get("strides", [1] * (ndim - 2)),
37263728
attr["kernel_shape"],
37273729
attr.get("dilations", [1] * (ndim - 2)),
3728-
pad_value=x_zero_point.data,
3730+
pad_value=zp.data,
37293731
mode=attr["auto_pad"],
37303732
)
37313733
elif attr["auto_pad"] == "VALID":

0 commit comments

Comments
 (0)