rondogency commented on a change in pull request #15921: [WIP] dynamic custom 
operator support
URL: https://github.com/apache/incubator-mxnet/pull/15921#discussion_r318216694
 
 

 ##########
 File path: include/mxnet/lib_api.h
 ##########
 @@ -302,6 +307,39 @@ extern "C" {
     return retval;
   }
 
+  /*!
+   * \brief returns status of calling InferType function for operator from 
library
+   */
+  int _opCallInferType(inferType_t inferType, const char* const* keys,
+                        const char* const* vals, int num,
+                        int* intypes, int num_in, int* outtypes, int num_out) {
+    //create map of attributes from list
+    std::map<std::string, std::string> attrs;
+    for (int i = 0; i < num; i++) {
+      attrs[std::string(keys[i])] = std::string(vals[i]);
+    }
+
+    // create a vector of types for inputs
+    std::vector<int> in_types(num_in);
+    for (int i = 0; i < num_in; i++) {
+      in_types[i] = intypes[i];
+    }
+
+    // create a vector of types for outputs
+    std::vector<int> out_types(num_out);
 
 Review comment:
   that's a good point

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

Reply via email to