API Reference Manual
1.46.0
|
Machine learning model parameters. More...
#include <ml_types.h>
Data Fields | |
void * | model |
Model binary. More... | |
uint64_t | size |
Size of the model binary in bytes. | |
uint32_t | max_compl_id |
Maximum completion identifier value. More... | |
odp_bool_t | extra_stat_enable |
Enable / disable extra statistics counters. More... | |
struct { | |
uint32_t num_inputs | |
Number of model inputs. More... | |
uint32_t num_outputs | |
Number of model outputs. More... | |
const odp_ml_data_format_t * input_format | |
Model input data format array. More... | |
const odp_ml_data_format_t * output_format | |
Model output data format array. More... | |
} | extra_info |
Extra model information. More... | |
const odp_ml_model_extra_param_t * | extra_param |
ODP implementation specific extra parameters. More... | |
Machine learning model parameters.
Use odp_ml_model_param_init() to initialize the structure to its default values.
Definition at line 600 of file api/spec/ml_types.h.
void* odp_ml_model_param_t::model |
Model binary.
Points to model binary stored into a memory buffer. Model format is implementation specific.
Definition at line 606 of file api/spec/ml_types.h.
uint32_t odp_ml_model_param_t::max_compl_id |
Maximum completion identifier value.
When application uses asynchronous poll mode (ODP_ML_COMPL_MODE_POLL) operations with the model, it will choose completion identifier values between 0 and this value. Valid values range from 0 to max_compl_id capability. The default value is zero.
Definition at line 618 of file api/spec/ml_types.h.
odp_bool_t odp_ml_model_param_t::extra_stat_enable |
Enable / disable extra statistics counters.
Extra statistics may be read with odp_ml_model_extra_stats() when enabled. Statistics are disabled by default.
Definition at line 626 of file api/spec/ml_types.h.
uint32_t odp_ml_model_param_t::num_inputs |
Number of model inputs.
Number of model inputs and elements in 'input_format' array. When non-zero, the value must match the number of inputs defined in model metadata. The default value is 0.
Definition at line 644 of file api/spec/ml_types.h.
uint32_t odp_ml_model_param_t::num_outputs |
Number of model outputs.
Number of model outputs and elements in 'output_format' array. When non-zero, the value must match the number of outputs defined in model metadata. The default value is 0.
Definition at line 653 of file api/spec/ml_types.h.
const odp_ml_data_format_t* odp_ml_model_param_t::input_format |
Model input data format array.
Points to an array of data formats. The array has 'num_inputs' elements. Inputs are defined in the same order they are listed in model metadata. An odp_ml_model_create() call copies these values. The default value is NULL.
Definition at line 662 of file api/spec/ml_types.h.
const odp_ml_data_format_t* odp_ml_model_param_t::output_format |
Model output data format array.
Points to an array of data formats. The array has 'num_outputs' elements. Outputs are defined in the same order they are listed in model metadata. An odp_ml_model_create() call copies these values. The default value is NULL.
Definition at line 671 of file api/spec/ml_types.h.
struct { ... } odp_ml_model_param_t::extra_info |
Extra model information.
When model metadata misses some details of model input / output data format, user can pass those with this structure. When 'num_inputs' / 'num_outputs' is non-zero, data format of all model inputs / outputs are overridden by the provided values. Values are ignored when 'num_inputs' / 'num_outputs' is zero.
const odp_ml_model_extra_param_t* odp_ml_model_param_t::extra_param |
ODP implementation specific extra parameters.
See ODP implementation documentation for details about extra parameter usage. For example, extra parameters may give hints about HW resource usage with the model to be created. An odp_ml_model_create() call copies these parameter values. When NULL, all extra parameters are set to their default values. The default value is NULL.
Definition at line 683 of file api/spec/ml_types.h.