[nnfw-api] explain nnfw_set_backend and nnfw_set_op_backend more (#8071)
author이상규/On-Device Lab(SR)/Principal Engineer/삼성전자 <sg5.lee@samsung.com>
Mon, 14 Oct 2019 06:13:34 +0000 (15:13 +0900)
committer오형석/On-Device Lab(SR)/Staff Engineer/삼성전자 <hseok82.oh@samsung.com>
Mon, 14 Oct 2019 06:13:33 +0000 (15:13 +0900)
It explains more about nnfw_set_backend and nnfw_set_op_backend.

Signed-off-by: Sanggyu Lee <sg5.lee@samsung.com>
runtimes/include/nnfw.h

index 456781e..5803866 100644 (file)
@@ -174,22 +174,36 @@ NNFW_STATUS nnfw_input_tensorinfo(nnfw_session *session, uint32_t index,
 NNFW_STATUS nnfw_output_tensorinfo(nnfw_session *session, uint32_t index,
                                    nnfw_tensorinfo *tensor_info);
 
-/*
- * Set default backend
+/**
+ * @brief     Set default backend for all operators
+ *
+ *            Note: This function should be called before {@link nnfw_prepare} is invoked.
+ *            Possible backend strings are: "cpu", "acl_cl", "acl_neon"
+ *            Supported backends differs on each platforms.
+ *            For example, `x86_64` supports "cpu" only.
  *
  * @param[in] session session to which a default backend is set
  * @param[in] backend default backend
+ *
+ * @return @c NNFW_STATUS_NO_ERROR if successful
  */
 NNFW_STATUS nnfw_set_default_backend(nnfw_session *session, const char *backend);
 
-/*
- * Set the operation's backend
+/**
+ * @brief     Set the operation's backend
+ *
+ *            Note: This function should be called before {@link nnfw_prepare} is invoked.
+ *            Possible backend strings are: "cpu", "acl_cl", "acl_neon"
+ *            Supported backends differs on each platforms.
+ *            For example, `x86_64` supports "cpu" only.
+ *            The backend for op has higher priority than default backend specified by
+ * nnfw_set_default_backend.
  *
  * @param[in] session session to be modified
  * @param[in] op operation to be set
  * @param[in] backend bakcend on which operation run
  *
- * @return NNFW_STATUS_NO_ERROR if successful
+ * @return @c NNFW_STATUS_NO_ERROR if successful
  */
 NNFW_STATUS nnfw_set_op_backend(nnfw_session *session, const char *op, const char *backend);