25#ifndef INCLUDE_CSINN_RUNTIME_H_
26#define INCLUDE_CSINN_RUNTIME_H_
35#if (!defined SHL_BUILD_RTOS)
68#define VERSION_MAJOR 2
69#define VERSION_MINOR 0
70#define VERSION_PATCH 0
71#define VERSION_SHIFT 8
72int csinn_version(
char *vstr);
int csinn_get_input(int index, struct csinn_tensor *input, struct csinn_session *sess)
Get the specified input of the model.
Definition: setup.c:326
int csinn_set_input(int index, struct csinn_tensor *input, struct csinn_session *sess)
Set the specified input of the model.
Definition: setup.c:290
int csinn_set_output(int index, struct csinn_tensor *output, struct csinn_session *sess)
Set the specified output of the model.
Definition: setup.c:272
int csinn_get_output(int index, struct csinn_tensor *output, struct csinn_session *sess)
Get the specified output of the model.
Definition: setup.c:308
void csinn_set_input_number(int number, struct csinn_session *sess)
Set the input number of the model.
Definition: setup.c:218
int csinn_get_input_number(struct csinn_session *sess)
Get the input number of the model.
Definition: setup.c:254
int csinn_set_tensor_entry(struct csinn_tensor *tensor, struct csinn_session *sess)
Set input nodes.
Definition: setup.c:445
void csinn_set_output_number(int number, struct csinn_session *sess)
Set the output number of the model.
Definition: setup.c:200
int csinn_update_input(int index, struct csinn_tensor *input, struct csinn_session *sess)
Update specified input information.
Definition: setup.c:344
int csinn_get_output_number(struct csinn_session *sess)
Get the output number of the model.
Definition: setup.c:236
int csinn_update_output(int index, struct csinn_tensor *output, struct csinn_session *sess)
Update specified output information.
Definition: setup.c:375
void csinn_free_params(void *params)
Release a structure described by an operator parameter.
Definition: utils.c:381
void * csinn_alloc_params(int params_size, struct csinn_session *session)
Allocate a basic structure common to all operators.
Definition: utils.c:361
void csinn_session_init(struct csinn_session *session)
Initialize session.
Definition: setup.c:167
int csinn_load_binary_model(struct csinn_session *session)
Load binary model.
Definition: setup.c:462
struct csinn_session * __attribute__((weak)) csinn_import_binary_model(char *bm_addr)
Import binary model.
Definition: format.c:951
void csinn_free_session(struct csinn_session *session)
Release a session.
Definition: setup.c:107
int csinn_session_run(struct csinn_session *session)
Run function.
Definition: setup.c:419
struct csinn_session * csinn_alloc_session()
Allocate a session.
Definition: setup.c:91
int csinn_session_setup(struct csinn_session *session)
Setup function.
Definition: setup.c:393
void csinn_session_deinit(struct csinn_session *session)
Uninitialize session.
Definition: setup.c:184
int csinn_tensor_layout_convert(struct csinn_tensor *dest, struct csinn_tensor *src)
Convert the layout of source and target tensor.
Definition: utils.c:1578
void csinn_realloc_quant_info(struct csinn_tensor *tensor, int quant_info_num)
Reallocate a specified amount of quantitative information.
Definition: utils.c:309
int csinn_tensor_size(struct csinn_tensor *tensor)
Get the number of elements in the tensor.
Definition: utils.c:226
struct csinn_tensor * csinn_alloc_tensor(struct csinn_session *session)
Allocate a tensor structure.
Definition: utils.c:289
void csinn_tensor_copy(struct csinn_tensor *dest, struct csinn_tensor *src)
Copying tensor, excluding data in tensor.
Definition: utils.c:323
void csinn_free_tensor(struct csinn_tensor *tensor)
Release a tensor structure.
Definition: utils.c:346
int csinn_tensor_data_convert(struct csinn_tensor *dest, struct csinn_tensor *src)
Numerical conversion according to the data type of source and target tensor.
Definition: utils.c:1806
int csinn_tensor_byte_size(struct csinn_tensor *tensor)
Get the number of bytes of elements in the tensor.
Definition: utils.c:253
Definition: csinn_data_structure.h:502
struct csinn_tensor ** input
Definition: csinn_data_structure.h:516
struct csinn_tensor ** output
Definition: csinn_data_structure.h:517
Definition: csinn_data_structure.h:475