anirudh2290 commented on a change in pull request #15245: FP16 Support for C Predict API URL: https://github.com/apache/incubator-mxnet/pull/15245#discussion_r300810482
########## File path: amalgamation/python/mxnet_predict.py ########## @@ -133,15 +199,38 @@ def __init__(self, symbol_file, handle = PredictorHandle() param_raw_bytes = bytearray(param_raw_bytes) ptr = (ctypes.c_char * len(param_raw_bytes)).from_buffer(param_raw_bytes) - _check_call(_LIB.MXPredCreate( + + # data types + num_provided_arg_types = 0 + # provided type argument names + provided_arg_type_names = ctypes.POINTER(ctypes.c_char_p)() + # provided types + provided_arg_type_data = ctypes.POINTER(mx_uint)() + if type_dict is not None: + provided_arg_type_names = [] + provided_arg_type_data = [] + for k, v in type_dict.items(): + v = np.dtype(v).type + if v in _DTYPE_NP_TO_MX: + provided_arg_type_names.append(k) Review comment: i think the issue is unrelated and limited to module API implementation in python frontend.. i think passing the map this way should be fine. ---------------------------------------------------------------- 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