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/03/16 19:12:03 UTC

[GitHub] [incubator-tvm] yzhliu commented on a change in pull request #5066: [ConvertLayout] Support QNN ops.

yzhliu commented on a change in pull request #5066: [ConvertLayout] Support QNN ops.
URL: https://github.com/apache/incubator-tvm/pull/5066#discussion_r393239514
 
 

 ##########
 File path: src/relay/qnn/op/convolution.cc
 ##########
 @@ -68,6 +68,23 @@ bool QnnConv2DRel(const Array<Type>& types, int num_inputs, const Attrs& attrs,
   return Conv2DRel<Conv2DAttrs>(tensor_types, 3, attrs, reporter);
 }
 
+Array<Array<Layout>> QnnConvInferCorrectLayout(const Attrs& attrs,
+                                               const Array<Layout>& new_in_layouts,
+                                               const Array<Layout>& old_in_layouts,
+                                               const Array<tvm::relay::Type>& old_in_types) {
+  // Use Relay Conv2D Infer correct layout.
+  auto layouts =
+      ConvInferCorrectLayout<Conv2DAttrs>(attrs, new_in_layouts, old_in_layouts, old_in_types);
+
+  // Fill the layouts of remaining input tensors - scales and zero points. The layouts of these
+  // tensors can be ignored as they dont go through any transformation.
+  Layout ignore_layout = Layout("I");
 
 Review comment:
   are them always input channel?

----------------------------------------------------------------
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