sandeep-krishnamurthy commented on a change in pull request #15245: FP16
Support for C Predict API
URL: https://github.com/apache/incubator-mxnet/pull/15245#discussion_r300178693
##########
File path: include/mxnet/c_predict_api.h
##########
@@ -85,6 +85,44 @@ MXNET_DLL int MXPredCreate(const char* symbol_json_str,
const mx_uint* input_shape_data,
PredictorHandle* out);
+/*!
+ * \brief create a predictor
+ * \param symbol_json_str The JSON string of the symbol.
+ * \param param_bytes The in-memory raw bytes of parameter ndarray file.
+ * \param param_size The size of parameter ndarray file.
+ * \param dev_type The device type, 1: cpu, 2: gpu
+ * \param dev_id The device id of the predictor.
+ * \param num_input_nodes Number of input nodes to the net.
+ * For feedforward net, this is 1.
+ * \param input_keys The name of the input argument.
+ * For feedforward net, this is {"data"}
+ * \param input_shape_indptr Index pointer of shapes of each input node.
+ * The length of this array = num_input_nodes + 1.
+ * For feedforward net that takes 4 dimensional input, this is {0, 4}.
+ * \param input_shape_data A flattened data of shapes of each input node.
+ * For feedforward net that takes 4 dimensional input, this is the shape
data.
+ * \param num_provided_arg_dtypes
+ * The length of provided_arg_dtypes.
+ * \param provided_arg_dtype_names
+ * The provided_arg_dtype_names the names of args for which dtypes are
provided.
+ * \param provided_arg_dtypes
+ * The provided_arg_dtypes the dtype provided
+ * \param out The created predictor handle.
+ * \return 0 when success, -1 when failure.
+ */
+MXNET_DLL int MXPredCreateEx(const char* symbol_json_str,
+ const void* param_bytes,
+ int param_size,
+ int dev_type, int dev_id,
+ mx_uint num_input_nodes,
Review comment:
Agree. But, I was trying to understand why not const and what is the reason.
----------------------------------------------------------------
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