Menoh
|
Classes | |
struct | menoh_model_builder |
menoh_model_builder is helper for creation of model. More... | |
struct | menoh_model |
menoh_model is the main component to execute model inference. More... | |
Typedefs | |
typedef struct menoh_model_builder * | menoh_model_builder_handle |
typedef struct menoh_model * | menoh_model_handle |
Functions | |
menoh_error_code MENOH_API | menoh_make_model_builder (const menoh_variable_profile_table_handle variable_profile_table, menoh_model_builder_handle *dst_handle) |
Factory function for menoh_model_builder. More... | |
void MENOH_API | menoh_delete_model_builder (menoh_model_builder_handle model_builder) |
Delete function for model_builder. More... | |
menoh_error_code MENOH_API | menoh_model_builder_attach_external_buffer (menoh_model_builder_handle builder, const char *variable_name, void *buffer_handle) |
Attach a buffer which allocated by users. More... | |
menoh_error_code MENOH_API | menoh_build_model (const menoh_model_builder_handle builder, const menoh_model_data_handle model_data, const char *backend_name, const char *backend_config, menoh_model_handle *dst_model_handle) |
Factory function for menoh_model. More... | |
void MENOH_API | menoh_delete_model (menoh_model_handle model) |
Delete function for model. More... | |
menoh_error_code MENOH_API | menoh_model_get_variable_buffer_handle (const menoh_model_handle model, const char *variable_name, void **dst_data) |
Get a buffer handle attached to target variable. More... | |
menoh_error_code MENOH_API | menoh_model_get_variable_dtype (const menoh_model_handle model, const char *variable_name, menoh_dtype *dst_dtype) |
Get dtype of target variable. More... | |
menoh_error_code MENOH_API | menoh_model_get_variable_dims_size (const menoh_model_handle model, const char *variable_name, int32_t *dst_size) |
Get size of dims of target variable. More... | |
menoh_error_code MENOH_API | menoh_model_get_variable_dims_at (const menoh_model_handle model, const char *variable_name, int32_t index, int32_t *dst_size) |
Get an element of dims of target variable specified by index. More... | |
menoh_error_code MENOH_API | menoh_model_run (menoh_model_handle model) |
Run model inference. More... | |
typedef struct menoh_model_builder* menoh_model_builder_handle |
typedef struct menoh_model* menoh_model_handle |
menoh_error_code MENOH_API menoh_build_model | ( | const menoh_model_builder_handle | builder, |
const menoh_model_data_handle | model_data, | ||
const char * | backend_name, | ||
const char * | backend_config, | ||
menoh_model_handle * | dst_model_handle | ||
) |
Factory function for menoh_model.
void MENOH_API menoh_delete_model | ( | menoh_model_handle | model | ) |
Delete function for model.
Users must call to release memory resources allocated for model
void MENOH_API menoh_delete_model_builder | ( | menoh_model_builder_handle | model_builder | ) |
Delete function for model_builder.
Users must call to release memory resources allocated for model_builder
menoh_error_code MENOH_API menoh_make_model_builder | ( | const menoh_variable_profile_table_handle | variable_profile_table, |
menoh_model_builder_handle * | dst_handle | ||
) |
Factory function for menoh_model_builder.
menoh_error_code MENOH_API menoh_model_builder_attach_external_buffer | ( | menoh_model_builder_handle | builder, |
const char * | variable_name, | ||
void * | buffer_handle | ||
) |
Attach a buffer which allocated by users.
Users can attach a external buffer which they allocated to target variable.
Variables attached no external buffer are attached internal buffers allocated automatically.
menoh_error_code MENOH_API menoh_model_get_variable_buffer_handle | ( | const menoh_model_handle | model, |
const char * | variable_name, | ||
void ** | dst_data | ||
) |
Get a buffer handle attached to target variable.
Users can get a buffer handle attached to target variable.
If that buffer is allocated by users and attached to the variable by calling menoh_model_builder_attach_external_buffer(), returned buffer handle is same to it.
menoh_error_code MENOH_API menoh_model_get_variable_dims_at | ( | const menoh_model_handle | model, |
const char * | variable_name, | ||
int32_t | index, | ||
int32_t * | dst_size | ||
) |
Get an element of dims of target variable specified by index.
menoh_error_code MENOH_API menoh_model_get_variable_dims_size | ( | const menoh_model_handle | model, |
const char * | variable_name, | ||
int32_t * | dst_size | ||
) |
Get size of dims of target variable.
menoh_error_code MENOH_API menoh_model_get_variable_dtype | ( | const menoh_model_handle | model, |
const char * | variable_name, | ||
menoh_dtype * | dst_dtype | ||
) |
Get dtype of target variable.
menoh_error_code MENOH_API menoh_model_run | ( | menoh_model_handle | model | ) |
Run model inference.