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 2020/01/17 08:23:01 UTC

[GitHub] [incubator-tvm] shoubhik commented on a change in pull request #4732: [QNN] Conv2D type checking for kernel per-channel scales.

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_r367815134
 
 

 ##########
 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");
+  AssignType(types[4], DataType::Float(32), weight->shape[axis], reporter);  // kernel scale
 
 Review comment:
   should this be types[5]? there is a types[4] on line 59.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services