You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by GitBox <gi...@apache.org> on 2020/04/20 19:55:27 UTC

[GitHub] [incubator-mxnet] ptrendx commented on a change in pull request #17885: [WIP] MXNet Extensions enhancements

ptrendx commented on a change in pull request #17885:
URL: https://github.com/apache/incubator-mxnet/pull/17885#discussion_r411649874



##########
File path: example/extensions/lib_custom_op/gemm_lib.cc
##########
@@ -136,13 +137,13 @@ MXReturnValue inferType(std::map<std::string, std::string> attrs,
     }
   }
 
-  outtypes[0] = intypes[0];
+  outtypes->at(0) = intypes[0];
   return MX_SUCCESS;
 }
 
-MXReturnValue inferShape(std::map<std::string, std::string> attrs,
-                         std::vector<std::vector<unsigned int>> &inshapes,
-                         std::vector<std::vector<unsigned int>> &outshapes) {
+MXReturnValue inferShape(const std::unordered_map<std::string, std::string>& attrs,
+                         const std::vector<std::vector<unsigned int>>& inshapes,

Review comment:
       This should not be a const ref - the operator should be able to infer shapes in the other direction (output -> input) as well.




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