rondogency commented on a change in pull request #17270: Dynamic custom 
operator GPU support
URL: https://github.com/apache/incubator-mxnet/pull/17270#discussion_r372699354
 
 

 ##########
 File path: include/mxnet/lib_api.h
 ##########
 @@ -203,6 +214,16 @@ enum MXDType {
   kUNSET = 100,
 };
 
+/*!
+ * \brief Context info passing from MXNet OpContext
+ * dev_type is string repr of supported context, currently only "cpu" and "gpu"
+ * dev_id is the device index where the tensor locates
+ */
+typedef struct {
+  std::string dev_type;
 
 Review comment:
   no, this string only serves as an easy way for custom library to check the 
device type, the actual context names passed from custom library to MXNet are 
still in const char *. Line 971 in lib_api.h is what we passed through the 
boundary

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