API Reference Manual  1.45.0
spec/ml.h File Reference

ODP Machine Learning (ML) offload. More...

#include <odp/visibility_begin.h>
#include <odp/api/event_types.h>
#include <odp/api/ml_types.h>
#include <odp/api/pool_types.h>
#include <odp/api/std_types.h>
#include <odp/visibility_end.h>
Include dependency graph for spec/ml.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

int odp_ml_capability (odp_ml_capability_t *capa)
 Query ML capabilities. More...
 
void odp_ml_config_init (odp_ml_config_t *config)
 Initialize ML configuration parameters. More...
 
int odp_ml_config (const odp_ml_config_t *config)
 Configure ML offload. More...
 
void odp_ml_model_param_init (odp_ml_model_param_t *param)
 Initialize ML model parameters. More...
 
odp_ml_model_t odp_ml_model_create (const char *name, const odp_ml_model_param_t *param)
 Create an ML model. More...
 
int odp_ml_model_destroy (odp_ml_model_t model)
 Destroy an ML model. More...
 
odp_ml_model_t odp_ml_model_lookup (const char *name)
 Find a model by name. More...
 
int odp_ml_model_load (odp_ml_model_t model, odp_ml_load_result_t *result)
 Load ML model. More...
 
int odp_ml_model_load_start (odp_ml_model_t model, const odp_ml_compl_param_t *compl_param)
 Start asynchronous model load. More...
 
int odp_ml_model_load_status (odp_ml_model_t model, uint32_t compl_id, odp_ml_load_result_t *result)
 Check model load completion. More...
 
int odp_ml_model_unload (odp_ml_model_t model, odp_ml_load_result_t *result)
 Unload ML model. More...
 
int odp_ml_model_unload_start (odp_ml_model_t model, const odp_ml_compl_param_t *compl_param)
 Start asynchronous model unload. More...
 
int odp_ml_model_unload_status (odp_ml_model_t model, uint32_t compl_id, odp_ml_load_result_t *result)
 Check model unload completion. More...
 
void odp_ml_run_param_init (odp_ml_run_param_t *param)
 Initialize model run parameters. More...
 
int odp_ml_run (odp_ml_model_t model, const odp_ml_data_t *data, const odp_ml_run_param_t *param)
 Run the model in synchronous mode. More...
 
int odp_ml_run_multi (odp_ml_model_t model, const odp_ml_data_t data[], const odp_ml_run_param_t param[], int num)
 Run the model multiple times in synchronous mode. More...
 
int odp_ml_run_start (odp_ml_model_t model, const odp_ml_data_t *data, const odp_ml_compl_param_t *compl_param, const odp_ml_run_param_t *run_param)
 Start model run in asynchronous mode. More...
 
int odp_ml_run_start_multi (odp_ml_model_t model, const odp_ml_data_t data[], const odp_ml_compl_param_t compl_param[], const odp_ml_run_param_t run_param[], int num)
 Start multiple model runs in asynchronous mode. More...
 
int odp_ml_run_status (odp_ml_model_t model, uint32_t compl_id, odp_ml_run_result_t *result)
 Check model run completion. More...
 
void odp_ml_compl_pool_param_init (odp_ml_compl_pool_param_t *param)
 Initialize ML completion event pool parameters. More...
 
odp_pool_t odp_ml_compl_pool_create (const char *name, const odp_ml_compl_pool_param_t *param)
 Create ML completion event pool. More...
 
odp_ml_compl_t odp_ml_compl_alloc (odp_pool_t pool)
 Allocate ML completion event. More...
 
void odp_ml_compl_free (odp_ml_compl_t ml_compl)
 Free ML completion event. More...
 
int odp_ml_compl_run_result (odp_ml_compl_t ml_compl, odp_ml_run_result_t *result)
 Check ML model run results from completion event. More...
 
int odp_ml_compl_load_result (odp_ml_compl_t ml_compl, odp_ml_load_result_t *result)
 Check ML model load / unload results from completion event. More...
 
void * odp_ml_compl_user_area (odp_ml_compl_t ml_compl)
 ML completion event user area. More...
 
odp_ml_compl_t odp_ml_compl_from_event (odp_event_t event)
 Convert event to ML completion event. More...
 
odp_event_t odp_ml_compl_to_event (odp_ml_compl_t ml_compl)
 Convert ML completion event to event. More...
 
uint64_t odp_ml_compl_to_u64 (odp_ml_compl_t ml_compl)
 Convert ML completion event handle to a uint64_t value for debugging. More...
 
void odp_ml_compl_param_init (odp_ml_compl_param_t *param)
 Initialize ML completion parameters. More...
 
int odp_ml_model_info (odp_ml_model_t model, odp_ml_model_info_t *info)
 Retrieve model information. More...
 
uint32_t odp_ml_model_input_info (odp_ml_model_t model, odp_ml_input_info_t info[], uint32_t num)
 Retrieve model input information. More...
 
uint32_t odp_ml_model_output_info (odp_ml_model_t model, odp_ml_output_info_t info[], uint32_t num)
 Retrieve model output information. More...
 
uint64_t odp_ml_model_to_u64 (odp_ml_model_t model)
 Convert ML model handle to a uint64_t value for debugging. More...
 
void odp_ml_model_print (odp_ml_model_t model)
 Print debug information about the model. More...
 
void odp_ml_print (void)
 Print ML debug information. More...
 
int odp_ml_model_extra_stat_info (odp_ml_model_t model, odp_ml_extra_stat_info_t info[], int num)
 Extra statistics counter information. More...
 
int odp_ml_model_extra_stats (odp_ml_model_t model, uint64_t stats[], int num)
 Read extra statistics counter values. More...
 

Detailed Description

ODP Machine Learning (ML) offload.

Definition in file spec/ml.h.