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 2021/01/14 19:30:52 UTC

[GitHub] [tvm] comaniac commented on a change in pull request #7284: [ConvertLayout] Resize operator

comaniac commented on a change in pull request #7284:
URL: https://github.com/apache/tvm/pull/7284#discussion_r557640093



##########
File path: src/relay/op/image/resize.cc
##########
@@ -33,6 +33,23 @@ namespace relay {
 
 TVM_REGISTER_NODE_TYPE(ResizeAttrs);
 
+Array<Array<Layout> > ResizeInferCorrectLayout(const Attrs& attrs,
+                                               const Array<Layout>& new_in_layouts,
+                                               const Array<Layout>& old_in_layouts,
+                                               const Array<tvm::relay::Type>& old_in_types) {
+  // NOTE: Discard "const" qualifier here.
+  ResizeAttrs* params = const_cast<ResizeAttrs*>(attrs.as<ResizeAttrs>());
+
+  if (new_in_layouts.defined()) {

Review comment:
       When I was working on the `transpose`, I found that it's possible to have `new_in_layouts` defined but `new_in_layouts[0]` undefined. I'm not sure if it's a case in `resize` tho.




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