You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by GitBox <gi...@apache.org> on 2022/04/12 20:58:42 UTC
[GitHub] [tvm] AndrewZhaoLuo commented on a diff in pull request #10952: [QNN] Support input scale and zp of 1-element vector in qnn.conv2d_transpose
AndrewZhaoLuo commented on code in PR #10952:
URL: https://github.com/apache/tvm/pull/10952#discussion_r848863908
##########
python/tvm/relay/qnn/op/legalizations.py:
##########
@@ -91,12 +91,30 @@ def qnn_conv2d_transpose_legalize(attrs, inputs, types):
# Collect the input exprs.
data, kernel, input_zero_point, kernel_zero_point, _, _ = inputs
- shift_data = relay.subtract(
Review Comment:
subtract should already have numpy style broadcasting so I'm not sure you need to replace the things here,
##########
src/relay/qnn/op/convolution_transpose.cc:
##########
@@ -107,12 +107,22 @@ bool QnnConv2DTransposeRel(const Array<Type>& types, int num_inputs, const Attrs
return false;
}
}
- ICHECK(IsScalarType(types[2], DataType::Int(32))); // input_zero_point
const auto* weight_zp_type = types[3].as<TensorTypeNode>();
ICHECK(weight_zp_type->dtype == DataType::Int(32)); // weight_zero_point
- ICHECK(IsScalarType(types[4], DataType::Float(32))); // input_scale
Review Comment:
This appears to be the main change
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org