ONE - On-device Neural Engine
Loading...
Searching...
No Matches
nnfw_internal.h File Reference
#include "nnfw.h"

Go to the source code of this file.

Functions

NNFW_STATUS nnfw_set_config (nnfw_session *session, const char *key, const char *value)
 
NNFW_STATUS nnfw_get_config (nnfw_session *session, const char *key, char *value, size_t value_size)
 
NNFW_STATUS nnfw_load_circle_from_buffer (nnfw_session *session, uint8_t *buffer, size_t size)
 Load a circle model from buffer.
 
NNFW_STATUS nnfw_train_export_circleplus (nnfw_session *session, const char *file_path)
 Export circle+ model.
 

Function Documentation

◆ nnfw_get_config()

NNFW_STATUS nnfw_get_config ( nnfw_session session,
const char *  key,
char *  value,
size_t  value_size 
)

Definition at line 36 of file nnfw_internal.cc.

37{
39 return session->get_config(key, value, value_size);
40}
SessionID session(const coco::Module *m)
Definition Session.cpp:48
#define NNFW_RETURN_ERROR_IF_NULL(p)

References NNFW_RETURN_ERROR_IF_NULL.

◆ nnfw_load_circle_from_buffer()

NNFW_STATUS nnfw_load_circle_from_buffer ( nnfw_session session,
uint8_t *  buffer,
size_t  size 
)

Load a circle model from buffer.

The buffer must outlive the session.

Parameters
[in]sessionsession
[in]bufferPointer to the buffer
[in]sizeBuffer size
Returns
NNFW_STATUS

Definition at line 42 of file nnfw_internal.cc.

43{
45 return session->load_circle_from_buffer(buffer, size);
46}
int32_t size[5]
Definition Slice.cpp:35

References NNFW_RETURN_ERROR_IF_NULL, and size.

◆ nnfw_set_config()

NNFW_STATUS nnfw_set_config ( nnfw_session session,
const char *  key,
const char *  value 
)

Definition at line 30 of file nnfw_internal.cc.

31{
33 return session->set_config(key, value);
34}

References NNFW_RETURN_ERROR_IF_NULL.

◆ nnfw_train_export_circleplus()

NNFW_STATUS nnfw_train_export_circleplus ( nnfw_session session,
const char *  file_path 
)

Export circle+ model.

Note
This function should be called on training mode This function should be called before or after nnfw_train
Parameters
[in]sessionThe session to export training model
[in]file_pathThe path to export training model
Returns
NNFW_STATUS_NO_ERROR if successful

Definition at line 48 of file nnfw_internal.cc.

49{
51 return session->train_export_circleplus(path);
52}

References NNFW_RETURN_ERROR_IF_NULL.