SHL 2.2.x
|
#include <assert.h>
#include <float.h>
#include <math.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <omp.h>
#include "csinn_data_structure.h"
Go to the source code of this file.
Functions | |
int | csinn_tensor_size (struct csinn_tensor *tensor) |
Get the number of elements in the tensor. More... | |
int | csinn_tensor_byte_size (struct csinn_tensor *tensor) |
Get the number of bytes of elements in the tensor. More... | |
struct csinn_tensor * | csinn_alloc_tensor (struct csinn_session *session) |
Allocate a tensor structure. More... | |
void | csinn_free_tensor (struct csinn_tensor *tensor) |
Release a tensor structure. More... | |
void | csinn_realloc_quant_info (struct csinn_tensor *tensor, int quant_info_num) |
Reallocate a specified amount of quantitative information. More... | |
void | csinn_tensor_copy (struct csinn_tensor *dest, struct csinn_tensor *src) |
Copying tensor, excluding data in tensor. More... | |
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. More... | |
int | csinn_tensor_layout_convert (struct csinn_tensor *dest, struct csinn_tensor *src) |
Convert the layout of source and target tensor. More... | |
void * | csinn_alloc_params (int params_size, struct csinn_session *session) |
Allocate a basic structure common to all operators. More... | |
void | csinn_free_params (void *params) |
Release a structure described by an operator parameter. More... | |
struct csinn_session * | csinn_alloc_session () |
Allocate a session. More... | |
void | csinn_free_session (struct csinn_session *session) |
Release a session. More... | |
void | csinn_session_init (struct csinn_session *session) |
Initialize session. More... | |
void | csinn_session_deinit (struct csinn_session *session) |
Uninitialize session. More... | |
int | csinn_session_setup (struct csinn_session *session) |
Setup function. More... | |
int | csinn_session_run (struct csinn_session *session) |
Run function. More... | |
int | csinn_load_binary_model (struct csinn_session *session) |
Load binary model. More... | |
struct csinn_session * | __attribute__ ((weak)) csinn_import_binary_model(char *bm_addr) |
Import binary model. More... | |
void | csinn_set_input_number (int number, struct csinn_session *sess) |
Set the input number of the model. More... | |
void | csinn_set_output_number (int number, struct csinn_session *sess) |
Set the output number of the model. More... | |
int | csinn_get_input_number (struct csinn_session *sess) |
Get the input number of the model. More... | |
int | csinn_get_output_number (struct csinn_session *sess) |
Get the output number of the model. More... | |
int | csinn_set_input (int index, struct csinn_tensor *input, struct csinn_session *sess) |
Set the specified input of the model. More... | |
int | csinn_set_output (int index, struct csinn_tensor *output, struct csinn_session *sess) |
Set the specified output of the model. More... | |
int | csinn_get_input (int index, struct csinn_tensor *input, struct csinn_session *sess) |
Get the specified input of the model. More... | |
int | csinn_get_output (int index, struct csinn_tensor *output, struct csinn_session *sess) |
Get the specified output of the model. More... | |
int | csinn_update_input (int index, struct csinn_tensor *input, struct csinn_session *sess) |
Update specified input information. More... | |
int | csinn_update_output (int index, struct csinn_tensor *output, struct csinn_session *sess) |
Update specified output information. More... | |
int | csinn_set_tensor_entry (struct csinn_tensor *tensor, struct csinn_session *sess) |
Set input nodes. More... | |