wkcn commented on a change in pull request #17270: Dynamic custom operator GPU support URL: https://github.com/apache/incubator-mxnet/pull/17270#discussion_r372696099
########## 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: I worry about the ABI compatibility of std::string, since MXNet and custom lib may be built in different version of compilers or different compilers, e.g. gcc5 and gcc 9, gcc and clang. The implementation of std::string may be different. A solution is to use a C string char*. ---------------------------------------------------------------- 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: us...@infra.apache.org With regards, Apache Git Services