API Reference Manual
1.48.0
|
Machine learning model parameters. More...
#include <ml_types.h>
Data Fields | |
uint32_t | engine_id |
Engine ID. More... | |
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 694 of file api/spec/ml_types.h.
uint32_t odp_ml_model_param_t::engine_id |
Engine ID.
Engine ID to be used with the model. In a system with multiple ML engines, this parameter selects the engine to be configured. Values in the range 1..odp_ml_num_engines() select a specific engine and the special value of ODP_ML_ENGINE_ANY means that ODP selects the engine to be used. The default value is ODP_ML_ENGINE_ANY.
Definition at line 704 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 711 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 723 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 731 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 749 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 758 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 767 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 776 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 788 of file api/spec/ml_types.h.