|
SHL 2.2.x
|
Functions | |
| struct csinn_session * | __attribute__ ((weak)) |
| Import binary model. More... | |
| struct csinn_session * | csinn_alloc_session () |
| Allocate a session. More... | |
| void | csinn_free_session (struct csinn_session *sess) |
| Release a session. More... | |
| void | csinn_session_init (struct csinn_session *sess) |
| Initialize session. More... | |
| void | csinn_session_deinit (struct csinn_session *sess) |
| Uninitialize session. More... | |
| int | csinn_session_setup (struct csinn_session *sess) |
| Setup function. More... | |
| int | csinn_session_run (struct csinn_session *sess) |
| Run function. More... | |
| int | csinn_load_binary_model (struct csinn_session *sess) |
| Load binary model. More... | |
| struct csinn_session * __attribute__ | ( | (weak) | ) |
Import binary model.
For the interface of hhb model, it is a further encapsulation of csinn_load_binary_model, defined as a weak function, and can be covered by a user-defined function with the same name.
| struct csinn_session * csinn_alloc_session | ( | ) |
Allocate a session.
csinn_session*This interface only allocates memory space. Initialization is performed by csinn_session_init complete. Each session refers to an instance of a model.
| void csinn_free_session | ( | struct csinn_session * | session | ) |
Release a session.
| [in] | session | The session to be released |
| void csinn_session_init | ( | struct csinn_session * | session | ) |
Initialize session.
| [in,out] | session | The session to be initialized |
Board specific initialization can be done in the interface, such as calling some initialization function interfaces of NPU.
| void csinn_session_deinit | ( | struct csinn_session * | session | ) |
Uninitialize session.
| [in,out] | session | The session to be uninitialized |
| int csinn_session_setup | ( | struct csinn_session * | session | ) |
Setup function.
| [in] | session | The session to be processed |
Build the interface of the graph when executing according to the graph. For example, you can call the compilation interface in the NPU driver here.
| int csinn_session_run | ( | struct csinn_session * | session | ) |
Run function.
| [in] | session | The session to be executed |
When executing according to the graph, actually implement the interface of the graph.
| int csinn_load_binary_model | ( | struct csinn_session * | session | ) |
Load binary model.
| [in] | session | The session to be executed |
There is no need to call csinn_session_setup when model binary execution is adopted.