From d4fb4c17271917f25e9139d2479f111be0f2051b Mon Sep 17 00:00:00 2001 From: Jaeyun Date: Mon, 10 Feb 2020 17:19:44 +0900 Subject: [PATCH] [Api] prepare release process Update API description and prepare release process. Signed-off-by: Jaeyun --- api/capi/include/nnstreamer-single.h | 17 ++++++++--------- api/capi/include/nnstreamer.h | 32 ++++++++++++++++---------------- 2 files changed, 24 insertions(+), 25 deletions(-) diff --git a/api/capi/include/nnstreamer-single.h b/api/capi/include/nnstreamer-single.h index 7b56cc1..b0502b2 100644 --- a/api/capi/include/nnstreamer-single.h +++ b/api/capi/include/nnstreamer-single.h @@ -58,8 +58,6 @@ typedef void *ml_single_h; * @param[in] input_info This is required if the given model has flexible input * dimension, where the input dimension MUST be given * before executing the model. - * However, once it's given, the input dimension cannot - * be changed for the given model handle. * It is required by some custom filters of NNStreamer. * You may set NULL if it's not required. * @param[in] output_info This is required if the given model has flexible output dimension. @@ -70,9 +68,9 @@ typedef void *ml_single_h; * @return @c 0 on success. Otherwise a negative error value. * @retval #ML_ERROR_NONE Successful * @retval #ML_ERROR_NOT_SUPPORTED Not supported. + * @retval #ML_ERROR_PERMISSION_DENIED The application does not have the privilege to access to the media storage or external storage. * @retval #ML_ERROR_INVALID_PARAMETER Fail. The parameter is invalid. * @retval #ML_ERROR_STREAMS_PIPE Failed to start the pipeline. - * @retval #ML_ERROR_PERMISSION_DENIED The application does not have the privilege to access to the media storage or external storage. * @retval #ML_ERROR_OUT_OF_MEMORY Failed to allocate required memory. */ int ml_single_open (ml_single_h *single, const char *model, const ml_tensors_info_h input_info, const ml_tensors_info_h output_info, ml_nnfw_type_e nnfw, ml_nnfw_hw_e hw); @@ -108,8 +106,9 @@ int ml_single_close (ml_single_h single); int ml_single_invoke (ml_single_h single, const ml_tensors_data_h input, ml_tensors_data_h *output); /** - * @brief Invokes the model with the given input data with the given info. - * @details This function changes the input data dimensions for the model. + * @brief Invokes the model with the given input data with the given tensors information. + * @details This function changes the input tensors information for the model, and returns the corresponding output data. + * A model/framework may not support changing the information. * Note that this has a default timeout of 3 seconds. If an application wants to change the time to wait for an output, set the timeout using ml_single_set_timeout(). * @since_tizen 6.0 * @param[in] single The model handle to be inferred. @@ -161,14 +160,14 @@ int ml_single_get_output_info (ml_single_h single, ml_tensors_info_h *info); /** * @brief Sets the information (tensor dimension, type, name and so on) of required input data for the given model. - * @details Note that a model/framework may not support setting such information. + * @details Note that a model/framework may not support changing the information. + * Use ml_single_get_input_info() and ml_single_get_output_info() instead for this framework. * @since_tizen 6.0 * @param[in] single The model handle. * @param[in] info The handle of input tensors information. * @return @c 0 on success. Otherwise a negative error value. * @retval #ML_ERROR_NONE Successful - * @retval #ML_ERROR_NOT_SUPPORTED This implies that the given framework does not support dynamic dimensions. - * Use ml_single_get_input_info() and ml_single_get_output_info() instead for this framework. + * @retval #ML_ERROR_NOT_SUPPORTED Not supported. * @retval #ML_ERROR_INVALID_PARAMETER Fail. The parameter is invalid. */ int ml_single_set_input_info (ml_single_h single, const ml_tensors_info_h info); @@ -187,7 +186,7 @@ int ml_single_set_timeout (ml_single_h single, unsigned int timeout); /** * @brief Sets the property value for the given model. - * @details Note that a model/framework may not support to change the property after opening the model. + * @details Note that a model/framework may not support changing the property after opening the model. * @since_tizen 6.0 * @param[in] single The model handle. * @param[in] name The property name. diff --git a/api/capi/include/nnstreamer.h b/api/capi/include/nnstreamer.h index 5737806..1631951 100644 --- a/api/capi/include/nnstreamer.h +++ b/api/capi/include/nnstreamer.h @@ -115,21 +115,21 @@ typedef void *ml_pipeline_valve_h; /** * @brief Types of NNFWs. + * @details To check if a nnfw-type is supported in a system, an application may call the API, ml_check_nnfw_availability(). * @since_tizen 5.5 - * @details To check if a nnfw-type is supported in a system, an application may call the API, ml_check_nnfw_availability() */ typedef enum { ML_NNFW_TYPE_ANY = 0, /**< NNHW is not specified (Try to determine the NNFW with file extension). */ ML_NNFW_TYPE_CUSTOM_FILTER = 1, /**< Custom filter (Independent shared object). */ ML_NNFW_TYPE_TENSORFLOW_LITE = 2, /**< Tensorflow-lite (.tflite). */ ML_NNFW_TYPE_TENSORFLOW = 3, /**< Tensorflow (.pb). */ - ML_NNFW_TYPE_NNFW = 4, /**< Neural Network Inference framework, which is developed by Samsung Research. */ - ML_NNFW_TYPE_MVNC = 5, /**< Intel NCSDK (libmvnc). */ - ML_NNFW_TYPE_OPENVINO = 6, /**< Intel openVINO. */ - ML_NNFW_TYPE_VIVANTE = 7, /**< VeriSilicon's Vivante (TBD) */ - ML_NNFW_TYPE_EDGE_TPU = 8, /**< Google Coral edge TPU (USB) */ - ML_NNFW_TYPE_ARMNN = 9, /**< Arm Neural Network framework (support for caffe and tensorflow-lite) */ - ML_NNFW_TYPE_SNAP = 0x2001, /**< SNAP (Samsung Neural Acceleration Platform), only for Android. */ + ML_NNFW_TYPE_NNFW = 4, /**< Neural Network Inference framework, which is developed by SR (Samsung Research). */ + ML_NNFW_TYPE_MVNC = 5, /**< Intel Movidius Neural Compute SDK (libmvnc). (Since 6.0) */ + ML_NNFW_TYPE_OPENVINO = 6, /**< Intel OpenVINO. (Since 6.0) */ + ML_NNFW_TYPE_VIVANTE = 7, /**< VeriSilicon's Vivante. (Since 6.0) */ + ML_NNFW_TYPE_EDGE_TPU = 8, /**< Google Coral Edge TPU (USB). (Since 6.0) */ + ML_NNFW_TYPE_ARMNN = 9, /**< Arm Neural Network framework (support for caffe and tensorflow-lite). (Since 6.0) */ + ML_NNFW_TYPE_SNAP = 0x2001, /**< SNAP (Samsung Neural Acceleration Platform), only for Android. (Since 6.0) */ } ml_nnfw_type_e; /** @@ -140,14 +140,14 @@ typedef enum { ML_NNFW_HW_ANY = 0, /**< Hardware resource is not specified. */ ML_NNFW_HW_AUTO = 1, /**< Try to schedule and optimize if possible. */ ML_NNFW_HW_CPU = 0x1000, /**< 0x1000: any CPU. 0x1nnn: CPU # nnn-1. */ - ML_NNFW_HW_CPU_NEON = 0x1100, /**< 0x1100: NEON in CPU. */ + ML_NNFW_HW_CPU_NEON = 0x1100, /**< 0x1100: NEON in CPU. (Since 6.0) */ ML_NNFW_HW_GPU = 0x2000, /**< 0x2000: any GPU. 0x2nnn: GPU # nnn-1. */ ML_NNFW_HW_NPU = 0x3000, /**< 0x3000: any NPU. 0x3nnn: NPU # nnn-1. */ - ML_NNFW_HW_NPU_MOVIDIUS = 0x3001, /**< 0x3001: Intel Movidius Stick. */ - ML_NNFW_HW_NPU_EDGE_TPU = 0x3002, /**< 0x3002: Google Coral Edge TPU (USB). */ - ML_NNFW_HW_NPU_VIVANTE = 0x3003, /**< 0x3003: VeriSilicon's Vivante (TBD). */ - ML_NNFW_HW_NPU_SRCN = 0x3004, /**< 0x3004: SRCN backend supported with NNFW-runtime. */ - ML_NNFW_HW_NPU_SR = 0x3100, /**< 0x3100: any SR made NPU. */ + ML_NNFW_HW_NPU_MOVIDIUS = 0x3001, /**< 0x3001: Intel Movidius Stick. (Since 6.0) */ + ML_NNFW_HW_NPU_EDGE_TPU = 0x3002, /**< 0x3002: Google Coral Edge TPU (USB). (Since 6.0) */ + ML_NNFW_HW_NPU_VIVANTE = 0x3003, /**< 0x3003: VeriSilicon's Vivante. (Since 6.0) */ + ML_NNFW_HW_NPU_SR = 0x3100, /**< 0x3100: any SR (Samsung Research) made NPU. (Since 6.0) */ + ML_NNFW_HW_NPU_SRCN = 0x3101, /**< 0x3101: SRCN (Samsung R&D Institute China-Nanjing) backend supported with NNFW-runtime. (Since 6.0) */ } ml_nnfw_hw_e; /** @@ -182,7 +182,7 @@ typedef enum { ML_ERROR_TIMED_OUT = TIZEN_ERROR_TIMED_OUT, /**< Time out */ ML_ERROR_NOT_SUPPORTED = TIZEN_ERROR_NOT_SUPPORTED, /**< The feature is not supported */ ML_ERROR_PERMISSION_DENIED = TIZEN_ERROR_PERMISSION_DENIED, /**< Permission denied */ - ML_ERROR_OUT_OF_MEMORY = TIZEN_ERROR_OUT_OF_MEMORY, /**< Out of memory */ + ML_ERROR_OUT_OF_MEMORY = TIZEN_ERROR_OUT_OF_MEMORY, /**< Out of memory (Since 6.0) */ } ml_error_e; /** @@ -259,9 +259,9 @@ typedef void (*ml_pipeline_state_cb) (ml_pipeline_state_e state, void *user_data * @return @c 0 on success. Otherwise a negative error value. * @retval #ML_ERROR_NONE Successful * @retval #ML_ERROR_NOT_SUPPORTED Not supported. + * @retval #ML_ERROR_PERMISSION_DENIED The application does not have the required privilege to access to the media storage, external storage, microphone, or camera. * @retval #ML_ERROR_INVALID_PARAMETER Given parameter is invalid. (Pipeline is not negotiated yet.) * @retval #ML_ERROR_STREAMS_PIPE Pipeline construction is failed because of wrong parameter or initialization failure. - * @retval #ML_ERROR_PERMISSION_DENIED The application does not have the required privilege to access to the media storage, external storage, microphone, or camera. * @retval #ML_ERROR_OUT_OF_MEMORY Failed to allocate required memory to construct the pipeline. * * @pre The pipeline state should be #ML_PIPELINE_STATE_UNKNOWN or #ML_PIPELINE_STATE_NULL. -- 2.7.4