API Reference Manual  1.45.0
odp_ml_model_param_t Struct Reference

Machine learning model parameters. More...

#include <ml_types.h>

Collaboration diagram for odp_ml_model_param_t:
[legend]

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_textra_param
 ODP implementation specific extra parameters. More...
 

Detailed Description

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.

Field Documentation

◆ model

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.

◆ max_compl_id

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.

◆ extra_stat_enable

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.

◆ num_inputs

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.

◆ num_outputs

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.

◆ input_format

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.

◆ output_format

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.

◆ extra_param

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.


The documentation for this struct was generated from the following file: