From 7ea9e7bb67fc0a90dfdb7544967ae2bf783fd6fa Mon Sep 17 00:00:00 2001 From: =?utf8?q?=EC=9D=B4=EC=83=81=EA=B7=9C/On-Device=20Lab=28SR=29/Princip?= =?utf8?q?al=20Engineer/=EC=82=BC=EC=84=B1=EC=A0=84=EC=9E=90?= Date: Mon, 14 Oct 2019 15:13:34 +0900 Subject: [PATCH] [nnfw-api] explain nnfw_set_backend and nnfw_set_op_backend more (#8071) It explains more about nnfw_set_backend and nnfw_set_op_backend. Signed-off-by: Sanggyu Lee --- runtimes/include/nnfw.h | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/runtimes/include/nnfw.h b/runtimes/include/nnfw.h index 456781e..5803866 100644 --- a/runtimes/include/nnfw.h +++ b/runtimes/include/nnfw.h @@ -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); -- 2.7.4