marcoabreu commented on a change in pull request #13964: Addresses comments in 
runtime feature discovery API
URL: https://github.com/apache/incubator-mxnet/pull/13964#discussion_r250477268
 
 

 ##########
 File path: include/mxnet/c_api.h
 ##########
 @@ -208,6 +208,24 @@ MXNET_DLL const char *MXGetLastError();
 //-------------------------------------
 // Part 0: Global State setups
 //-------------------------------------
+
+/*!
+ * \brief Check if a feature is enabled in the runtime
+ * \param feature to check mxruntime.h
+ * \param out set to true if the feature is enabled, false otherwise
+ * \return 0 when success, -1 when failure happens.
+ */
+MXNET_DLL int MXRuntimeHasFeature(const mx_uint feature, bool *out);
 
 Review comment:
   As far as I understand, this function is not intended for usage within high 
performance loops, so I would rather prefer usability instead of optimizing for 
a few bytes of allocation. I'm also in favour of a dictionary with the function 
name as key and the status as boolean value. For HPC cases, you could still 
cache the results if really necessary

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to