shoubhik commented on a change in pull request #4732: [QNN] Conv2D type
checking for kernel per-channel scales.
URL: https://github.com/apache/incubator-tvm/pull/4732#discussion_r367817443
##########
File path: src/relay/qnn/op/convolution.cc
##########
@@ -57,7 +57,9 @@ bool QnnConv2DRel(const Array<Type>& types, int num_inputs,
const Attrs& attrs,
CHECK(IsScalarType(types[2], DataType::Int(32))); // input_zero_point
CHECK(IsScalarType(types[3], DataType::Int(32))); // kernel_zero_point
CHECK(IsScalarType(types[4], DataType::Float(32))); // input_scale
- CHECK(IsScalarType(types[5], DataType::Float(32))); // kernel_scale
+ // Kernel scale can be a vector of length output_channels or a scalar.
+ size_t axis = param->kernel_layout.find("O");
Review comment:
Also we should check what happens if there is no "O", just to be safe.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services