eric-haibin-lin commented on a change in pull request #7947: [WIP] Refactor 
infer storage function for sparse operators.
URL: https://github.com/apache/incubator-mxnet/pull/7947#discussion_r141200581
 
 

 ##########
 File path: src/c_api/c_api_function.cc
 ##########
 @@ -107,6 +107,24 @@ void Backward(const OpStatePtr& state,
   Imperative::Get()->set_is_recording(prev_recording);
 }
 
+// infer storage function for custom op, which assigns kDefaultStorage for
+// all undefined stypes, and dispatch on kDispatchFComputeEx.
+inline bool CustomFunctionStorageType(const nnvm::NodeAttrs& attrs,
+                                      const int dev_mask,
+                                      int* dispatch_mode,
+                                      std::vector<int> *iattr,
+                                      std::vector<int> *oattr) {
+  for (int& v : *oattr) {
 
 Review comment:
   Well I still need to write to that address in the for loop. Does it really 
harm?
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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